/* ============================================
   GEOMASTER - PREMIUM STYLING
   Revolutionary Geography Learning Experience
   Glassmorphism + Modern Animations
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --gm-primary: #6366f1;
    --gm-primary-light: #818cf8;
    --gm-secondary: #8b5cf6;
    --gm-success: #10b981;
    --gm-error: #ef4444;
    --gm-warning: #f59e0b;
    --gm-glass-bg: rgba(255, 255, 255, 0.1);
    --gm-glass-border: rgba(255, 255, 255, 0.2);
    --gm-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ============================================
   MODAL BASE STYLES
   ============================================ */
.geomaster-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 30, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.geomaster-modal .modal-content {
    background: linear-gradient(145deg, rgba(30, 30, 60, 0.95), rgba(20, 20, 40, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--gm-shadow), 0 0 100px rgba(99, 102, 241, 0.1);
    animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

/* Close Button */
.gm-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gm-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* ============================================
   CONTINENT SELECTOR
   ============================================ */
.gm-continent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 2rem;
}

.gm-continent-card {
    background: var(--card-gradient);
    border-radius: 20px;
    padding: 1.75rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gm-continent-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.gm-continent-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gm-continent-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 0.75rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.gm-continent-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gm-continent-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0 0 1rem;
}

.gm-progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.gm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.gm-progress-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.gm-mastered-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    animation: pulse 2s infinite;
}

/* ============================================
   MODE SELECTOR
   ============================================ */
.gm-mode-header {
    padding: 2rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
    position: relative;
}

.gm-mode-emoji {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.gm-mode-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.gm-mode-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.gm-modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .gm-modes-grid {
        grid-template-columns: 1fr;
    }
}

.gm-mode-card {
    background: linear-gradient(145deg, rgba(50, 50, 80, 0.8), rgba(30, 30, 50, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gm-mode-card:hover:not(.locked) {
    transform: translateY(-5px);
    border-color: var(--gm-primary);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.2);
}

.gm-mode-card.locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.gm-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 2;
}

.gm-lock-overlay span {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.gm-lock-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

.gm-mode-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.gm-mode-card h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.gm-mode-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.gm-mode-meta {
    margin-bottom: 0.75rem;
}

.gm-xp-badge {
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-secondary));
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.gm-xp-badge.legendary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
}

.gm-mode-progress,
.gm-mode-score {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.gm-mode-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.gm-mode-progress-fill {
    height: 100%;
    background: var(--gm-success);
    border-radius: 3px;
}

.gm-fun-fact {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 0 1.5rem 1.5rem;
}

.gm-fun-fact span {
    font-size: 1.5rem;
}

.gm-fun-fact p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ============================================
   LEARN MODE
   ============================================ */
.gm-learn-header {
    padding: 1.5rem 2rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

.gm-learn-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.gm-learn-progress-bar {
    flex: 1;
    max-width: 300px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.gm-learn-progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.gm-learn-progress span {
    color: white;
    font-weight: 600;
}

.gm-learn-header h2 {
    color: white;
    font-size: 1.25rem;
    margin: 0;
}

.gm-country-card {
    background: linear-gradient(145deg, rgba(50, 50, 80, 0.6), rgba(30, 30, 50, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
}

.gm-country-card.learned {
    border-color: var(--gm-success);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

.gm-country-flag {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: flagWave 2s ease-in-out infinite;
}

@keyframes flagWave {

    0%,
    100% {
        transform: rotate(-3deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

.gm-country-name {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
}

.gm-country-hindi {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin: 0 0 1.5rem;
}

.gm-country-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.gm-info-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
}

.gm-info-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.gm-info-value {
    display: block;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

.gm-info-hindi {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.gm-learned-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gm-success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.gm-learn-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
    flex-wrap: wrap;
}

.gm-keyboard-hint {
    text-align: center;
    padding: 0 1.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.gm-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-btn.primary {
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.gm-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.gm-btn.primary.pulse {
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(99, 102, 241, 0.5);
    }
}

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

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

.gm-btn.success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.gm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   PRACTICE MODE
   ============================================ */
.gm-practice-header {
    padding: 1.25rem 1.5rem;
    border-radius: 24px 24px 0 0;
}

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

.gm-stat {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.gm-stat.correct {
    color: #34d399;
}

.gm-stat.wrong {
    color: #f87171;
}

.gm-stat.xp {
    color: #fbbf24;
}

.gm-practice-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.gm-practice-progress-bar {
    flex: 1;
    max-width: 400px;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.gm-practice-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.gm-practice-progress span {
    color: white;
    font-size: 0.9rem;
}

.gm-practice-question {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
}

.gm-question-flag {
    font-size: 7rem;
    margin-bottom: 1rem;
    animation: flagWave 2s ease-in-out infinite;
}

.gm-question-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

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

.gm-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1.5rem;
}

@media (max-width: 600px) {
    .gm-options-grid {
        grid-template-columns: 1fr;
    }
}

.gm-option-btn {
    background: linear-gradient(145deg, rgba(50, 50, 80, 0.6), rgba(30, 30, 50, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.gm-option-btn:hover:not(:disabled) {
    border-color: var(--gm-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.gm-option-btn.correct {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #10b981 !important;
    animation: correctPop 0.4s ease;
}

.gm-option-btn.wrong {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #ef4444 !important;
    animation: shake 0.4s ease;
}

@keyframes correctPop {

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

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.gm-option-name {
    display: block;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gm-option-hindi {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.gm-feedback {
    padding: 0 1.5rem;
    margin: 1rem 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gm-feedback.visible {
    opacity: 1;
    transform: translateY(0);
}

.gm-feedback-correct,
.gm-feedback-wrong {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.gm-feedback-correct {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

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

.gm-streak {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a2e;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.gm-feedback-capital {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ============================================
   MASTER MODE
   ============================================ */
.gm-master-header {
    padding: 1.25rem 1.5rem;
    border-radius: 24px 24px 0 0;
}

.gm-master-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.gm-stat.timer {
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-secondary));
    color: white;
}

.gm-master-challenge {
    text-align: center;
    padding: 2rem 1.5rem;
}

.gm-challenge-flag {
    font-size: 5rem;
    margin-bottom: 0.75rem;
}

.gm-challenge-country {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
}

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

.gm-challenge-prompt {
    margin-bottom: 1.5rem;
}

.gm-challenge-prompt span {
    display: block;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.gm-prompt-hindi {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
}

.gm-answer-input-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.gm-answer-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.gm-answer-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.gm-answer-input:focus {
    border-color: var(--gm-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.gm-submit-btn {
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gm-submit-btn:hover {
    transform: scale(1.05);
}

.gm-hint-section {
    margin-bottom: 1rem;
}

.gm-hint-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gm-hint-btn:hover {
    border-color: #f59e0b;
    color: #fbbf24;
}

.gm-hint-text {
    margin-top: 0.5rem;
    color: #fbbf24;
    font-size: 0.95rem;
}

.gm-progress-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.5rem 2rem;
}

.gm-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.gm-progress-dot.completed {
    background: var(--gm-success);
}

.gm-progress-dot.current {
    background: var(--gm-primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ============================================
   RESULTS
   ============================================ */
.gm-results-trophy {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: trophyBounce 1s ease;
}

@keyframes trophyBounce {

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

    50% {
        transform: scale(1.2);
    }
}

.gm-results-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 1.5rem;
}

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

.gm-result-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 100px;
}

.gm-result-stat.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(99, 102, 241, 0.3);
}

.gm-result-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.gm-result-value {
    display: block;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
}

.gm-result-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.gm-bonus-badge {
    text-align: center;
    margin-bottom: 1.5rem;
}

.gm-bonus-badge span {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a2e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
}

.gm-results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.5rem 2rem;
    flex-wrap: wrap;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.gm-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, var(--gm-primary), var(--gm-secondary));
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    z-index: 100000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gm-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 600px) {
    .geomaster-modal .modal-content {
        max-height: 95vh;
        border-radius: 20px;
    }

    .gm-continent-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .gm-country-flag,
    .gm-question-flag {
        font-size: 5rem;
    }

    .gm-country-name,
    .gm-challenge-country {
        font-size: 1.5rem;
    }

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

    .gm-answer-input-container {
        flex-direction: column;
    }

    .gm-results-stats {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.geomaster-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

.geomaster-modal .modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.geomaster-modal .modal-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

.geomaster-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* ============================================
   MASTER MODE CHALLENGE SELECTOR
   ============================================ */
.gm-master-selector {
    padding: 0;
}

.gm-master-selector-header {
    padding: 2rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

.gm-master-emoji {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.gm-master-selector-header h2 {
    color: white;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.gm-master-selector-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.gm-challenge-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .gm-challenge-types {
        grid-template-columns: 1fr;
    }
}

.gm-challenge-type-card {
    background: linear-gradient(145deg, rgba(50, 50, 80, 0.8), rgba(30, 30, 50, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gm-challenge-type-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gm-primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.gm-challenge-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gm-challenge-type-card h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.gm-challenge-type-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.gm-challenge-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.gm-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   DRAG & DROP INTERACTIVE MAP
   ============================================ */
.gm-dragdrop-container {
    min-height: 600px;
}

.gm-dragdrop-header {
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

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

.gm-dragdrop-header h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.gm-map-area {
    padding: 1.5rem;
}

.gm-interactive-map {
    position: relative;
    width: 100%;
    height: 350px;
    background: linear-gradient(145deg, rgba(20, 40, 80, 0.8), rgba(10, 20, 40, 0.9));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    overflow: hidden;
}

.gm-map-background {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Continent map backgrounds with gradients */
.gm-map-background.asia {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    opacity: 0.2;
}

.gm-map-background.europe {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #22d3d1 100%);
    opacity: 0.2;
}

.gm-map-background.africa {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 50%, #db2777 100%);
    opacity: 0.2;
}

.gm-map-background.northAmerica {
    background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #059669 100%);
    opacity: 0.2;
}

.gm-map-background.southAmerica {
    background: linear-gradient(135deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
    opacity: 0.2;
}

.gm-map-background.oceania {
    background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
    opacity: 0.2;
}

.gm-drop-zone {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.2);
    border: 2px dashed rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    cursor: crosshair;
}

.gm-drop-zone:hover,
.gm-drop-zone.drag-over {
    background: rgba(99, 102, 241, 0.4);
    border-color: var(--gm-primary);
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.gm-drop-zone.correct {
    background: rgba(16, 185, 129, 0.3);
    border: 2px solid #10b981;
    border-style: solid;
    animation: correctDrop 0.5s ease;
}

@keyframes correctDrop {
    0% {
        transform: translate(-50%, -50%) scale(1.5);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.gm-drop-zone.shake {
    animation: dropShake 0.4s ease;
}

@keyframes dropShake {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    25% {
        transform: translate(-50%, -50%) rotate(-10deg);
    }

    75% {
        transform: translate(-50%, -50%) rotate(10deg);
    }
}

.gm-drop-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    font-weight: 700;
}

.gm-placed-flag {
    font-size: 1.75rem;
}

.gm-draggable-flags {
    padding: 1rem 1.5rem 1.5rem;
}

.gm-drag-instruction {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin: 0 0 1rem;
    text-align: center;
}

.gm-flags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.gm-draggable-flag {
    background: linear-gradient(145deg, rgba(50, 50, 80, 0.8), rgba(30, 30, 50, 0.9));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    cursor: grab;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gm-draggable-flag:hover {
    transform: translateY(-3px);
    border-color: var(--gm-primary);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.gm-draggable-flag:active,
.gm-draggable-flag.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
    z-index: 100;
}

.gm-draggable-flag.placed {
    opacity: 0.3;
    cursor: default;
    transform: none;
    border-color: #10b981;
}

.gm-draggable-flag.shake {
    animation: flagShake 0.4s ease;
}

@keyframes flagShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.gm-flag-emoji {
    font-size: 1.75rem;
}

.gm-flag-name {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   FLAG MATCH GAME
   ============================================ */
.gm-flagmatch-container {
    min-height: 500px;
}

.gm-flagmatch-header {
    padding: 1.25rem 1.5rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

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

.gm-flagmatch-header h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.gm-match-area {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    justify-content: center;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .gm-match-area {
        flex-direction: column;
        align-items: center;
    }
}

.gm-match-column {
    flex: 1;
    max-width: 200px;
}

.gm-match-column h4 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    text-align: center;
}

.gm-match-item {
    background: linear-gradient(145deg, rgba(50, 50, 80, 0.6), rgba(30, 30, 50, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.gm-match-item:hover:not(.matched) {
    transform: translateY(-3px);
    border-color: var(--gm-primary);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.gm-match-item.selected {
    border-color: var(--gm-primary);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.gm-match-item.matched {
    border-color: #10b981;
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    cursor: default;
    opacity: 0.7;
}

.gm-match-item.shake {
    animation: matchShake 0.4s ease;
}

@keyframes matchShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.gm-match-flag {
    font-size: 2rem;
}

.gm-match-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.gm-match-lines {
    flex-shrink: 0;
    width: 60px;
    display: none;
    /* Used for drawing connection lines */
}

/* ============================================
   ADDITIONAL RESPONSIVE STYLES
   ============================================ */
@media (max-width: 600px) {
    .gm-interactive-map {
        height: 280px;
    }

    .gm-drop-zone {
        width: 40px;
        height: 40px;
    }

    .gm-placed-flag {
        font-size: 1.3rem;
    }

    .gm-draggable-flag {
        padding: 0.5rem 0.75rem;
    }

    .gm-flag-emoji {
        font-size: 1.4rem;
    }

    .gm-flag-name {
        font-size: 0.75rem;
    }

    .gm-challenge-types {
        padding: 1rem;
        gap: 1rem;
    }

    .gm-challenge-type-card {
        padding: 1.25rem;
    }

    .gm-challenge-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
}