* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    background-color: #0f1115;
    overflow: hidden;
}

#map {
    height: 100vh;
    width: 100vw;
    z-index: 1;
}

#ui-container {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(20, 22, 30, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px 50px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 350px;
    /* allow click through if needed? no need */
}

#title {
    font-size: 16px;
    color: #a0a5b5;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.target-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#target-country {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#top-reset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
}

#top-reset-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(-45deg);
}

#score-container {
    font-size: 18px;
    font-weight: 600;
    color: #e0e5f5;
    margin-top: 5px;
}

#score {
    color: #00ff88;
}

/* Dots */
.marker-wrapper {
    background: transparent;
    border: none;
}

.country-dot {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: inline-block;
}

.country-dot.correct {
    background: #00ff88 !important;
    box-shadow: 0 0 20px #00ff88 !important;
    border-color: #004d29 !important;
    position: relative;
    z-index: 500 !important;
    pointer-events: none;
}

.country-dot.correct-pulse-red {
    animation: correct-red-pulse 0.8s infinite;
    background: #ff3366 !important;
    border-color: #990000 !important;
    position: relative;
    z-index: 600 !important;
}

@keyframes correct-red-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.8); }
    50% { transform: scale(2.5); box-shadow: 0 0 0 20px rgba(255, 51, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
}

.shake {
    animation: shake-animation 0.5s;
}

@keyframes shake-animation {
    0%, 100% { transform: translateX(-50%); }
    20% { transform: translateX(calc(-50% - 10px)); }
    40% { transform: translateX(calc(-50% + 10px)); }
    60% { transform: translateX(calc(-50% - 10px)); }
    80% { transform: translateX(calc(-50% + 10px)); }
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: rgba(20, 22, 30, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 50px;
    color: white;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

#game-over.hidden {
    display: none;
}

#game-over h2 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #00ff88 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#game-over p {
    font-size: 24px;
    margin-bottom: 30px;
}

#restart-btn {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

#restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6);
}

/* Custom leaflet tweaks */
.leaflet-container {
    background: #0f1115;
}
.leaflet-control-zoom {
    border: none !important;
    background: rgba(20, 22, 30, 0.8) !important;
    backdrop-filter: blur(10px);
    border-radius: 10px !important;
    overflow: hidden;
}
.leaflet-control-zoom a {
    background: transparent !important;
    color: white !important;
    border: none !important;
    transition: background 0.3s;
}
.leaflet-control-zoom a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}
