    --menu-exercise-bg: #f97316; /* Laranja (Exercícios Interativo) */
    --menu-blocked-bg: #9ca3af;  /* Cinza (Bloqueado) */
}
body {
    font-family: 'Inter', sans-serif;
    /* Gradiente radial sutil - Dá vida ao fundo sem cansar */
    background: radial-gradient(ellipse at top, #e0e7ff 0%, #f0f4ff 30%, #ffffff 70%);
    background-attachment: fixed; /* Gradiente fixo ao scroll */
    color: var(--text-dark);
}
.hidden { display: none; }

/* ⚡ PADDING BOTTOM GLOBAL - Para evitar que barra inferior E botão voltar cubram conteúdo */
#view-niveis, #view-aulas, #view-lesson-menu, #view-training-menu,
#view-conteudo, #view-speaking-game, #view-chat-conversation,
#view-conversation-training, #view-configuracoes, #view-dashboard-vip,
#view-conversation-partner, #view-treinamento-pratico, #view-chat-aulas {
    padding-bottom: 130px !important; /* AUMENTADO: Espaço para barra (70px) + botão voltar (60px) */
    min-height: calc(100vh - 120px); /* Garante altura mínima */
}

/* Títulos das Seções (Atualizado) */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: left; /* Alinhado à esquerda */
    color: var(--primary-blue);
    margin: 0 0 24px 0; /* Margem ajustada */
}

/* --- TELA DE NÍVEIS E LISTA DE AULAS (Novo Estilo Card Horizontal) --- */
#niveis-grid, #aulas-lista, #training-level-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.level-card-new {
    display: flex;
    align-items: center; /* Centraliza verticalmente */
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.15s ease;
    cursor: pointer;
    user-select: none;
    border: none;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    min-height: 120px; /* Altura mínima */
}
.level-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    filter: brightness(1.05); /* Animação de brilho */
}
.level-card-new:active {
    transform: translateY(0px) scale(0.98);
    filter: brightness(0.95); /* Animação de clique */
}

.level-card-new .icon-container {
    margin-right: 20px;
    flex-shrink: 0;
}
.level-card-new .icon-container i {
    width: 40px;
    height: 40px;
    opacity: 0.9;
}
.level-card-new .text-container {
    flex-grow: 1;
}
.level-card-new .level-title {
    font-size: 1.75rem; /* 28px */
    font-weight: 800;
    line-height: 1.2;
    /* Texto com cor padrão (será colorido nos cards de treinamento) */
}
.level-card-new .level-subtitle {
    font-size: 1rem; /* 16px */
    font-weight: 500;
    opacity: 0.95; /* Levemente mais visível */
    /* Texto com cor padrão (será colorido nos cards de treinamento) */
}
.level-card-new .tag-container {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
}
/* Barra de progresso nos botões */
.level-card-new .progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}
.level-card-new .progress-bar-fill {
    height: 100%;
    /* Cor verde forte e vibrante */
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transition: width 0.3s ease;
}
.level-card-new .progress-percent {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%); /* Centraliza verticalmente */
    /* Badge cyan vibrante MAIOR e mais chamativo */
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border-radius: 99px;
    padding: 10px 18px; /* Maior que antes */
    font-size: 1.1rem; /* Maior que antes */
    font-weight: 900;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.5);
    z-index: 10;
    opacity: 1 !important; /* SEMPRE visível */
    visibility: visible !important; /* SEMPRE visível */
    display: block !important; /* SEMPRE visível */
    animation: badge-pulse 2s ease-in-out infinite; /* Animação sutil */
}

@keyframes badge-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 6px 20px rgba(6, 182, 212, 0.6);
    }
    50% {
        transform: translateY(-50%) scale(1.08);
        box-shadow: 0 8px 24px rgba(6, 182, 212, 0.8);
    }
}

/* Barra de progresso 3D ANIMADA para cards de nível e aula - MUITO MAIS VISÍVEL */
.level-card-new .progress-bar-3d,
.lesson-card .progress-bar-3d,
.lesson-menu-item-new .progress-bar-3d {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12px; /* AUMENTADO de 8px para 12px */
    background: rgba(0, 0, 0, 0.3); /* Fundo mais escuro */
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    box-shadow:
        inset 0 3px 6px rgba(0, 0, 0, 0.4), /* Sombra interna maior */
        0 -2px 8px rgba(0, 0, 0, 0.2); /* Sombra externa */
}

.level-card-new .progress-bar-3d-fill,
.lesson-card .progress-bar-3d-fill,
.lesson-menu-item-new .progress-bar-3d-fill {
    height: 100%;
    /* Gradiente MUITO mais vibrante e visível */
    background: linear-gradient(90deg,
        #06b6d4 0%,
        #14b8a6 25%,
        #06b6d4 50%,
        #0891b2 75%,
        #06b6d4 100%
    );
    background-size: 300% 100%; /* Maior para animação mais suave */
    border-radius: 0 0 16px 16px;
    box-shadow:
        0 -4px 16px rgba(6, 182, 212, 0.9), /* Brilho cyan FORTE */
        0 0 20px rgba(6, 182, 212, 0.7), /* Halo luminoso */
        inset 0 2px 4px rgba(255, 255, 255, 0.5), /* Brilho superior */
        inset 0 -1px 2px rgba(0, 0, 0, 0.3); /* Profundidade */
    position: relative;
    overflow: hidden;
    animation: progress-shimmer 2.5s ease-in-out infinite;
}

@keyframes progress-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Efeito de brilho 3D na barra - MUITO MAIS VISÍVEL */
.level-card-new .progress-bar-3d-fill::after,
.lesson-card .progress-bar-3d-fill::after,
.lesson-menu-item-new .progress-bar-3d-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%; /* Brilho mais largo */
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.7) 50%, /* MUITO mais brilhante */
        rgba(255, 255, 255, 0.3) 80%,
        transparent 100%
    );
    animation: progress-shine 3s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}
/* ATUALIZADO: Estilo Bloqueado */
.level-card-new.blocked {
    background-color: var(--menu-blocked-bg);
    opacity: 0.8;
    cursor: not-allowed;
}
.level-card-new.blocked:hover { transform: none; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); filter: none; }
.level-card-new.blocked:active { transform: none; }

/* ========================================
   🌟 EFEITO ESPECIAL PARA NÍVEL/AULA DISPONÍVEL 🌟
   ======================================== */

/* Container para efeito de borda animada */
.disponivel-destaque {
    position: relative;
    padding: 5px; /* Borda mais grossa */
    border-radius: 20px;
    background: linear-gradient(45deg,
        #ff0080, #ff8c00, #40e0d0, #ff0080,
        #ff8c00, #40e0d0, #ff0080);
    background-size: 400% 400%;
    animation: bordaGradiente 3s ease infinite;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.4),
                0 0 60px rgba(255, 140, 0, 0.3),
                0 0 90px rgba(64, 224, 208, 0.2);
    display: block; /* Garante que ocupe todo o espaço */
    width: 100%; /* Largura total */
}

/* Animação do gradiente girando */
@keyframes bordaGradiente {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efeito de pulso luminoso */
.disponivel-destaque::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 20px;
    background: linear-gradient(45deg,
        rgba(255, 0, 128, 0.5),
        rgba(255, 140, 0, 0.5),
        rgba(64, 224, 208, 0.5));
    filter: blur(20px);
    opacity: 0.7;
    animation: pulsoBrilho 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulsoBrilho {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Badge "DISPONÍVEL AGORA!" */
.badge-disponivel {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #ff0080, #ff8c00);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 0, 128, 0.4);
    animation: badgePulso 1.5s ease-in-out infinite;
    z-index: 10;
}

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

/* Ícone especial de estrela girando */
.icone-estrela-girando {
    position: absolute;
    top: -8px;
    left: 20px;
    font-size: 2rem;
    animation: estrelaCintilante 2s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    z-index: 10;
}

@keyframes estrelaCintilante {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 1; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 0.8; }
}

/* O card dentro do efeito de borda */
.disponivel-destaque .level-card-new {
    margin: 0;
    box-shadow: none; /* Remove sombra duplicada */
    width: 100%; /* Garante largura total */
    display: flex; /* Mantém o flex do card */
}


/* --- Botões de Aula (Estilo ANTIGO - Mantido APENAS para o QUIZ) --- */
 .btn-aula {
    display: block; width: 100%; padding: 16px; margin-bottom: 12px;
    border-radius: 12px; font-size: 1.1rem; font-weight: 600; text-align: center;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease, color 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
    cursor: pointer; user-select: none;
    background-color: #ffffff; color: #1e3a8a;
    border: 2px solid #3b82f6; /* Borda azul */
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}
.btn-aula:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #2563eb;
    color: #1e40af;
    filter: brightness(1.05);
}
.btn-aula:active {
     transform: translateY(1px) scale(0.98);
     box-shadow: 0 2px 5px rgba(0,0,0,0.1);
     background-color: #dbeafe;
     color: #1e3a8a;
     border-color: #2563eb;
     filter: brightness(0.95);
}

/* --- MENU DA AULA (Novo Estilo Card Horizontal Colorido) --- */
#lesson-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lesson-menu-item-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.15s ease;
    cursor: pointer;
    user-select: none;
    border: none;
    color: var(--text-white);
    min-height: 160px; /* Altura mínima */
    position: relative; /* Para posicionar badges e barras de progresso */
    overflow: visible; /* Para badges poderem ficar visíveis fora do card */
}
.lesson-menu-item-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    filter: brightness(1.05); /* Animação de brilho */
}
.lesson-menu-item-new:active {
    transform: translateY(0px) scale(0.98);
    filter: brightness(0.95); /* Animação de clique */
}

.lesson-menu-item-new .menu-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}
.lesson-menu-item-new .menu-title {
    font-size: 1.75rem; /* 28px */
    font-weight: 800;
    line-height: 1.2;
    /* Texto branco elegante com borda */
    color: white;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -1px -1px 0 rgba(0, 0, 0, 0.1),
        1px -1px 0 rgba(0, 0, 0, 0.1),
        -1px 1px 0 rgba(0, 0, 0, 0.1),
        1px 1px 0 rgba(0, 0, 0, 0.1);
}
.lesson-menu-item-new .menu-subtitle {
    font-size: 1rem; /* 16px */
    font-weight: 500;
    opacity: 0.95;
    margin-top: 4px;
    /* Texto branco com sombra sutil */
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
}

.lesson-menu-item-new.disabled {
    background-color: #e5e7eb; /* Cinza */
    color: #6b7280;
    cursor: not-allowed;
}
.lesson-menu-item-new.disabled:hover { transform: none; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); filter: none; }
.lesson-menu-item-new.disabled:active { transform: none; }

/* Cores do Menu */
.menu-treinamento { background-color: var(--menu-training-bg); }
.menu-vocab { background-color: var(--menu-vocab-bg); }
.menu-frases { background-color: var(--menu-phrase-bg); }
.menu-gramatica { background-color: var(--menu-grammar-bg); }
.menu-videos { background-color: var(--menu-video-bg); }
/* REMOVIDO: .menu-exercicios usa gradiente definido abaixo (linhas 800-813) */
.menu-listening { background-color: #06b6d4; } /* Ciano para Listening */
.menu-quiz-final { background-color: #fbbf24; } /* Dourado para Quiz Final */

/* Quiz Final e Listening Bloqueado */
.menu-quiz-final.blocked,
.menu-listening.blocked {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    opacity: 0.85;
    position: relative;
    border: 3px dashed #d1d5db;
    animation: pulse-locked 2s ease-in-out infinite;
}

@keyframes pulse-locked {
    0%, 100% {
        opacity: 0.85;
        border-color: #d1d5db;
    }
    50% {
        opacity: 0.95;
        border-color: #fbbf24;
    }
}

.menu-quiz-final.blocked:hover,
.menu-listening.blocked:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(251, 191, 36, 0.3);
    filter: brightness(1.1);
}

.menu-quiz-final.unlocked {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    cursor: pointer;
    position: relative;
    animation: glow-golden 1.5s ease-in-out infinite;
    border: 3px solid #fbbf24;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.6), 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes glow-golden {
    0%, 100% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.8), 0 8px 30px rgba(0, 0, 0, 0.2);
    }
}

.menu-listening.unlocked {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    cursor: pointer;
    position: relative;
    animation: glow-cyan 1.5s ease-in-out infinite;
    border: 3px solid #06b6d4;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6), 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes glow-cyan {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.4), 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.8), 0 8px 30px rgba(0, 0, 0, 0.2);
    }
}

/* Selo Especial para Conteúdos Premium */
.special-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.7);
    z-index: 10;
    animation: badge-glow 1.5s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes badge-glow {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    }
    50% {
        transform: translateY(-4px) scale(1.08);
        box-shadow: 0 10px 35px rgba(16, 185, 129, 1);
    }
}

.special-badge.locked {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
    animation: badge-shake 2.5s ease-in-out infinite;
}

@keyframes badge-shake {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    10%, 30% {
        transform: rotate(-8deg) scale(1.05);
    }
    20%, 40% {
        transform: rotate(8deg) scale(1.05);
    }
}

/* --- Botão Voltar FLUTUANTE - Sempre Visível e Chamativo! --- */
.btn-voltar {
    position: fixed; /* Fixo na tela, não move ao rolar */
    bottom: 110px; /* AUMENTADO: Mais espaço do fundo (90px -> 110px) */
    right: 16px; /* MOVIDO PARA DIREITA */
    z-index: 999; /* Acima de tudo */

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px; /* Reduzido */

    /* Visual chamativo - gradiente roxo */
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;

    font-weight: 700;
    font-size: 0.75rem; /* REDUZIDO para mobile */

    padding: 10px 14px; /* MENOR para mobile */
    border-radius: 99px; /* Totalmente arredondado */
    border: 2px solid rgba(255, 255, 255, 0.3); /* Borda mais fina */

    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5),
                0 0 0 0 rgba(139, 92, 246, 0.4);

    cursor: pointer;
    user-select: none;

    transition: all 0.3s ease;
    animation: pulseBackButton 2s ease-in-out infinite;
}

/* Desktop: Botão maior */
@media (min-width: 768px) {
    .btn-voltar {
        font-size: 0.9rem;
        padding: 12px 18px;
    }
}

@keyframes pulseBackButton {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5),
                    0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.7),
                    0 0 0 8px rgba(139, 92, 246, 0.2);
    }
}

.btn-voltar:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.8);
}

.btn-voltar:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.6);
}

.btn-voltar i {
    width: 18px;
    height: 18px;
    stroke-width: 3px; /* Seta mais grossa */
}

/* Remove margem do H1 quando o botão voltar estiver presente */
.btn-voltar + .section-title {
    margin-top: 0;
}

/* ===================================================
   🎨 NÍVEIS DE VÍDEOS E CHATS - Headers Elegantes
   =================================================== */
.nivel-section {
    margin-bottom: 32px;
}

.nivel-header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    gap: 16px;
}

.nivel-numero {
    font-size: 3rem;
    font-weight: 900;
    /* Texto branco com borda preta elegante */
    color: white;
    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.4),
        -1px -1px 0 rgba(0, 0, 0, 0.15),
        1px -1px 0 rgba(0, 0, 0, 0.15),
        -1px 1px 0 rgba(0, 0, 0, 0.15),
        1px 1px 0 rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.nivel-info {
    flex: 1;
}

.nivel-titulo {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
    /* Texto branco com borda preta elegante */
    color: white;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -1px -1px 0 rgba(0, 0, 0, 0.1),
        1px -1px 0 rgba(0, 0, 0, 0.1),
        -1px 1px 0 rgba(0, 0, 0, 0.1),
        1px 1px 0 rgba(0, 0, 0, 0.1);
}

.nivel-aulas {
    font-size: 1.1rem;
    font-weight: 600;
    /* Texto branco com sombra sutil */
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

/* Grid de aulas dentro de cada nível */
.aulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 0 8px;
}

/* ===================================================
   🎧 CARD DE LISTENING - Compacto para Mobile
   =================================================== */
.quiz-final-header {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    padding: 16px !important; /* Reduzido de 24px */
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px !important; /* Reduzido de 24px */
    color: white;
}

.quiz-final-header h2 {
    font-size: 1.5rem !important; /* Reduzido de 2rem */
    font-weight: 800;
    margin-bottom: 6px !important; /* Reduzido de 8px */
}

.quiz-final-header p {
    font-size: 0.95rem !important; /* Reduzido de 1.1rem */
    margin-top: 4px !important; /* Reduzido de 8px */
}

/* Desktop: Card maior */
@media (min-width: 768px) {
    .quiz-final-header {
        padding: 24px !important;
        margin-bottom: 24px !important;
    }

    .quiz-final-header h2 {
        font-size: 2rem !important;
        margin-bottom: 8px !important;
    }

    .quiz-final-header p {
        font-size: 1.1rem !important;
        margin-top: 8px !important;
    }
}

/* ===================================================
   📚 CARDS DE CONSULTA - Fundos Coloridos com Texto Branco!
   =================================================== */
/* Vocabulário - Fundo Verde */
.menu-vocab {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; /* Verde vibrante */
}

.menu-vocab .menu-title {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important; /* Sombra sutil */
}

.menu-vocab .menu-subtitle {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15) !important;
    opacity: 0.95;
}

/* Frases - Fundo Azul */
.menu-frases {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important; /* Azul vibrante */
}

.menu-frases .menu-title {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.menu-frases .menu-subtitle {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15) !important;
    opacity: 0.95;
}

/* Gramática - Fundo Roxo */
.menu-gramatica {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important; /* Roxo vibrante */
}

.menu-gramatica .menu-title {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.menu-gramatica .menu-subtitle {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15) !important;
    opacity: 0.95;
}

/* Treinamento Interativo - Fundo Laranja/Ouro */
.menu-treinamento {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important; /* Laranja vibrante */
}

.menu-treinamento .menu-title {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.menu-treinamento .menu-subtitle {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15) !important;
    opacity: 0.95;
}

/* Exercícios Interativo - Fundo Vermelho/Rosa */
.lesson-menu-item-new.menu-exercicios {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; /* Vermelho vibrante */
}

.lesson-menu-item-new.menu-exercicios .menu-title {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.lesson-menu-item-new.menu-exercicios .menu-subtitle {
    color: white !important; /* Texto branco */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15) !important;
    opacity: 0.95;
}

/* 🎨 GRADIENTES COLORIDOS PARA OS 3 NÍVEIS DO TREINAMENTO INTERATIVO */
/* Esses seletores usam #training-level-grid para sobrescrever o style inline */

/* Nível 1: Vocabulário - Verde vibrante */
#training-level-grid .level-card-new:nth-child(1) {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

#training-level-grid .level-card-new:nth-child(1) .level-title,
#training-level-grid .level-card-new:nth-child(1) .level-subtitle {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Nível 2: Frases - Azul vibrante */
#training-level-grid .level-card-new:nth-child(2) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

#training-level-grid .level-card-new:nth-child(2) .level-title,
#training-level-grid .level-card-new:nth-child(2) .level-subtitle {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* Nível 3: Gramática - Roxo vibrante */
#training-level-grid .level-card-new:nth-child(3) {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

#training-level-grid .level-card-new:nth-child(3) .level-title,
#training-level-grid .level-card-new:nth-child(3) .level-subtitle {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* --- DIV de Conteúdo (Estilo Clássico) --- */
#conteudo-aula {
    background-color: #ffffff; border-radius: 16px; padding: 20px;
    margin-top: 10px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    position: relative; /* Para o placar */
    overflow: hidden; /* Para o slider do quiz */
}

/* === ESTILOS DOS CARDS DE VOCABULÁRIO (Lista Antiga) === */
 .vocab-card {
     display: flex;
     align-items: center;
     background-color: #ffffff; border-radius: 12px;
     box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
     padding: 12px 15px; margin-bottom: 12px; overflow: hidden;
     transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, filter 0.15s ease;
     cursor: pointer; border: 1px solid #e5e7eb; user-select: none;
 }
 /* NOVO: Card de Revisão (para o slide) */
 .quiz-question .vocab-card.review-card {
     margin-top: 10px;
     margin-bottom: 10px;
     cursor: default;
     background-color: var(--menu-training-bg);
     color: white;
 }
 .quiz-question .vocab-card.review-card:hover { transform: none; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); }
 .quiz-question .vocab-card.review-card .vocab-image {
     background-color: rgba(255,255,255,0.2);
     color: white;
 }
 .quiz-question .vocab-card.review-card .english {
     color: #1e3a8a !important; /* AZUL ESCURO - Visível em fundo branco */
 }
 .quiz-question .vocab-card.review-card .portuguese {
     color: #6b7280 !important; /* CINZA ESCURO - Visível em fundo branco */
     opacity: 0.9;
 }


 .vocab-card:hover { transform: translateY(-4px); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1); }
 .vocab-card.selected { background-color: #E0F2FE; border-color: #3B82F6; }
 .vocab-card:active {
     transform: scale(0.99);
     box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
     filter: brightness(0.95); /* Animação de clique */
 }
 /* ATUALIZADO: EMOJI (não mais imagem) */
 .vocab-image {
     width: 60px; height: 60px; margin-right: 12px;
     flex-shrink: 0; display: flex; align-items: center; justify-content: center;
     font-size: 2.75rem; line-height: 1;
     background-color: #f0f4f8; border-radius: 10px;
 }
 .vocab-image.slide-image { /* EMOJI no slide de treino */
    width: 100%;
    height: 120px;
    font-size: 3.5rem;
    margin-bottom: 10px;
    margin-right: 0;
    background-color: #e5e7eb;
 }

 @keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
 .animate-emoji { animation: pop 0.3s cubic-bezier(0.25, 0.1, 0.25, 1); }
 .vocab-text { flex-grow: 1; min-width: 0;}
 .vocab-text .english-line { display: flex; align-items: center; }
 .vocab-text .english { font-size: 1.4rem; font-weight: 700; color: #1e3a8a; line-height: 1.2; margin-right: auto; }
 .vocab-text .portuguese { font-size: 0.95rem; font-weight: 500; color: #6b7280; margin-top: 2px; }

/* --- Botões de Áudio (REVERTIDOS para o estilo DISCRETO) --- */
.audio-buttons { display: flex; align-items: center; gap: 6px; margin-left: 8px; flex-shrink: 0; }
/* Botões de áudio do slide de revisão/apresentação */
.quiz-question .audio-buttons {
    margin-left: 0;
    margin-bottom: 8px;
    justify-content: center; /* Centraliza os botões */
}

.speak-button {
    border: none; border-radius: 8px; cursor: pointer; color: #ffffff;
    transition: color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, filter 0.15s ease;
    user-select: none; line-height: 1; box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}
.speak-button.slow { font-size: 1.1rem; padding: 4px 7px; background-color: #fb923c; border-bottom: 2px solid #f97316; }
.speak-button.normal { font-size: 1.4rem; padding: 5px 8px; background-color: #60a5fa; border-bottom: 2px solid #3b82f6; }
body.audio-active .speak-button.slow:hover { background-color: #fdba74; filter: brightness(1.05); }
body.audio-active .speak-button.normal:hover { background-color: #93c5fd; filter: brightness(1.05); }
.speak-button:active {
    transform: translateY(1px) scale(0.95);
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.15);
    border-bottom-width: 1px;
    filter: brightness(0.9); /* Animação de clique */
}

/* --- Estilos para a lista de frases e gramática (Layout Clássico) --- */
 .phrase-list { list-style: none; padding: 0; margin: 0; }
 .phrase-item { background-color: #ffffff; border-radius: 10px; padding: 12px 15px; border: 1px solid #e5e7eb; transition: background-color 0.3s ease, filter 0.15s ease; margin-bottom: 10px; }
 .phrase-item:active {
     filter: brightness(0.95); /* Animação de clique */
 }
 .phrase-item .english-line { display: flex; align-items: center; margin-bottom: 3px; }
 .phrase-item .english-text {
     font-size: 1.1rem; font-weight: 600; color: #1e3a8a;
     flex-grow: 1; margin-right: 6px; /* Espaço para os botões */
     transition: background-color 0.3s ease, color 0.3s ease;
     padding: 1px 3px; border-radius: 3px;
 }
 .phrase-item .portuguese-text { font-size: 0.9rem; color: #6b7280; }
 .phrase-item .audio-buttons { gap: 4px; margin-left: 6px; }
 .phrase-item .speak-button.slow { font-size: 1.1rem; padding: 4px 7px; }
 .phrase-item .speak-button.normal { font-size: 1.4rem; padding: 5px 8px; }

 .speaking-highlight { background-color: #fef9c3; color: #1e3a8a !important; }
 .grammar-heading { font-size: 1.4rem; font-weight: 700; color: #1e40af; margin-bottom: 10px; margin-top: 20px; border-bottom: 2px solid #dbeafe; padding-bottom: 6px; }
 .grammar-heading:first-of-type { margin-top: 0; }

 /* --- Estilos para os Vídeos (Layout Clássico) --- */
 .video-wrapper { margin-bottom: 24px; }
 .video-title { font-size: 1.2rem; font-weight: 700; color: #1e40af; margin-bottom: 8px; }
 .video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #000; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
 .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

 /* NOVO: Placeholder "Em Breve" para vídeos */
 .video-wrapper-blocked {
    background-color: #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #6b7280;
    margin-bottom: 24px;
 }
 .video-wrapper-blocked .video-title {
    color: #4b5563;
 }
 .video-wrapper-blocked p {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 8px;
 }

 /* --- Estilo para Mensagem de Bloqueio (ATUALIZADA) --- */
 #block-message { text-align: center; padding: 30px; background-color: #fffbeb; border: 1px solid #fef3c7; border-radius: 12px; color: #b45309; }
 #block-message h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
 #block-message p { font-size: 1.1rem; margin-bottom: 15px; }
 #block-message a { color: #1e40af; font-weight: 600; text-decoration: underline; }

/* --- ESTILOS DO QUIZ E VOCABULÁRIO INTERATIVO --- */
#score-container, #vocab-progress-container {
    position: sticky; top: 0; background-color: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px); padding: 10px 20px;
    margin: -20px -20px 20px -20px; border-bottom: 1px solid #e5e7eb;
    z-index: 10;
    position: relative;
}
.progress-percent {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 0.9rem;
    font-weight: 800;
    /* Badge cyan vibrante igual aos cards */
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    border-radius: 99px;
    padding: 4px 10px;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 12;
    opacity: 1 !important; /* SEMPRE visível */
    visibility: visible !important; /* SEMPRE visível */
    display: block !important; /* SEMPRE visível */
    transition: transform 0.3s ease;
}

#score-display {
     font-size: 1.1rem; font-weight: 700;
     color: var(--primary-blue);
     text-align: right;
     margin-bottom: 8px;
     display: block;
     transition: transform 0.3s ease;
}
@keyframes score-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--accent-orange); }
    100% { transform: scale(1); }
}
.score-updated {
    animation: score-pop 0.3s ease-in-out;
}

#quiz-progress-bar, #vocab-progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}
#quiz-progress-bar-inner, #vocab-progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: var(--accent-orange);
    transition: width 0.3s ease-in-out;
}
#vocab-progress-bar-inner {
    background-color: var(--menu-training-bg);
}

/* Slider do Quiz */
#quiz-slider-wrapper {
    overflow: hidden;
    width: 100%;
}
#quiz-slider {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}
.quiz-question {
    border-bottom: none;
    padding-bottom: 10px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    padding-left: 4px;
    padding-right: 4px;
    max-height: none; /* Remove limite de altura */
    overflow-y: visible; /* Remove scroll automático */
    display: flex;
    flex-direction: column;
}
/* O slide de apresentação é centralizado */
.quiz-question.slide-apresentacao {
    justify-content: flex-start; /* Alinha ao topo */
    text-align: center;
    min-height: auto; /* Remove altura mínima forçada */
    gap: 8px; /* Espaçamento compacto para botão ficar visível */
}
.vocab-title-slide {
    font-size: 1.6rem; /* 25.6px */
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.slide-apresentacao .btn-continuar {
    margin-top: 15px; /* Botão próximo ao conteúdo - sem necessidade de scroll */
}


.quiz-level-highlight {
    color: var(--accent-orange);
    font-weight: 700;
}

 .quiz-instruction { font-size: 1rem; color: var(--text-light); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
 .quiz-question p { font-size: 1.15rem; font-weight: 600; color: var(--text-dark); margin-bottom: 12px; }
 .quiz-options { display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; }
 .quiz-options.vertical { flex-direction: column; gap: 8px; }
 .quiz-option {
     background-color: #ffffff; border: 2px solid #d1d5db; color: var(--primary-blue);
     font-weight: 500; padding: 10px 16px; border-radius: 8px;
     cursor: pointer; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.04);
     width: 100%; text-align: left;
 }
 .quiz-options:not(.vertical) .quiz-option { width: auto; }
 .quiz-option:hover {
     background-color: #f0f4f8;
     border-color: #9ca3af;
     filter: brightness(1.05);
 }
 .quiz-option:active {
     filter: brightness(0.95);
     transform: scale(0.98);
 }
 .quiz-option:disabled { opacity: 0.8; cursor: not-allowed; }
 .quiz-option.correct {
     background-color: var(--correct-green-bg); border-color: var(--correct-green-border);
     color: var(--correct-green-text); font-weight: 600;
 }
 .quiz-option.incorrect {
     background-color: var(--incorrect-red-bg); border-color: var(--incorrect-red-border);
     color: var(--incorrect-red-text); font-weight: 600;
 }
 /* Animações de feedback */
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-3px); } 40%, 60% { transform: translateX(3px); } }
.shake { animation: shake 0.6s ease-in-out; }
@keyframes flash-green { 0% { background-color: var(--correct-green-bg); } 50% { background-color: #ffffff; } 100% { background-color: var(--correct-green-bg); } }
.flash-green { animation: flash-green 0.6s ease; }
 .feedback-message { font-size: 1.1rem; font-weight: 600; margin-top: 10px; display: block; } /* Tamanho aumentado */
 .feedback-message.correct { color: var(--correct-green-text); }
 .feedback-message.incorrect { color: var(--incorrect-red-text); }

 @keyframes points-pop {
     0% { transform: translateY(0) scale(1); opacity: 1; }
     50% { transform: translateY(-20px) scale(1.5); opacity: 1; }
     100% { transform: translateY(-40px) scale(2); opacity: 0; }
 }
 .points-pop {
     display: inline-block;
     color: var(--correct-green-text);
     font-weight: 800;
     font-size: 1.25rem; /* Maior */
     animation: points-pop 0.8s ease-out forwards;
     position: absolute; /* Para não empurrar o layout */
     margin-left: 8px;
 }

 .quiz-input {
     width: 100%; padding: 10px 14px; border-radius: 8px;
     border: 2px solid #d1d5db; font-size: 1rem; margin-bottom: 10px;
 }
 .quiz-input:focus { outline: none; border-color: var(--secondary-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); }
 .quiz-input.correct { border-color: var(--correct-green-border); background-color: var(--correct-green-bg); }
 .quiz-input.incorrect { border-color: var(--incorrect-red-border); background-color: var(--incorrect-red-bg); }

 /* Botão de Verificar / Continuar */
 .btn-check-answer {
     background-color: var(--secondary-blue); color: var(--text-white);
     border: none; padding: 10px 16px; border-radius: 8px; font-size: 1rem; font-weight: 600;
     cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
     transition: background-color 0.2s ease, transform 0.1s ease, filter 0.15s ease;
     margin-top: auto; /* Empurra para baixo no slide */
 }
 .btn-check-answer:hover {
     background-color: var(--primary-blue);
     filter: brightness(1.05);
 }
 .btn-check-answer:active {
     transform: scale(0.98);
     filter: brightness(0.95);
 }
 .btn-check-answer:disabled { background-color: #9ca3af; cursor: not-allowed; }

 /* Botão Continuar específico (para slides de apresentação) */
 .btn-continuar {
     background-color: var(--accent-orange);
 }
 .btn-continuar:hover {
     background-color: #f97316;
 }


 .quiz-answer {
     display: block; margin-top: 10px; padding: 10px;
     background-color: #fef9c3; color: #713f12;
     border-radius: 8px; font-weight: 500;
 }

 /* TELA FINAL ATUALIZADA */
 #final-score-screen {
     text-align: center; padding: 40px 20px;
     position: relative; /* Necessário para os fogos */
 }
 #final-score-screen > * { /* Garante que o conteúdo fique sobre os fogos */
     position: relative;
     z-index: 2;
 }
 #final-score-screen h2 { font-size: 2.5rem; font-weight: 800; color: var(--primary-blue); line-height: 1.2; }
 #final-score-screen p { font-size: 1.25rem; color: var(--text-dark); margin-top: 10px; }
 #final-score-screen #score-value { font-size: 3.5rem; font-weight: 800; color: var(--accent-orange); margin: 20px 0; }

/* NOVO: Lista de Revisão de Erros */
.review-list {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
}
.review-list h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}
.review-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.review-list li {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
}
.review-list li p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}
.review-list li span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--correct-green-text);
}

/* NOVO: Fogos de Artifício (z-index corrigido) */
#fireworks-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; /* Deixa clicar através */
    overflow: hidden;
    z-index: 1; /* CORRIGIDO: Fica sobre o fundo, mas atrás do texto */
}
.firework {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    opacity: 0;
    /* Animação mais vibrante e chamativa */
    animation: firework-explode 1.5s ease-out forwards;
    /* Efeito de brilho forte */
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
}

@keyframes firework-explode {
    0% {
        transform: translateY(100px) scale(0.2);
        opacity: 0;
    }
    20% {
        transform: translateY(0) scale(1.5);
        opacity: 1;
    }
    40% {
        transform: translateY(-30px) scale(2);
        opacity: 1;
    }
    60% {
        transform: translateY(-50px) scale(2.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100px) scale(0.5) rotate(360deg);
        opacity: 0;
    }
}

/* Cores VIBRANTES e chamativas para os fogos */
.firework:nth-child(8n+1) {
    background-color: #fbbf24; /* Amarelo ouro */
    box-shadow: 0 0 25px #fbbf24, 0 0 50px #fbbf24;
}
.firework:nth-child(8n+2) {
    background-color: #3b82f6; /* Azul vibrante */
    box-shadow: 0 0 25px #3b82f6, 0 0 50px #3b82f6;
}
.firework:nth-child(8n+3) {
    background-color: #10b981; /* Verde esmeralda */
    box-shadow: 0 0 25px #10b981, 0 0 50px #10b981;
}
.firework:nth-child(8n+4) {
    background-color: #ec4899; /* Rosa pink */
    box-shadow: 0 0 25px #ec4899, 0 0 50px #ec4899;
}
.firework:nth-child(8n+5) {
    background-color: #f97316; /* Laranja */
    box-shadow: 0 0 25px #f97316, 0 0 50px #f97316;
}
.firework:nth-child(8n+6) {
    background-color: #8b5cf6; /* Roxo */
    box-shadow: 0 0 25px #8b5cf6, 0 0 50px #8b5cf6;
}
.firework:nth-child(8n+7) {
    background-color: #06b6d4; /* Ciano */
    box-shadow: 0 0 25px #06b6d4, 0 0 50px #06b6d4;
}
.firework:nth-child(8n+8) {
    background-color: #ef4444; /* Vermelho */
    box-shadow: 0 0 25px #ef4444, 0 0 50px #ef4444;
}

/* --- HEADER COM LOGIN E MODO ESCURO --- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--card-bg);
    border-bottom: 2px solid var(--primary-blue);
    padding: 12px 20px;
    margin: -16px -16px 24px -16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 55px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-greeting {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.logout-btn:hover {
    background-color: rgba(30, 58, 138, 0.1);
}

/* Botão APP Destacado com Efeito 3D */
.theme-toggle-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 3px solid #ffffff;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: pulseApp 2s ease-in-out infinite;
    position: relative;
}

.theme-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.theme-toggle-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

@keyframes pulseApp {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 6px 30px rgba(16, 185, 129, 0.7), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(16, 185, 129, 0.2);
    }
}

/* Animação Badge IA REAL */
@keyframes pulseBadge {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(139, 92, 246, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 0 0 6px rgba(139, 92, 246, 0.3);
        transform: scale(1.05);
    }
}

/* Animação Botão Flutuante */
@keyframes pulseButton {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6), inset 0 -4px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 10px 35px rgba(139, 92, 246, 0.9), inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(139, 92, 246, 0.2);
    }
}

/* --- MODAL DE LOGIN --- */
.login-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.login-box {
    background-color: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

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

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* Abas de Login/Cadastro */
.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

/* --- DARK MODE --- */
body.dark-mode {
    --background-light: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-dark: #f3f4f6;
    --text-light: #d1d5db;
    --primary-blue: #60a5fa;
    --secondary-blue: #3b82f6;
}

body.dark-mode .app-header {
    border-bottom-color: #60a5fa;
}

body.dark-mode .login-box {
    background-color: #2d2d2d;
}

body.dark-mode .login-input {
    background-color: #1a1a1a;
    border-color: #404040;
    color: #f3f4f6;
}

body.dark-mode .level-card-new,
body.dark-mode .vocab-card,
body.dark-mode .phrase-item {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}


/* ========================================
   SPEAKING GAME STYLES
   ======================================== */
.menu-speaking-game { background-color: #8b5cf6; } /* Purple for Speaking Game */

/* Speaking Game Container - adapted for integration */
#view-speaking-game .game-container {
    background: white;
    border-radius: 20px; /* REDUZIDO de 24px */
    padding: 20px; /* REDUZIDO de 40px */
    max-width: 700px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin: 0 auto;
}

/* Tela Inicial */
#view-speaking-game .start-screen {
    text-align: center;
}

#view-speaking-game .game-title {
    font-size: 2rem; /* REDUZIDO de 3rem */
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px; /* REDUZIDO de 10px */
}

#view-speaking-game .game-icon {
    font-size: 3rem; /* REDUZIDO de 5rem */
    margin: 10px 0; /* REDUZIDO de 20px */
    animation: pulse-game-icon 2s ease-in-out infinite;
}

@keyframes pulse-game-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#view-speaking-game .game-subtitle {
    font-size: 1.1rem; /* REDUZIDO de 1.3rem */
    color: #666;
    margin-bottom: 15px; /* REDUZIDO de 30px */
}

#view-speaking-game .instructions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 15px; /* REDUZIDO de 25px */
    margin: 15px 0; /* REDUZIDO de 30px */
    text-align: left;
}

#view-speaking-game .instructions h3 {
    color: #667eea;
    margin-bottom: 10px; /* REDUZIDO de 15px */
    font-size: 1rem; /* REDUZIDO de 1.2rem */
}

#view-speaking-game .instructions ol {
    padding-left: 16px; /* REDUZIDO de 20px */
    line-height: 1.4; /* REDUZIDO de 1.8 */
    color: #374151;
    font-size: 0.9rem; /* ADICIONADO - texto menor */
}

#view-speaking-game .instructions li {
    margin: 6px 0; /* REDUZIDO de 10px */
}

#view-speaking-game .warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    color: #92400e;
    font-weight: 600;
    text-align: center;
}

/* Tela de Jogo */
#view-speaking-game .game-screen {
    display: none;
}

#view-speaking-game .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e5e7eb;
}

#view-speaking-game .score-display {
    font-size: 1.8rem;
    font-weight: 900;
    color: #667eea;
}

#view-speaking-game .progress-text {
    font-size: 1.2rem;
    color: #6b7280;
    font-weight: 600;
}

#view-speaking-game .challenge-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

#view-speaking-game .challenge-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#view-speaking-game .challenge-text {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

#view-speaking-game .challenge-hint {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

#view-speaking-game .mic-section {
    text-align: center;
    margin: 40px 0;
}

#view-speaking-game .mic-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 4rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    transition: all 0.3s;
    position: relative;
}

#view-speaking-game .mic-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6);
}

#view-speaking-game .mic-button:active {
    transform: scale(0.95);
}

#view-speaking-game .mic-button.listening {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse-mic-game 1s ease-in-out infinite;
}

@keyframes pulse-mic-game {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 15px 40px rgba(239, 68, 68, 0.8); }
}

#view-speaking-game .mic-status {
    font-size: 1.3rem;
    margin-top: 20px;
    font-weight: 700;
    color: #374151;
    min-height: 30px;
}

#view-speaking-game .mic-status.listening {
    color: #ef4444;
    animation: blink-game 1s ease-in-out infinite;
}

@keyframes blink-game {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#view-speaking-game .recognized-text {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    min-height: 60px;
    font-size: 1.3rem;
    color: #374151;
    font-weight: 600;
    border: 3px dashed #d1d5db;
}

#view-speaking-game .recognized-text.correct {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
    animation: success-pulse-game 0.5s;
}

#view-speaking-game .recognized-text.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
    animation: shake-game 0.5s;
}

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

@keyframes shake-game {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

#view-speaking-game .help-section {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

#view-speaking-game .help-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s;
}

#view-speaking-game .help-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

#view-speaking-game .btn-skip {
    background: #e5e7eb;
    color: #6b7280;
    margin-left: 10px;
}

#view-speaking-game .btn-skip:hover {
    background: #d1d5db;
}

/* Resultado */
#view-speaking-game .result-screen {
    display: none;
    text-align: center;
}

#view-speaking-game .result-icon {
    font-size: 6rem;
    margin: 20px 0;
    animation: bounce-game 1s ease-in-out infinite;
}

@keyframes bounce-game {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

#view-speaking-game .result-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: #1e3a8a;
}

#view-speaking-game .result-score {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
}

#view-speaking-game .result-stats {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
    text-align: left;
}

#view-speaking-game .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 2px solid #e5e7eb;
    font-size: 1.1rem;
}

#view-speaking-game .stat-item:last-child {
    border-bottom: none;
}

#view-speaking-game .stat-label {
    color: #6b7280;
    font-weight: 600;
}

#view-speaking-game .stat-value {
    color: #374151;
    font-weight: 900;
}

/* Mobile */
@media (max-width: 640px) {
    #view-speaking-game .game-container {
        padding: 24px;
    }

    #view-speaking-game .game-title {
        font-size: 2.2rem;
    }

    #view-speaking-game .challenge-text {
        font-size: 1.8rem;
    }

    #view-speaking-game .mic-button {
        width: 120px;
        height: 120px;
        font-size: 3rem;
    }
}

/* ===========================================
   CONVERSATION TRAINING - STYLES
=========================================== */
#view-conversation-training .game-container {
    background: white;
    border-radius: 16px;
    padding: 16px; /* REDUZIDO de 20px */
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#view-conversation-training .start-screen {
    text-align: center;
}

#view-conversation-training .game-title {
    font-size: 1.5rem; /* REDUZIDO de 1.8rem */
    font-weight: 700;
    color: #10b981;
    margin-bottom: 8px; /* REDUZIDO de 10px */
}

#view-conversation-training .game-icon {
    font-size: 2.5rem; /* REDUZIDO de 3rem */
    margin: 6px 0; /* REDUZIDO de 10px */
}

#view-conversation-training .game-subtitle {
    font-size: 0.9rem; /* REDUZIDO de 1rem */
    color: #6b7280;
    margin-bottom: 10px; /* REDUZIDO de 15px */
}

#view-conversation-training .instructions {
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 12px; /* REDUZIDO de 15px */
    margin: 10px 0; /* REDUZIDO de 15px */
    text-align: left;
}

#view-conversation-training .instructions h3 {
    color: #10b981;
    font-size: 0.95rem; /* REDUZIDO de 1.1rem */
    margin-bottom: 6px; /* REDUZIDO de 8px */
}

#view-conversation-training .instructions ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid; /* GRID LAYOUT */
    grid-template-columns: 1fr 1fr; /* 2 COLUNAS */
    gap: 6px; /* Espaçamento entre items */
}

#view-conversation-training .instructions li {
    padding: 4px 0; /* REDUZIDO de 5px */
    font-size: 0.8rem; /* REDUZIDO de 0.9rem */
    color: #374151;
}

#view-conversation-training .warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 10px;
    color: #92400e;
    font-weight: 600;
    font-size: 0.85rem;
}

#view-conversation-training .game-screen {
    display: none;
}

#view-conversation-training .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    color: white;
}

#view-conversation-training .score-display {
    font-size: 1.2rem;
    font-weight: 700;
}

#view-conversation-training .progress-text {
    font-size: 1rem;
    font-weight: 600;
}

#view-conversation-training .challenge-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 3px solid #10b981;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

#view-conversation-training .challenge-label {
    font-size: 0.9rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 8px;
}

#view-conversation-training .challenge-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #065f46;
    margin: 10px 0;
}

#view-conversation-training .challenge-hint {
    font-size: 0.95rem;
    color: #10b981;
    font-weight: 600;
    margin-top: 8px;
}

#view-conversation-training .mic-section {
    text-align: center;
    margin: 15px 0;
}

#view-conversation-training .mic-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 4px solid #d1fae5;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#view-conversation-training .mic-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
}

#view-conversation-training .mic-button.listening {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #fee2e2;
    animation: pulse-conversation 1.5s infinite;
}

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

#view-conversation-training .mic-status {
    margin-top: 15px;
    font-size: 1.2rem;
    color: #6b7280;
    font-weight: 600;
}

#view-conversation-training .mic-status.listening {
    color: #ef4444;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#view-conversation-training .recognized-text {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    min-height: 50px;
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
    border: 2px dashed #d1d5db;
}

#view-conversation-training .recognized-text.correct {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
    animation: success-pulse-conversation 0.5s;
}

#view-conversation-training .recognized-text.partial {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    animation: warning-pulse-conversation 0.5s;
}

#view-conversation-training .recognized-text.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
    animation: shake-conversation 0.5s;
}

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

@keyframes warning-pulse-conversation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes shake-conversation {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

#view-conversation-training .help-section {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 10px;
    margin: 12px 0;
    text-align: center;
}

#view-conversation-training .help-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin: 3px;
    transition: all 0.3s;
}

#view-conversation-training .help-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

#view-conversation-training .btn-skip {
    background: #e5e7eb;
    color: #6b7280;
    margin-left: 10px;
}

#view-conversation-training .btn-skip:hover {
    background: #d1d5db;
}

#view-conversation-training .result-screen {
    display: none;
    text-align: center;
    padding: 15px;
}

#view-conversation-training .result-icon {
    font-size: 3.5rem;
    margin: 10px 0;
}

#view-conversation-training .result-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #10b981;
    margin: 10px 0;
}

#view-conversation-training .result-score {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
    margin: 12px 0;
}

#view-conversation-training .result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 15px 0;
}

#view-conversation-training .stat-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px;
    border: 2px solid #e5e7eb;
}

#view-conversation-training .stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
}

#view-conversation-training .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    #view-conversation-training .game-container {
        padding: 15px;
    }

    #view-conversation-training .game-title {
        font-size: 1.5rem;
    }

    #view-conversation-training .challenge-text {
        font-size: 1.3rem;
    }

    #view-conversation-training .mic-button {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }

    #view-conversation-training .result-stats {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   CONFIGURAÇÕES - STYLES
=========================================== */

/* Garantir que configurações não apareça em lugar nenhum */
#view-configuracoes.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.settings-btn {
    background: #5D5CDE;
    border: 2px solid #5D5CDE;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(93, 92, 222, 0.3);
}

.settings-btn:hover {
    background: #4a49c4;
    border-color: #4a49c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 92, 222, 0.4);
}

.settings-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.settings-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] .settings-section {
    background: #1f2937;
}

.settings-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

:root[data-theme="dark"] .settings-section-title {
    color: #f3f4f6;
    border-bottom-color: #374151;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    width: 100%;
    text-align: left;
}

:root[data-theme="dark"] .settings-item {
    background: #111827;
}

.settings-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
    border-color: #5D5CDE;
}

:root[data-theme="dark"] .settings-item:hover {
    background: #1f2937;
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-item-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.settings-item-content {
    flex: 1;
}

.settings-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

:root[data-theme="dark"] .settings-item-title {
    color: #f3f4f6;
}

.settings-item-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

:root[data-theme="dark"] .settings-item-desc {
    color: #9ca3af;
}

.settings-item i {
    color: #9ca3af;
}

.settings-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #1f2937;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

:root[data-theme="dark"] .settings-select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.settings-select:focus {
    outline: none;
    border-color: #5D5CDE;
}

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

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #5D5CDE;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Modal de Conteúdo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

:root[data-theme="dark"] .modal-content {
    background: #1f2937;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
}

:root[data-theme="dark"] .modal-close {
    background: #374151;
    color: #9ca3af;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 24px;
}

:root[data-theme="dark"] .modal-title {
    color: #f3f4f6;
}

.keyboard-shortcuts {
    display: grid;
    gap: 16px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

:root[data-theme="dark"] .shortcut-item {
    background: #111827;
}

.shortcut-desc {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 500;
}

:root[data-theme="dark"] .shortcut-desc {
    color: #f3f4f6;
}

.shortcut-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #5D5CDE;
    font-size: 0.875rem;
}

:root[data-theme="dark"] .shortcut-key {
    background: #374151;
    border-color: #4b5563;
}

@media (max-width: 640px) {
    .modal-content {
        padding: 24px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .shortcut-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* Animação para indicador de digitação do Chat */
@keyframes typing-blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Estilos das mensagens do chat */
.chat-message {
    display: flex;
    margin-bottom: 16px;
    animation: chat-message-appear 0.3s ease-out;
}

@keyframes chat-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mensagens masculinas (John, Paulo, Carlos) - à esquerda */
.chat-message.john,
.chat-message.paulo,
.chat-message.carlos {
    justify-content: flex-start;
}

/* Mensagens femininas (Maria, Ana, Sofia) - à direita */
.chat-message.maria,
.chat-message.ana,
.chat-message.sofia {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Bolhas masculinas - fundo branco */
.chat-message.john .chat-bubble,
.chat-message.paulo .chat-bubble,
.chat-message.carlos .chat-bubble {
    background: white;
    border-bottom-left-radius: 4px;
}

/* Bolhas femininas - fundo azul */
.chat-message.maria .chat-bubble,
.chat-message.ana .chat-bubble,
.chat-message.sofia .chat-bubble {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-speaker {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-text {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 6px;
}

.chat-subtitle {
    font-size: 0.85rem;
    opacity: 0.75;
    font-style: italic;
}

/* ========================================
   🌙 DARK MODE - MODAIS DE PERFIL E SENHA
   ======================================== */

body.dark-mode .modal-content {
    background: #1f2937 !important;
    color: #f9fafb;
}

body.dark-mode .modal-title {
    color: #f9fafb;
}

body.dark-mode .modal-content h3 {
    color: #f9fafb !important;
}

body.dark-mode .modal-content input[type="text"],
body.dark-mode .modal-content input[type="password"] {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

body.dark-mode .modal-content input[type="text"]::placeholder,
body.dark-mode .modal-content input[type="password"]::placeholder {
    color: #9ca3af;
}

body.dark-mode .modal-content label {
    color: #d1d5db;
}

body.dark-mode .modal-content div[style*="background: #f9fafb"] {
    background: #374151 !important;
}

body.dark-mode .modal-content div[style*="color: #1f2937"] {
    color: #f9fafb !important;
}

body.dark-mode .modal-content div[style*="color: #6b7280"] {
    color: #9ca3af !important;
}

body.dark-mode .modal-content div[style*="color: #374151"] {
    color: #d1d5db !important;
}

