 /* Sistema Inglês Fluente - Frontend - Design Clean DeepSeek Style */
.ingles-fluente-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    min-height: 100vh;
}

/* ✅ HEADER ATUALIZADO - TAMANHO FIXO PARA MOBILE */
.if-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15);
    position: relative;
    overflow: hidden;
}

.if-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

.if-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.8em;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    letter-spacing: -0.5px;
}

.if-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
    flex-wrap: wrap;
    position: relative;
}

.if-stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.1);
}

.if-stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.if-stat-number {
    display: block;
    font-size: 2.2em;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.if-stat-label {
    font-size: 0.95em;
    opacity: 0.9;
    color: white;
    font-weight: 600;
    margin-top: 5px;
}

/* Seletor de Nível */
.if-level-selector {
    margin-bottom: 30px;
}

.if-level-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.if-level-btn {
    padding: 14px 28px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #374151;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.if-level-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.if-level-btn:hover::before {
    left: 100%;
}

.if-level-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
    color: #ffffff;
}

.if-level-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

.if-level-btn.completed {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

.if-level-btn.completed:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.if-level-btn.completed::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    background: #1e40af;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.if-level-btn.locked {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #d1d5db;
    transform: none !important;
    box-shadow: none !important;
}

.if-level-btn.locked::before {
    display: none;
}

/* Filtro de Tópicos */
.if-topic-filter {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.if-topic-buttons-container {
    position: relative;
}

.if-topic-buttons {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 12px 5px 16px 5px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    -webkit-overflow-scrolling: touch;
}

/* Personalizar barra de scroll para Webkit */
.if-topic-buttons::-webkit-scrollbar {
    height: 6px;
}

.if-topic-buttons::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.if-topic-buttons::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.if-topic-buttons::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.if-topic-btn {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    color: #374151;
    font-size: 14px;
}

.if-topic-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    color: white;
    background: #3b82f6; /* Adicionei um fundo azul para melhor contraste */
}

.if-topic-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}
.if-filter-badge {
    background: #eff6ff;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid #3b82f6;
    color: #1e40af;
    font-size: 0.9em;
    font-weight: 500;
}

.if-active-filter {
    animation: fadeIn 0.3s ease;
}

/* Progresso do Nível - AZUL CLARO IGUAL BOTÃO REFORÇO */
.if-level-progress {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #bae6fd;
}

.if-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.if-progress-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #1f2937;
}

/* Grid de Componentes COM SCROLL HORIZONTAL */
.if-components-grid {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 8px 18px 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    -webkit-overflow-scrolling: touch;
}

.if-component-item {
    padding: 16px 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: 170px;
    min-width: 170px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.if-component-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.if-component-item:hover::before {
    opacity: 1;
}

.if-component-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.if-component-item.completed {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.if-component-item.completed::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.if-component-name {
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.if-component-progress {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ✅ SEÇÃO DE REFORÇO DIÁRIO ATUALIZADA - ESTILO CLEAN */
.if-review-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid #bae6fd;
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.08);
}

.if-review-section .if-btn {
    margin-bottom: 12px;
}

/* ✅ BOTÃO DE REFORÇO DIÁRIO ESTILIZADO */
.if-review-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1em;
    min-width: 220px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.if-review-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.if-review-btn.active {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
}

/* ✅ BOTÃO SAIR DO MODO REFORÇO CENTRALIZADO */
.if-review-exit-section {
    display: none;
    text-align: center;
    margin-bottom: 18px;
    width: 100%;
}

.if-review-exit-section.show {
    display: block;
}

.if-exit-review-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 14px 28px;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

.if-exit-review-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Progresso da Revisão */
.if-review-progress {
    background: white;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.if-review-counter {
    font-size: 1.2em;
    font-weight: 700;
    color: #1f2937;
}

.if-review-count {
    color: #3b82f6;
    font-size: 1.4em;
}

.if-review-separator {
    color: #6b7280;
    margin: 0 8px;
}

.if-review-total {
    color: #10b981;
    font-size: 1.4em;
}

.if-review-label {
    color: #6b7280;
    font-size: 0.9em;
    margin-left: 8px;
}

/* ✅ ÁREA DE PRÁTICA ATUALIZADA - TAMANHOS FIXOS E LAYOUT RESPONSIVO */
.if-practice-area {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.if-practice-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 20px 20px 0 0;
}

.if-phrase-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    transition: all 0.2s ease;
}

/* ✅ FRASE EM INGLÊS - TAMANHO FIXO 18px EM MOBILE */
.if-english-phrase {
    font-size: 1.8em; /* Desktop: ~28.8px (1.8em base 16px) */
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    line-height: 1.3;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.5px;
}

/* ✅ TRADUÇÃO - TAMANHO FIXO 16px EM MOBILE */
.if-portuguese-translation {
    font-size: 1.2em; /* Desktop: ~19.2px */
    color: #4b5563;
    font-style: italic;
    margin-bottom: 18px;
    min-height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    font-weight: 500;
}

.if-portuguese-translation:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ✅ CAIXAS DE NÍVEL E COMPONENTE - LADO A LADO CENTRALIZADAS */
.if-phrase-info {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.if-phrase-tag {
    background: #f8fafc;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9em; /* Desktop: ~14.4px */
    color: #6b7280;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.if-phrase-tag:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ✅ BOTÕES DE AÇÃO OTIMIZADOS PARA MOBILE */
.if-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: auto;
    flex-wrap: wrap;
    padding: 8px 0 0 0;
    border-top: 1px solid #f1f5f9;
}

.if-btn {
    padding: 14px 22px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95em; /* Desktop: ~15.2px */
    transition: all 0.15s ease;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.if-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.if-btn:hover::before {
    left: 100%;
}

.if-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.if-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* ✅ CORES DOS BOTÕES ATUALIZADAS - AZUL GRADIENTE */
.if-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

.if-btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.if-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.if-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.if-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.if-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.if-btn-outline {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.if-btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.if-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.if-btn:disabled::before {
    display: none;
}

/* Estados do botão de áudio */
.if-listen-btn.playing {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
}

.if-listen-btn:disabled {
    background: #d1d5db !important;
    cursor: not-allowed !important;
}

/* Modo Revisão - AZUL CLARO */
.if-practice-area.review-mode {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
}

.if-practice-area.review-mode::before {
    background: linear-gradient(90deg, #3b82f6, #1e40af);
}

/* Mensagem de Conclusão do Reforço */
.if-review-completed {
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.if-completed-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.if-review-completed h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.if-review-completed p {
    color: #374151;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

.if-review-completed strong {
    color: #3b82f6;
}

/* ✅ NOVA MENSAGEM DE TODAS AS FRASES VISTAS */
.if-all-phrases-viewed {
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.if-all-phrases-viewed .if-completed-icon {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    animation: bounce 2s infinite;
}

.if-all-phrases-viewed h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.if-all-phrases-viewed p {
    color: #374151;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* ✅ BOTÕES DE AÇÃO PARA CONCLUSÃO COMPACTOS */
.if-completed-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.if-completed-actions .if-btn {
    min-width: 180px;
    padding: 14px 20px;
    font-size: 1em;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.if-completed-actions .if-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.if-completed-actions .if-btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

.if-completed-actions .if-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.if-completed-actions .if-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
/* Estatísticas da Revisão */
.if-review-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.if-stat-badge {
    background: white;
    padding: 18px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.if-stat-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.if-stat-badge .if-stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 800;
    color: #3b82f6;
}

.if-stat-badge .if-stat-label {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 600;
}

.if-completed-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.if-completed-actions .if-btn {
    min-width: 180px;
    padding: 14px 20px;
    font-size: 1em;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.if-completed-actions .if-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.if-completed-actions .if-btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

.if-completed-actions .if-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.if-completed-actions .if-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* Indicador de Modo Foco */
.if-focus-indicator {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: center;
    color: #1e40af;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    animation: pulse-focus 2s infinite;
    position: relative;
    overflow: hidden;
    font-size: 0.9em;
}

.if-focus-indicator::before {
    content: '🎯';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 1.2em;
}

@keyframes pulse-focus {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
    }
}

.if-focus-indicator strong {
    color: #1e40af;
    font-size: 1em;
    display: block;
    margin-bottom: 5px;
}

.if-focus-indicator em {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: #3b82f6;
    font-size: 0.85em;
}

/* Estados de Loading Melhorados */
.if-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    margin: 16px 0;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.08);
    animation: slideIn 0.3s ease;
    font-weight: 600;
    font-size: 0.95em;
}

.if-success {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #1e40af;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    margin: 16px 0;
    border: 1px solid #bae6fd;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.08);
    animation: slideIn 0.3s ease;
    font-weight: 600;
    font-size: 0.95em;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Required */
.if-login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
}

.if-login-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 380px;
    width: 100%;
}

.if-login-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.if-login-card h3 {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 1.5em;
    font-weight: 700;
}

.if-login-card p {
    color: #6b7280;
    margin-bottom: 25px;
    font-size: 1.05em;
    line-height: 1.5;
}

/* Animações */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.if-practice-area {
    animation: fadeIn 0.3s ease;
}

.if-phrase-container {
    animation: fadeIn 0.2s ease;
}

/* ✅ PROGRESSO DE SESSÃO COMPACTO */
.if-session-progress {
    margin: 16px 0;
    text-align: center;
}

.if-progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.if-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.if-progress-text {
    font-size: 0.85em;
    color: #6b7280;
    font-weight: 600;
}

.if-session-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.if-session-completed-actions {
    text-align: center;
    margin-top: 20px;
}

.if-session-message {
    color: #4b5563;
    margin-bottom: 16px;
    font-size: 1em;
    line-height: 1.4;
}

/* ✅ RESPONSIVIDADE AVANÇADA PARA MOBILE - TAMANHOS FIXOS */
@media (max-width: 768px) {
    .ingles-fluente-container {
        padding: 15px;
        font-size: 16px; /* Base 16px para cálculo em */
    }
    
    /* ✅ TÍTULO DO HEADER - 25px NO MOBILE */
    .if-header h1 {
        font-size: 1.5625em !important; /* 25px / 16px = 1.5625em */
        margin-bottom: 12px;
        line-height: 1.2;
    }
    
    .if-header {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    .if-stats {
        gap: 20px;
    }
    
    .if-stat-item {
        padding: 15px 20px;
        min-width: 100px;
    }
    
    .if-stat-number {
        font-size: 1.6em; /* ~25.6px */
    }
    
    .if-stat-label {
        font-size: 0.85em; /* ~13.6px */
    }
    
    /* ✅ ÁREA DE PRÁTICA COM TAMANHOS FIXOS */
    .if-practice-area {
        padding: 25px 20px;
        min-height: 240px;
        margin-bottom: 20px;
        border-radius: 16px;
    }
    
    /* ✅ FRASE EM INGLÊS - 18px FIXO NO MOBILE */
    .if-english-phrase {
        font-size: 1.125em !important; /* 18px / 16px = 1.125em */
        margin-bottom: 12px;
        min-height: 1.8em;
        padding: 0 10px;
        line-height: 1.3;
        font-weight: 700;
    }
    
    /* ✅ TRADUÇÃO - 16px FIXO NO MOBILE */
    .if-portuguese-translation {
        font-size: 1em !important; /* 16px / 16px = 1em */
        margin-bottom: 15px;
        padding: 12px 16px;
        min-height: 1.3em;
        font-weight: 500;
    }
    
    /* ✅ CAIXAS DE NÍVEL E COMPONENTE LADO A LADO CENTRALIZADAS */
    .if-phrase-info {
        gap: 8px;
        margin-bottom: 15px;
        justify-content: center;
        align-items: center;
        display: flex;
        flex-wrap: nowrap;
    }
    
    .if-phrase-tag {
        padding: 6px 12px;
        font-size: 0.875em; /* ~14px */
        min-width: 80px;
        text-align: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* ✅ BOTÕES DE AÇÃO EM COLUNA PARA MOBILE PEQUENO */
    .if-action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-top: 12px;
    }
    
    .if-btn {
        width: 100%;
        max-width: 260px;
        min-width: auto;
        padding: 12px 20px;
        font-size: 0.95em; /* ~15.2px */
    }
    
    /* ✅ COMPONENTES MAIS COMPACTOS */
    .if-components-grid {
        gap: 10px;
        padding: 10px 5px 15px 5px;
    }
    
    .if-component-item {
        width: 140px;
        min-width: 140px;
        padding: 12px 14px;
    }
    
    .if-component-name {
        font-size: 0.75em; /* ~12px */
    }
    
    .if-component-progress {
        font-size: 0.75em; /* ~12px */
    }
    
    /* ✅ SELEÇÃO DE NÍVEL MAIS COMPACTA */
    .if-level-buttons {
        gap: 8px;
    }
    
    .if-level-btn {
        padding: 12px 18px;
        min-width: 70px;
        font-size: 0.875em; /* ~14px */
    }
    
    /* ✅ TÓPICOS MAIS COMPACTOS */
    .if-topic-buttons {
        gap: 8px;
        padding: 8px 3px 12px 3px;
    }
    
    .if-topic-btn {
        padding: 10px 14px;
        font-size: 0.75em; /* ~12px */
    }
    
    /* ✅ MENSAGENS DE CONCLUSÃO MAIS COMPACTAS */
    .if-review-completed,
    .if-all-phrases-viewed {
        padding: 2rem 1.5rem;
    }
    
    .if-completed-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .if-review-completed h3,
    .if-all-phrases-viewed h3 {
        font-size: 1.3rem; /* ~20.8px */
        line-height: 1.3;
    }
    
    .if-review-completed p,
    .if-all-phrases-viewed p {
        font-size: 0.95rem; /* ~15.2px */
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .if-completed-actions {
        gap: 0.8rem;
    }
    
    .if-completed-actions .if-btn {
        min-width: 160px;
        padding: 12px 18px;
        font-size: 0.9em; /* ~14.4px */
    }
    
    /* ✅ ESTATÍSTICAS MAIS COMPACTAS */
    .if-review-stats,
    .if-session-stats {
        gap: 12px;
    }
    
    .if-stat-badge {
        min-width: 100px;
        padding: 15px;
    }
    
    .if-stat-badge .if-stat-number {
        font-size: 1.5em; /* ~24px */
    }
    
    .if-stat-badge .if-stat-label {
        font-size: 0.75em; /* ~12px */
    }
    
    /* ✅ BOTÕES DE REFORÇO */
    .if-review-btn {
        font-size: 1em; /* 16px */
        padding: 14px 24px;
        min-width: 200px;
    }
    
    /* ✅ PROGRESS TITLE */
    .if-progress-title {
        font-size: 1.1em; /* ~17.6px */
    }
    
    /* ✅ SEÇÃO TITLE */
    .if-section-title {
        font-size: 1.2em; /* ~19.2px */
    }
}

@media (max-width: 480px) {
    .ingles-fluente-container {
        padding: 12px;
    }
    
    /* ✅ TÍTULO DO HEADER - MANTÉM 25px */
    .if-header h1 {
        font-size: 1.5625em !important; /* 25px */
        line-height: 1.2;
    }
    
    .if-stats {
        gap: 10px;
    }
    
    .if-stat-item {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .if-stat-number {
        font-size: 1.3em; /* ~20.8px */
    }
    
    .if-stat-label {
        font-size: 0.75em; /* ~12px */
    }
    
    /* ✅ FRASE EM INGLÊS - MANTÉM 18px */
    .if-english-phrase {
        font-size: 1.125em !important; /* 18px */
        padding: 0 8px;
        line-height: 1.25;
    }
    
    /* ✅ TRADUÇÃO - MANTÉM 16px */
    .if-portuguese-translation {
        font-size: 1em !important; /* 16px */
        padding: 10px 12px;
        line-height: 1.3;
    }
    
    /* ✅ CAIXAS LADO A LADO - MAIS COMPACTAS */
    .if-phrase-info {
        flex-direction: row;
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .if-action-buttons {
        gap: 8px;
    }
    
    .if-btn {
        padding: 11px 16px;
        font-size: 0.9em; /* ~14.4px */
        max-width: 240px;
    }
    
    .if-component-item {
        width: 120px;
        min-width: 120px;
        padding: 10px 12px;
    }
    
    .if-level-btn {
        padding: 10px 14px;
        min-width: 60px;
        font-size: 0.8125em; /* ~13px */
    }
    
    /* ✅ BOTÕES DE CONCLUSÃO MAIS COMPACTOS */
    .if-completed-actions .if-btn {
        min-width: 140px;
        padding: 10px 14px;
        font-size: 0.85em; /* ~13.6px */
    }
    
    /* ✅ SEÇÃO DE REFORÇO COMPACTA */
    .if-review-section {
        padding: 20px 15px;
    }
    
    .if-review-btn {
        padding: 12px 20px;
        font-size: 1em; /* 16px */
        min-width: 160px;
    }
}

@media (max-width: 360px) {
    /* ✅ OTIMIZAÇÃO EXTREMA PARA TELAS MUITO PEQUENAS */
    .ingles-fluente-container {
        padding: 10px;
    }
    
    /* ✅ TÍTULO DO HEADER - 25px (REDUZIDO PRA 22px EM TELAS MUITO PEQUENAS) */
    .if-header h1 {
        font-size: 1.600em !important; /* 22px */
        margin-bottom: 8px;
    }
    
    .if-header {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    .if-stats {
        gap: 8px;
    }
    
    .if-stat-item {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .if-stat-number {
        font-size: 1.1em; /* ~17.6px */
    }
    
    .if-stat-label {
        font-size: 0.7em; /* ~11.2px */
    }
    
    /* ✅ FRASES - MANTÉM TAMANHOS FIXOS */
    .if-practice-area {
        padding: 20px 15px;
        min-height: 220px;
        margin-bottom: 15px;
    }
    
    .if-english-phrase {
        font-size: 1.600em !important; /* 18px */
        line-height: 1.2;
    }
    
    .if-portuguese-translation {
        font-size: 1em !important; /* 16px */
        padding: 8px 10px;
        line-height: 1.25;
    }
    
    /* ✅ CAIXAS EM UMA LINHA - MAIS COMPACTAS */
    .if-phrase-info {
        gap: 4px;
    }
    
    .if-phrase-tag {
        padding: 5px 8px;
        font-size: 0.75em; /* ~12px */
        min-width: 70px;
    }
    
    .if-btn {
        padding: 10px 14px;
        font-size: 0.85em; /* ~13.6px */
        max-width: 220px;
    }
    
    .if-component-item {
        width: 110px;
        min-width: 110px;
        padding: 8px 10px;
    }
    
    .if-level-btn {
        padding: 8px 12px;
        min-width: 55px;
        font-size: 0.75em; /* ~12px */
    }
    
    .if-topic-btn {
        padding: 8px 10px;
        font-size: 0.6875em; /* ~11px */
    }
}

/* ✅ ESTILOS PARA ORIENTAÇÃO LANDSCAPE EM MOBILE */
@media (max-width: 768px) and (orientation: landscape) {
    .if-header {
        padding: 15px 20px;
    }
    
    .if-header h1 {
        font-size: 1.5625em !important; /* 25px */
        margin-bottom: 8px;
    }
    
    .if-stats {
        gap: 15px;
    }
    
    .if-stat-item {
        padding: 10px 15px;
        min-width: 70px;
    }
    
    .if-practice-area {
        min-height: 200px;
        padding: 20px 15px;
    }
    
    /* ✅ FRASES COM TAMANHOS FIXOS */
    .if-english-phrase {
        font-size: 1.125em !important; /* 18px */
        margin-bottom: 10px;
        min-height: 1.5em;
        line-height: 1.25;
    }
    
    .if-portuguese-translation {
        font-size: 1em !important; /* 16px */
        margin-bottom: 12px;
        padding: 10px 15px;
        min-height: 1.2em;
        line-height: 1.3;
    }
    
    /* ✅ CAIXAS LADO A LADO */
    .if-phrase-info {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }
    
    .if-action-buttons {
        flex-direction: row;
        gap: 8px;
    }
    
    .if-btn {
        width: auto;
        min-width: 100px;
        padding: 10px 15px;
        font-size: 0.9em; /* ~14.4px */
    }
}

/* ✅ ESTILOS PARA REDUÇÃO DE MOVIMENTO */
@media (prefers-reduced-motion: reduce) {
    .if-btn,
    .if-component-item,
    .if-stat-item,
    .if-level-btn,
    .if-topic-btn,
    .if-phrase-tag {
        transition: none;
    }
    
    .if-completed-icon,
    .if-login-icon {
        animation: none;
    }
    
    .if-practice-area,
    .if-phrase-container {
        animation: none;
    }
}

/* ✅ ESTILOS ADICIONAIS PARA HARMONIA VISUAL */
.if-progress-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.if-section-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.if-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 2px;
}

/* ✅ ESTILOS PARA BOTÕES DE RESPOSTA RÁPIDA */
.if-quick-response {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.if-quick-btn {
    padding: 14px 24px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.if-quick-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.if-quick-btn:hover::before {
    left: 100%;
}

.if-quick-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

.if-quick-btn.correct {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.if-quick-btn.incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

/* ✅ ANIMAÇÃO DE FEEDBACK PARA RESPOSTAS */
@keyframes quickResponse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.if-quick-btn.correct,
.if-quick-btn.incorrect {
    animation: quickResponse 0.3s ease;
}

/* ✅ ESTADO DE CARREGAMENTO MELHORADO */
.if-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.if-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ✅ MENSAGEM DE FEEDBACK MELHORADA */
.if-feedback-message {
    padding: 20px 25px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.if-feedback-message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
}

.if-feedback-message.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #ef4444;
}

.if-feedback-message.info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #1e40af;
    border: 2px solid #3b82f6;
}

/* ✅ ESTILOS PARA COMPONENTES INTERATIVOS */
.if-interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.if-interactive-element:hover {
    transform: translateY(-2px);
}

.if-card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.if-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ✅ ESTILOS PARA BADGES E TAGS MELHORADOS */
.if-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s ease;
}

.if-badge:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.if-badge-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: #3b82f6;
}

.if-badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
}

.if-badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: #f59e0b;
}

/* ✅ ESTILOS PARA MODO FOCO MELHORADO */
.if-focus-mode-active {
    position: relative;
    overflow: hidden;
}

.if-focus-mode-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    animation: focusPulse 2s infinite;
}

@keyframes focusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ✅ ESTILOS PARA ANIMAÇÕES DE ENTRADA */
.if-stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.if-stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.if-stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.if-stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.if-stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.if-stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✅ ESTILOS PARA ESTADOS DE DESTAQUE */
.if-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 15px 0;
    position: relative;
}

.if-highlight::before {
    content: '💡';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.if-highlight-content {
    margin-left: 35px;
}

/* ✅ ESTILOS PARA TIPOGRAFIA MELHORADA */
.if-text-gradient {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.if-text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ✅ ESTILOS PARA BOTÕES COM ÍCONES */
.if-btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.if-btn-with-icon i {
    font-size: 1.1em;
}

/* ✅ ESTILOS PARA GRADIENTES PERSONALIZADOS */
.if-gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.if-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.if-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.if-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ✅ ESTILOS PARA CARDS MODERNOS */
.if-modern-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.if-modern-card:hover {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.if-modern-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.if-modern-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
}

/* ✅ ESTILOS PARA LISTAS INTERATIVAS */
.if-interactive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.if-interactive-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.if-interactive-list-item:hover {
    background: #f8fafc;
    border-color: #e5e7eb;
    transform: translateX(4px);
}

.if-interactive-list-item.active {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: #3b82f6;
}

.if-list-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #6b7280;
    font-size: 0.9em;
}

.if-interactive-list-item.active .if-list-item-icon {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
}

/* ✅ ESTILOS PARA FORMULÁRIOS MELHORADOS */
.if-enhanced-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.if-form-group-enhanced {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.if-form-label-enhanced {
    font-weight: 600;
    color: #374151;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.if-form-input-enhanced {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.if-form-input-enhanced:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.if-form-input-enhanced::placeholder {
    color: #9ca3af;
}

/* ✅ ESTILOS PARA MENSAGENS DE STATUS */
.if-status-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.if-status-message.success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    color: #166534;
}

.if-status-message.error {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.if-status-message.warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.if-status-message.info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    color: #1e40af;
}

.if-status-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

/* ✅ ESTILOS PARA PAGINAÇÃO MELHORADA */
.if-pagination-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.if-pagination-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #6b7280;
}

.if-pagination-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
}

.if-pagination-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: #3b82f6;
}

.if-pagination-info {
    color: #6b7280;
    font-size: 0.9em;
    margin: 0 16px;
}

/* ✅ ESTILOS PARA LOADING SKELETON */
.if-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 6px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.if-skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.if-skeleton-title {
    height: 24px;
    margin-bottom: 12px;
}

.if-skeleton-button {
    height: 40px;
    border-radius: 8px;
}

/* ✅ ESTILOS PARA TOOLTIPS */
.if-tooltip {
    position: relative;
    display: inline-block;
}

.if-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #374151;
    color: white;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.if-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #374151;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.if-tooltip:hover::before,
.if-tooltip:hover::after {
    opacity: 1;
}

/* ✅ ESTILOS PARA SCROLLBAR PERSONALIZADA */
.if-custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.if-custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.if-custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.if-custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ✅ ESTILOS PARA GRID RESPONSIVO */
.if-responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.if-grid-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.if-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ✅ ESTILOS PARA MODO COMPACTO */
.if-compact-mode .if-component-item {
    width: 140px;
    min-width: 140px;
    padding: 12px 16px;
}

.if-compact-mode .if-level-btn {
    padding: 10px 16px;
    min-width: 70px;
    font-size: 0.9em;
}

.if-compact-mode .if-btn {
    padding: 12px 20px;
    min-width: 110px;
    font-size: 0.9em;
}

/* ✅ ESTILOS PARA ANIMAÇÕES DE SAÍDA */
.if-fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ✅ ESTILOS PARA ZOOM SUAVE */
.if-zoom-hover {
    transition: transform 0.3s ease;
}

.if-zoom-hover:hover {
    transform: scale(1.02);
}

/* ✅ ESTILOS PARA SOMBRAS DINÂMICAS */
.if-shadow-hover {
    transition: box-shadow 0.3s ease;
}

.if-shadow-hover:hover {
    box-shadow: 
        0 10px 25px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ✅ ESTILOS PARA BORDAS GRADIENTES */
.if-border-gradient {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2px;
}

.if-border-gradient::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #3b82f6, #1e40af, #3b82f6);
    border-radius: 18px;
    z-index: -1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ✅ MEDIA QUERIES AVANÇADAS */
@media (max-width: 1024px) {
    .if-responsive-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .if-modern-card {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .if-responsive-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .if-pagination-enhanced {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .if-pagination-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}

/* ✅ ESTILOS PARA IMPRESSÃO */
@media print {
    .if-header,
    .if-level-selector,
    .if-topic-filter,
    .if-action-buttons,
    .if-review-section {
        display: none;
    }
    
    .if-practice-area {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .ingles-fluente-container {
        background: white;
        padding: 0;
    }
}

/* ✅ ESTILOS PARA ALTA CONTRASTE */
@media (prefers-contrast: high) {
    .if-btn {
        border: 2px solid;
    }
    
    .if-component-item {
        border: 1px solid;
    }
    
    .if-practice-area {
        border: 2px solid;
    }
}

/* ✅ ESTILOS PARA REDUÇÃO DE MOVIMENTO */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ✅ ESTILOS PARA ALTA DENSIDADE DE PIXEL (2x, 3x) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .if-btn,
    .if-level-btn,
    .if-topic-btn,
    .if-component-item {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

 /* Estilos mínimos para mobile */
@media (max-width: 768px) {
  .if-phrase-tag {
    display: inline-block;
    margin-top: 10px;
    margin-right: 10px;
    padding: 8px 12px;
  }
  
  .if-phrase-tag:first-child {
    margin-top: 10px;
  }
}

/* Loading transition */
.if-loading-transition {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Translation container */
.if-portuguese-translation {
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease;
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 10px 0;
}

/* Session progress */
.if-session-progress {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.if-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.if-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.if-progress-text {
    font-size: 0.85em;
    color: #64748b;
}

/* Session stats */
.if-session-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.if-stat-badge {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.if-stat-badge .if-stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #3b82f6;
}

.if-stat-badge .if-stat-label {
    font-size: 0.8em;
    color: #64748b;
    margin-top: 5px;
}

.if-session-completed-actions {
    text-align: center;
    margin-top: 20px;
}

.if-session-message {
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Restart practice button */
#if-restart-practice {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    margin-top: 10px;
}

#if-restart-practice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

/* Review completed styles */
.if-review-completed {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
}

.if-review-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.if-completed-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.if-completed-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* All phrases viewed */
.if-all-phrases-viewed {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .if-session-progress {
        padding: 12px;
    }
    
    .if-stat-badge {
        padding: 12px 15px;
        min-width: 100px;
    }
    
    .if-stat-badge .if-stat-number {
        font-size: 1.4em;
    }
}

/* ============================================
   CORREÇÕES PARA MOBILE - COMPONENTES
   ============================================ */

/* Garantir que o grid de componentes seja visível no mobile */
.if-components-grid {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 12px !important;
    margin-top: 15px !important;
    padding: 10px 5px 15px 5px !important;
    scrollbar-width: thin !important;
    -webkit-overflow-scrolling: touch !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

/* Forçar os itens a aparecerem */
.if-component-item {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    min-width: 140px !important;
    width: 140px !important;
    padding: 14px 12px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    border-radius: 12px !important;
    color: white !important;
    text-align: center !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Garantir que o texto dos componentes seja visível */
.if-component-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.if-component-progress {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
}

/* Barra de progresso dentro do componente */
.if-component-bar {
    margin-top: 8px !important;
    width: 100% !important;
}

/* Componente completo */
.if-component-item.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    position: relative !important;
}

.if-component-item.completed::after {
    content: '✓' !important;
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: bold !important;
}

/* Garantir que o progresso do nível seja visível */
.if-level-progress {
    display: block !important;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    padding: 20px !important;
    border-radius: 16px !important;
    margin-bottom: 25px !important;
    border: 1px solid #bae6fd !important;
    width: 100% !important;
}

.if-progress-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    flex-wrap: wrap !important;
}

.if-progress-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
}

/* Mobile específico */
@media (max-width: 768px) {
    .if-components-grid {
        gap: 10px !important;
        padding: 10px 5px 15px 5px !important;
    }
    
    .if-component-item {
        min-width: 120px !important;
        width: 120px !important;
        padding: 12px 10px !important;
    }
    
    .if-component-name {
        font-size: 12px !important;
    }
    
    .if-component-progress {
        font-size: 11px !important;
    }
    
    /* Garantir que o usuário veja que pode rolar horizontalmente */
    .if-components-grid::after {
        content: '';
        display: block;
        flex: 0 0 10px;
        height: 1px;
    }
}

@media (max-width: 480px) {
    .if-component-item {
        min-width: 110px !important;
        width: 110px !important;
        padding: 10px 8px !important;
    }
    
    .if-component-name {
        font-size: 11px !important;
    }
    
    .if-component-progress {
        font-size: 10px !important;
    }
}

/* Indicador visual de que pode rolar (opcional) */
.if-components-grid:after {
    content: '';
    display: block;
    flex: 0 0 5px;
}

/* Para navegadores que suportam */
@supports (scrollbar-width: thin) {
    .if-components-grid {
        scrollbar-width: thin;
        scrollbar-color: #3b82f6 #e2e8f0;
    }
}

.if-components-grid::-webkit-scrollbar {
    height: 6px;
}

.if-components-grid::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.if-components-grid::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 3px;
}

.if-components-grid::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Esconder completamente quando vazio */
.if-portuguese-translation:empty {
    display: none !important;
}