/**
 * Bandeiras e Capitais - Main Stylesheet
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 * 
 * Design: Education & Gamified + Clean & Minimal + Health & Wellness
 * Palette: Earthy & Natural
 */

/* ===== CSS RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Paleta Vibrante Educacional */
    --primary-color: #4F46E5;        /* Azul Índigo */
    --secondary-color: #7C3AED;      /* Roxo */
    --accent-color: #F59E0B;         /* Âmbar */
    --accent-2: #10B981;             /* Esmeralda */
    --surface-color: #E0E7FF;        /* Índigo claro */
    --text-color: #1E1B4B;           /* Índigo escuro */
    
    /* Variações automáticas */
    --primary-hover: #3730A3;
    --primary-light: #818CF8;
    --primary-lighter: #EEF2FF;
    --bg-color: #F8F7FF;
    --bg-secondary: #F0F4FF;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    
    /* Status Colors */
    --success-color: #10B981;
    --success-light: #D1FAE5;
    --warning-color: #F59E0B;
    --warning-light: #FEF3C7;
    --danger-color: #EF4444;
    --danger-light: #FEE2E2;
    --info-color: #3B82F6;
    --info-light: #DBEAFE;
    
    /* Layout */
    --border-radius: 14px;
    --border-radius-sm: 10px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --spacing-unit: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(79, 70, 229, 0.08);
    --shadow-md: 0 4px 16px rgba(79, 70, 229, 0.14);
    --shadow-lg: 0 8px 32px rgba(79, 70, 229, 0.2);
    --shadow-xl: 0 16px 48px rgba(79, 70, 229, 0.25);
    
    /* Header & Navigation */
    --header-height: 60px;
    --bottom-nav-height: 65px;
    
    /* Font */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fredoka One', cursive;
}


/* ===== BASE STYLES ===== */
html {
    font-size: clamp(14px, 2.5vw, 16px);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Fundo sutil com padrão pontilhado */
    background-image: radial-gradient(circle at 1px 1px, rgba(79,70,229,0.06) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
}

h1 { font-size: 1.75rem; font-family: var(--font-display); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* ===== HEADER ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(248, 247, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(79, 70, 229, 0.12);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Logo no header */
.header-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.header-logo h1 {
    font-size: 1.125rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--primary-color);
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.desktop-nav {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(248, 247, 255, 0.92);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -1px 0 rgba(79, 70, 229, 0.1), 0 -8px 24px rgba(79, 70, 229, 0.08);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(79, 70, 229, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: var(--transition-fast);
    min-width: 64px;
    min-height: 48px;
    border-radius: var(--border-radius-sm);
}

.nav-item i {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: scale(1.15);
}

.nav-item:hover {
    color: var(--primary-color);
    background: var(--primary-lighter);
    border-radius: var(--border-radius-sm);
}

/* Active indicator dot */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    display: none;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    min-height: 48px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--surface-color);
}

.btn-secondary:hover {
    background: var(--surface-color);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: var(--secondary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #D32F2F;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--primary-lighter);
    color: var(--primary-color);
}

/* ===== CARDS ===== */
.hero-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 60%, #A855F7 100%);
    color: white;
    padding: 36px 24px;
    border-radius: var(--border-radius-xl);
    text-align: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}

.hero-card::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.hero-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255,255,255,0.25);
    overflow: hidden;
    padding: 0;
}

.hero-icon i {
    font-size: 2.75rem;
}

/* Logo no hero card */
.hero-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-card h2 {
    color: white;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-size: 1.6rem;
}

.hero-card p {
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.hero-card .btn {
    background: white;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.05rem;
    padding: 14px 36px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.hero-card .btn:hover {
    background: var(--primary-lighter);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-lighter);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 16px;
    font-size: 1.125rem;
    color: var(--text-color);
}

.section-title i {
    color: var(--primary-color);
}

/* Game Mode Cards */
.game-modes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.game-mode-card {
    background: var(--bg-secondary);
    padding: 22px 16px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.game-mode-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--primary-lighter);
}

.game-mode-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
}

.mode-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.game-mode-card h4 {
    margin-bottom: 4px;
    font-weight: 700;
}

.game-mode-card p {
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.mode-difficulty {
    margin-top: 8px;
}

.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-badge.easy {
    background: var(--success-light);
    color: var(--success-color);
}

.difficulty-badge.medium {
    background: var(--warning-light);
    color: var(--warning-color);
}

.difficulty-badge.hard {
    background: var(--danger-light);
    color: var(--danger-color);
}

.difficulty-badge.expert {
    background: var(--info-light);
    color: var(--info-color);
}

/* Continents Grid */
.continents-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.continent-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.continent-btn:hover {
    border-color: var(--primary-color);
}

.continent-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.continent-btn i {
    font-size: 1rem;
}

/* Achievements Container */
.achievements-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
}

.achievements-container::-webkit-scrollbar {
    height: 4px;
}

.achievements-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 2px;
}

.achievements-container::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 2px;
}

.achievement-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    min-width: 100px;
    text-align: center;
}

.achievement-badge.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.achievement-badge span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Daily Challenge Card */
.daily-challenge-card {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 24px;
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.challenge-header i {
    font-size: 1.25rem;
}

.challenge-header h4 {
    flex: 1;
    color: white;
    margin: 0;
}

.challenge-timer {
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.challenge-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.challenge-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.challenge-progress .progress-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
}

.challenge-progress .progress-fill {
    background: white;
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.daily-challenge-card .btn {
    background: white;
    color: var(--primary-color);
    width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.empty-state p {
    margin-bottom: 16px;
}

/* ===== GAME SETUP ===== */
.game-setup {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--border-radius-lg);
}

.game-setup h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.game-setup h2 i {
    color: var(--primary-color);
}

.setup-option {
    margin-bottom: 20px;
}

.setup-option label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-color);
    border: 2px solid var(--surface-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.option-btn:hover {
    border-color: var(--primary-color);
}

.option-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== GAME AREA ===== */
.game-area {
    animation: fadeIn 0.3s ease;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.game-info {
    display: flex;
    flex-direction: column;
}

.question-counter {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
}

.game-mode-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.game-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-lighter);
    border-radius: var(--border-radius-sm);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.125rem;
}

.game-timer.warning {
    background: var(--warning-light);
    color: var(--warning-color);
    animation: pulse 0.5s infinite;
}

.game-timer.danger {
    background: var(--danger-light);
    color: var(--danger-color);
    animation: pulse 0.3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-progress {
    margin-bottom: 16px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar.large {
    height: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.score-display {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.125rem;
    font-weight: 600;
}

.score-item.streak {
    padding: 6px 12px;
    background: var(--warning-light);
    border-radius: var(--border-radius-sm);
}

.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

/* Question Area */
.question-area {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.flag-question h3,
.capital-question h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.flag-display {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Container de emoji de bandeira (fallback) */
.flag-emoji-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 240px;
    height: 160px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 3px solid var(--surface-color);
    box-shadow: var(--shadow-md);
}

.flag-emoji {
    font-size: 7rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.flag-img {
    max-width: 240px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--surface-color);
    background: #f8f9fa;
}

.country-display {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-lighter), var(--bg-secondary));
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--surface-color);
}

.country-name-text {
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-display);
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.answer-btn {
    padding: 16px 20px;
    background: var(--bg-color);
    border: 2px solid var(--surface-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.answer-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--primary-lighter);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.answer-btn:disabled {
    cursor: not-allowed;
}

.answer-btn.correct {
    background: var(--success-light);
    border-color: var(--success-color);
    color: var(--success-color);
}

.answer-btn.wrong {
    background: var(--danger-light);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.answer-btn.correct::before,
.answer-btn.wrong::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
}

.answer-btn.correct::before {
    content: '\f00c';
}

.answer-btn.wrong::before {
    content: '\f00d';
}

/* Feedback Area */
.feedback-area {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.feedback-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.feedback-content.correct {
    background: var(--success-light);
    color: var(--success-color);
}

.feedback-content.wrong {
    background: var(--danger-light);
    color: var(--danger-color);
}

.curiosity-box {
    background: var(--info-light);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    text-align: left;
}

.curiosity-box i {
    color: var(--info-color);
    margin-right: 8px;
}

.curiosity-box p {
    color: var(--text-color);
    margin: 0;
    display: inline;
}

/* ===== GAME RESULTS ===== */
.game-results {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.results-header {
    margin-bottom: 24px;
}

.results-icon {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 2.5rem;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 8px 32px rgba(79,70,229,0.3);
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.results-icon.poor {
    background: linear-gradient(135deg, var(--danger-color), #D32F2F);
}

.results-icon.good {
    background: linear-gradient(135deg, var(--warning-color), #F57C00);
}

.results-icon.great {
    background: linear-gradient(135deg, var(--success-color), #388E3C);
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.result-stat {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
}

.result-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.results-achievements {
    margin-bottom: 24px;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== LEADERBOARD ===== */
.leaderboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.user-rank-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    color: white;
    margin-bottom: 20px;
}

.rank-position {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-number {
    font-size: 1.125rem;
    font-weight: 700;
}

.rank-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rank-name {
    font-weight: 600;
}

.rank-score {
    font-size: 0.875rem;
    opacity: 0.9;
}

.rank-badge i {
    font-size: 1.5rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.leaderboard-item:hover {
    transform: translateX(4px);
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: white;
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: white;
}

.leaderboard-position {
    width: 32px;
    height: 32px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.leaderboard-item.top-1 .leaderboard-position,
.leaderboard-item.top-2 .leaderboard-position,
.leaderboard-item.top-3 .leaderboard-position {
    background: rgba(255, 255, 255, 0.3);
}

.leaderboard-name {
    flex: 1;
    font-weight: 500;
}

.leaderboard-score {
    font-weight: 700;
    color: var(--primary-color);
}

.leaderboard-item.top-1 .leaderboard-score,
.leaderboard-item.top-2 .leaderboard-score,
.leaderboard-item.top-3 .leaderboard-score {
    color: white;
}

/* Skeleton Loading */
.skeleton-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--surface-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

.skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.skeleton-text {
    flex: 1;
    height: 16px;
}

.skeleton-score {
    width: 60px;
    height: 16px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== PROFILE ===== */
.profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-name-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--surface-color);
    padding: 4px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    width: 100%;
    transition: var(--transition-fast);
}

.profile-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.profile-level {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.level-progress-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.level-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.current-level {
    font-weight: 600;
    color: var(--primary-color);
}

.next-level {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.xp-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stat-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
}

.profile-stat-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.profile-stat-card .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Continent Progress */
.continent-progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.continent-progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.continent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.continent-info i {
    color: var(--primary-color);
}

.continent-progress-item .progress-bar {
    flex: 1;
}

.progress-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 40px;
    text-align: right;
}

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* Settings */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.setting-item.danger {
    border: 1px solid var(--danger-color);
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-info i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.setting-item.danger .setting-info i {
    color: var(--danger-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-color);
    transition: var(--transition-fast);
    border-radius: 28px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* FAQ */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--primary-lighter);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 16px 16px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}

.toast.success {
    background: var(--success-color);
    color: white;
}

.toast.error {
    background: var(--danger-color);
    color: white;
}

.toast.warning {
    background: var(--warning-color);
    color: white;
}

.toast.info {
    background: var(--info-color);
    color: white;
}

.toast i {
    font-size: 1.25rem;
}

.toast span {
    flex: 1;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--surface-color);
}

.modal-header h3 {
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    color: var(--text-color);
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--surface-color);
}

.modal-footer .btn {
    flex: 1;
}

/* ===== FOOTER ===== */
.app-footer {
    text-align: center;
    padding: 24px 16px;
    margin-top: 40px;
    border-top: 1px solid var(--surface-color);
}

.app-footer p {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition-fast);
}

.b20-link:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

/* ===== UTILITIES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Celebration Animation */
@keyframes celebrate {
    0% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.2); }
    75% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1); }
}

.celebrate {
    animation: celebrate 0.5s ease;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.3s ease;
}

/* ===== SHARE MODAL ===== */
.share-modal {
    max-width: 360px;
}

.share-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--surface-color);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: pre-line;
    line-height: 1.6;
    margin-bottom: 20px;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: var(--border-radius-lg);
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-family);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.share-btn i {
    font-size: 1.75rem;
}

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.share-btn:active {
    transform: scale(0.96);
}

.share-whatsapp {
    background: #25D366;
    color: white;
}

.share-whatsapp:hover {
    background: #1ebe5c;
    color: white;
}

.share-facebook {
    background: #1877F2;
    color: white;
}

.share-facebook:hover {
    background: #0d65d9;
    color: white;
}

.share-copy {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 2px solid var(--surface-color);
}

.share-copy:hover {
    background: var(--primary-lighter);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
