body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#world-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

.country {
    fill: var(--bs-secondary);
    stroke: var(--bs-dark);
    stroke-width: 0.5;
    transition: all 0.3s ease;
}

.country:hover {
    fill: var(--bs-primary);
    cursor: pointer;
}

.selected-country {
    fill-opacity: 0.7;
    stroke: var(--bs-primary);
    stroke-width: 2;
}

.correct-country {
    fill: var(--bs-success) !important;
    fill-opacity: 0.7;
}

.incorrect-country {
    fill: var(--bs-danger) !important;
    fill-opacity: 0.7;
}

.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Top right stats panel */
.stats-panel {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(33, 37, 41, 0.95);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    pointer-events: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    min-width: 180px;
}

/* Top center target panel */
.target-panel {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 280px;
    max-width: calc(100% - 420px); /* Leave space for stats panel */
    pointer-events: auto;
}

/* Bottom right mode selector */
.mode-selector {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 200px;
    background: rgba(33, 37, 41, 0.95);
    padding: 0.75rem;
    border-radius: 8px;
    pointer-events: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.time-display, .score-display, .progress-display {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--bs-light);
}

.progress-display {
    color: var(--bs-light);
    opacity: 0.9;
}

.alert {
    transition: all 0.3s ease;
    pointer-events: auto;
    background: rgba(33, 37, 41, 0.95);
    margin: 0;
    border: none;
    color: var(--bs-light);
    opacity: 1;
}

.alert-info {
    background: rgba(13, 202, 240, 0.2);
    border-left: 4px solid var(--bs-info);
}

.alert-success {
    background: rgba(25, 135, 84, 0.2);
    border-left: 4px solid var(--bs-success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    border-left: 4px solid var(--bs-danger);
}

#country-name {
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes feedbackPulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Transition for hiding elements */
.d-none {
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out;
}

/* Leaflet customization for dark theme */
.leaflet-container {
    background-color: var(--bs-dark);
}

.leaflet-popup-content-wrapper {
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

.leaflet-popup-tip {
    background-color: var(--bs-dark);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .stats-panel {
        min-width: auto;
        padding: 0.5rem 0.75rem;
    }

    .target-panel {
        min-width: 200px;
        max-width: calc(100% - 20px);
        margin: 0 10px;
    }

    .mode-selector {
        width: 150px;
    }

    .time-display, .score-display, .progress-display {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-panel {
        top: 0.5rem;
        right: 0.5rem;
    }

    .target-panel {
        top: 0.5rem;
    }

    .mode-selector {
        bottom: 0.5rem;
        right: 0.5rem;
        width: 120px;
    }
}