@import url('https://fonts.googleapis.com/css2?family=Rubik+Doodle+Shadow&display=swap');
/* ========== Global ========== */
body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.hidden {
    display: none;
}

/* ========== Animations ========== */
@keyframes pulsar {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* ========== Map ========== */
#map {
    height: 100vh;
    width: 100%;
    z-index: 0;
}

#grid-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.grid-line {
    stroke: red;
    stroke-width: 0.5;
    pointer-events: none;
}

/* ========== Map Marker ========== */
.map-marker {
    background-color: #3388ff;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
}

.map-marker::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #3388ff;
    animation: pulsar 2s infinite ease-out;
}

.marker-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* ========== Map Controls ========== */
.custom-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-btn {
    width: 35px;
    height: 35px;
    background: white;
    border: none;
    border-radius: 90px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: background 0.2s;
    color: #4A5772;
}

.map-btn:hover {
    background: #f0f0f0;
}

.zoom-btn {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f0f0f0;
    padding: 5px;
    border-radius: 90px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.map-center {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 45px;
    height: 45px;
}

.circle {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px dashed #3388FF;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    transition: border-color 0.3s;
}

.circle:hover {
    border-color: blue;
}

.circle.current {
    background-color: #3388FF;
    border-color: rgba(255, 255, 255, 0.7);
}

/* ========== Buttons ========== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #3388ff;
    color: white;
    border: 2px solid #2c75db;
}

.btn-primary:hover {
    background-color: #3687f9;
}

.btn-secondary {
    background: white;
    color: #4a5772;
    border: 2px solid #d7deea;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #bbc5d6;
}

/* ========== Paint Panel ========== */
.paint-opt {
    position: fixed;
    bottom: 0px;
    left: 0;
    z-index: 1000;
    width: 100%;
}

#startPaint {
    margin-left: calc(50% - 5vh);
    margin-bottom: 19px;
}

.colors {
    margin: 0 auto;
    padding: 14px 18px 12px;
    background-color: #f8faff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.08);
    width: calc(100% - 35px);
    z-index: 2000;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
}

.colors-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.colors-title {
    font-weight: 700;
    color: #1f2a44;
    font-size: 16px;
}

#closeColorsChoice {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #d7deea;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #4a5772;
    transition: background 0.2s, transform 0.1s;
}

#closeColorsChoice:hover {
    background: #eef2fb;
}

#closeColorsChoice:active {
    transform: scale(0.96);
}

/* ========== Color Options ========== */
.choice {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.color-option:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.color-option.active {
    border-color: #1f7bf2;
    box-shadow: 0 4px 14px rgba(31,123,242,0.4);
}

/* Color palette */
/* Reds */
.red { background-color: #e63946; }
.crimson { background-color: #dc143c; }
.rose { background-color: #e11d48; }
.pink { background-color: #ec4899; }
.fuchsia { background-color: #d946ef; }
.magenta { background-color: #c026d3; }

/* Purples & Violets */
.purple { background-color: #9333ea; }
.violet { background-color: #8b5cf6; }
.indigo { background-color: #6366f1; }

/* Blues */
.blue { background-color: #1d4ed8; }
.sky { background-color: #0ea5e9; }
.cyan { background-color: #06b6d4; }
.teal { background-color: #14b8a6; }

/* Greens */
.emerald { background-color: #10b981; }
.green { background-color: #16a34a; }
.lime { background-color: #84cc16; }
.chartreuse { background-color: #7fff00; }

/* Yellows & Oranges */
.yellow { background-color: #eab308; }
.amber { background-color: #f59e0b; }
.orange { background-color: #f97316; }
.coral { background-color: #ff7f50; }
.tomato { background-color: #ff6347; }

/* Pinks & Salmon */
.salmon { background-color: #fa8072; }
.peach { background-color: #ffd7b5; }

/* Browns */
.brown { background-color: #92400e; }
.chocolate { background-color: #d2691e; }
.sienna { background-color: #a0522d; }
.tan { background-color: #d2b48c; }
.khaki { background-color: #c3b091; }

/* Earth Tones */
.olive { background-color: #808000; }
.gold { background-color: #ffd700; }
.silver { background-color: #c0c0c0; }

/* Grays & Neutrals */
.white { background-color: #f8fafc; border: 1px solid #d7deea; }
.lightgray { background-color: #d1d5db; }
.gray { background-color: #6b7280; }
.darkgray { background-color: #4b5563; }
.slate { background-color: #334155; }
.charcoal { background-color: #2d3748; }
.black { background-color: #0f172a; }

/* Dark Tones */
.navy { background-color: #1e3a8a; }
.maroon { background-color: #800000; }
.burgundy { background-color: #991b1b; }

/* Pastels */
.plum { background-color: #dda0dd; }
.lavender { background-color: #c4b5fd; }
.mint { background-color: #a7f3d0; }
.aqua { background-color: #7dd3fc; }
.turquoise { background-color: #40e0d0; }
.steel { background-color: #4682b4; }
.ivory { background-color: #fffff0; border: 1px solid #d7deea; }

/* ========== Paint Footer ========== */
.paint-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.paintConfirm {
    text-align: left;
}

.erase .btn {
    padding: 10px 14px;
    border-radius: 10px;
    min-width: 52px;
}
.hidden {
    display: none;
}
.loginInfo{
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;;
    align-items: center;
    gap: 10px;
    flex-direction: column;
    background-color: #f0f0f0;
    padding: 5px;
    border-radius: 90px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.userprofile .btn{
    border-radius: 50%;
    padding: 10px;
    width: 50px;
    height: 50px;
}
.userprofile .btn img{
    width: 45px;
    border-radius: 50%;
    margin: -9px 0 0 -9.25px;
}
.userprofile #userLevel{
    position: absolute;
    top: 34px;
    left: 2px;
    background-color: #3388ff;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
.leaderbord .btn{
    border-radius: 50%;
    padding: 10px;
    width: 50px;
    height: 50px;
}

.search-location .btn{
    border-radius: 50%;
    width: 50px;
    height: 50px;
    padding: 10px;
}
.showPicturesBtn{
    position: absolute;
    top: 10px;
    left: calc(50% - 100px);
    z-index: 1000;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-content {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
}
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #4a5772;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.modal-hidden {
    display: none;
}
.logo{
    font-family: 'Rubik Doodle Shadow', monospace;
    font-size: 50px;
    color: #3388ff;
    margin: auto;
}
#loginModal .modal-body{
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}
#loginModal .btn{
    width: 80%;
    font-size: 18px;
}
.or::after{
    content: " ";
    flex: 1;
    height: 1px;
    background-color: #d7deea;
    margin-left: 10px;
}
#loginModal .btn img{
    width: 25px;
    margin-bottom: -5px;
}

/* ========== Search Modal ========== */
#searchModal .modal-content {
    width: 90%;
    max-width: 400px;
}

#locationInput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
    font-size: 14px;
}

#searchResults {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.search-result-item {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f0f0f0;
}

.search-result-item strong {
    display: block;
    margin-bottom: 5px;
    color: #1f2a44;
}

.search-result-item p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}
