/* ============================================
   GEOMASTER MAP V2 - PREMIUM CSS
   Interactive World Map Styles
   ============================================ */

/* ============================================
   FULLSCREEN MAP MODAL
   ============================================ */
.geomaster-map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f172a 100%);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.geomaster-map-modal.active {
    opacity: 1;
    visibility: visible;
}

.gm-map-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ============================================
   MAP HEADER
   ============================================ */
.gm-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.gm-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.gm-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.gm-map-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
}

.gm-map-stats {
    display: flex;
    gap: 1rem;
}

.gm-map-stats .gm-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.gm-map-stats .gm-stat.correct {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.gm-map-stats .gm-stat.xp {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
}

/* ============================================
   QUESTION PANEL (Practice Mode)
   ============================================ */
.gm-map-question {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1));
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    z-index: 100;
}

.gm-question-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

.gm-question-flag {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.gm-question-text {
    flex: 1;
}

.gm-question-text h3 {
    color: white;
    font-size: 1.4rem;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.gm-question-text h3 strong {
    color: #fbbf24;
    font-weight: 700;
}

.gm-question-hindi {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin: 0;
}

.gm-feedback {
    margin-top: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    animation: feedbackPop 0.3s ease;
}

.gm-feedback.correct {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.gm-feedback.wrong {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes feedbackPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   LEAFLET MAP CONTAINER
   ============================================ */
.gm-leaflet-map {
    flex: 1;
    width: 100%;
    z-index: 1;
    background: #a8d4f0;
    /* Ocean blue */
}

/* Override Leaflet styles for premium look */
.gm-leaflet-map .leaflet-container {
    background: #a8d4f0 !important;
    font-family: 'Outfit', sans-serif !important;
}

.gm-leaflet-map .leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.gm-leaflet-map .leaflet-control-zoom a {
    background: rgba(15, 15, 35, 0.9) !important;
    color: white !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
}

.gm-leaflet-map .leaflet-control-zoom a:hover {
    background: rgba(139, 92, 246, 0.9) !important;
}

.gm-leaflet-map .leaflet-control-attribution {
    background: rgba(15, 15, 35, 0.8) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 10px !important;
    padding: 2px 8px !important;
}

/* ============================================
   COUNTRY INFO PANEL (Learn Mode)
   ============================================ */
.gm-country-info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 15, 35, 0.98), rgba(15, 15, 35, 0.9));
    backdrop-filter: blur(15px);
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    max-height: 40%;
    overflow-y: auto;
}

.gm-info-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    padding: 1.5rem;
}

.gm-country-detail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.gm-country-detail.new-learned {
    animation: newLearnedPulse 0.6s ease;
}

@keyframes newLearnedPulse {
    0% {
        transform: scale(0.95);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.gm-xp-popup {
    position: absolute;
    top: -10px;
    right: 0;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    animation: xpPopup 0.5s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

@keyframes xpPopup {
    0% {
        transform: translateY(10px) scale(0.8);
        opacity: 0;
    }

    50% {
        transform: translateY(-5px) scale(1.1);
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.gm-country-flag-large {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.4));
}

.gm-country-names h3 {
    color: white;
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.gm-country-names .gm-hindi {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    margin: 0.25rem 0 0 0;
}

.gm-country-capital {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: auto;
}

.gm-country-capital .gm-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.gm-country-capital .gm-value {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.gm-country-capital .gm-hindi {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.gm-info-other {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.gm-info-other strong {
    color: white;
}

.gm-info-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================
   RESULTS PANEL
   ============================================ */
.gm-results {
    text-align: center;
    padding: 1rem;
}

.gm-results-emoji {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: resultsEmoji 0.6s ease;
}

@keyframes resultsEmoji {
    0% {
        transform: scale(0) rotate(-15deg);
    }

    60% {
        transform: scale(1.2) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.gm-results h3 {
    color: white;
    font-size: 1.75rem;
    margin: 0 0 1.5rem 0;
    font-weight: 700;
}

.gm-results-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.gm-result-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gm-result-stat .gm-stat-value {
    color: #fbbf24;
    font-size: 2rem;
    font-weight: 700;
}

.gm-result-stat .gm-stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.gm-results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.gm-results-actions .gm-btn {
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gm-results-actions .gm-btn.primary {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.gm-results-actions .gm-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.gm-results-actions .gm-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gm-results-actions .gm-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   ERROR STATE
   ============================================ */
.gm-error {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.gm-error span {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.gm-error .gm-btn {
    margin-top: 1rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .gm-map-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .gm-back-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .gm-map-title {
        font-size: 1rem;
    }

    .gm-map-stats {
        width: 100%;
        justify-content: center;
    }

    .gm-map-stats .gm-stat {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    .gm-question-content {
        gap: 1rem;
    }

    .gm-question-flag {
        font-size: 2.5rem;
    }

    .gm-question-text h3 {
        font-size: 1.1rem;
    }

    .gm-country-info-panel {
        padding: 1rem;
        max-height: 50%;
    }

    .gm-country-detail {
        justify-content: center;
        text-align: center;
        gap: 1rem;
    }

    .gm-country-flag-large {
        font-size: 3rem;
    }

    .gm-country-names h3 {
        font-size: 1.5rem;
    }

    .gm-country-capital {
        margin-left: 0;
        width: 100%;
    }

    .gm-results-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .gm-results-actions {
        flex-direction: column;
    }

    .gm-results-actions .gm-btn {
        width: 100%;
    }
}

/* ============================================
   COUNTRY HOVER TOOLTIP
   ============================================ */
.leaflet-tooltip {
    background: rgba(15, 15, 35, 0.95) !important;
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
    border-radius: 8px !important;
    color: white !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-tooltip::before {
    border-top-color: rgba(15, 15, 35, 0.95) !important;
}