/* Google Fonts - Tipografía clásica de libro */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* Variables CSS */
:root {
    --paper-bg: #faf8f3;
    --paper-shadow: rgba(0,0,0,0.08);
    --text-primary: #2c2c2c;
    --text-secondary: #5a5a5a;
    --accent-blue: #4a5568;
    --accent-warm: #d69e2e;
    --glosa-color: #b83280;
    --emoji-color: #2b6cb0;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Cuerpo principal */
body {
    font-family: 'Crimson Text', serif;
    font-style: normal; 
    font-weight: 400;   
    font-size: 22px; 
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 40px; 
    background: var(--paper-bg);
    border-radius: 8px;
    box-shadow: 
        0 4px 6px var(--paper-shadow),
        0 10px 20px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.01) 1px, transparent 1px);
    background-size: 40px 30px;
}

/* Borde de papel - CORREGIDO */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px; 
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(220, 38, 127, 0.2) 10%, 
        rgba(220, 38, 127, 0.2) 90%, 
        transparent 100%);
}


/* Títulos */
h1 {
    font-family: 'Crimson Text', serif;
    font-size: 2.5em;
    font-weight: 600;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-warm), transparent);
}
h1, h2, h3, h4 {
    text-align: center !important;
}

.quiz h3,
.glossary-section h3,
.audio-player,
.reacciones,
.reacciones p,
.final-message,
.final-message h3,
.final-message p,
.resultado-quiz {
    text-align: center !important;
}
/* Botones centrados */
.emoji-toggle-button,
.quiz-submit-btn,
.clear-glossary {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Navegación entre capítulos - centrada */
.chapter-nav {
    text-align: center;
}
/* Primera letra grande (Drop cap) */
.chapter-content > p:first-child::first-letter {
    float: left;
    font-size: 5em;
    line-height: 0.6;
    padding: 4px 12px 0 0;
    margin: 4px 12px 0 0;
    font-weight: 600;
    color: var(--accent-blue);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-family: 'Crimson Text', serif;
}

.pregunta p::first-letter {
    float: none !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    line-height: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    text-shadow: none !important;
}    

.chapter-content {
    text-align: justify !important;
}
.chapter-content p {
    margin-bottom: 9px; 
    text-align: justify !important;
    text-indent: 2.0em; 
    font-style: normal !important;
}
.glosa,
.emoji-word {
    text-align: inherit; /* Heredan la justificación del párrafo */
}
.chapter-content p:first-child {
    text-indent: 0;
}

.chapter-content,
.chapter-content p,
.chapter-content span {
    text-align: justify !important; /* ✅ Fuerza justificación */
}

/* Enlaces de navegación */
.back-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    background: #2d3748;
    transform: translateX(-3px);
}

/* Botón de toggle de emojis */
.emoji-toggle-button {
    background: linear-gradient(135deg, var(--accent-warm) 0%, #ed8936 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 4px rgba(214, 158, 46, 0.3);
}

.emoji-toggle-button:hover {
    background: linear-gradient(135deg, #ed8936 0%, #c05621 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 158, 46, 0.4);
}

/* Palabras con emoji - NUEVA FUNCIONALIDAD */
.emoji-word {
    color: var(--emoji-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    padding: 2px 4px;
    margin: 0 2px;
    position: relative;
}

.emoji-word:hover {
    background-color: rgba(43, 108, 176, 0.1);
    transform: translateY(-1px);
}

.emoji-word.clicked {
    background-color: rgba(43, 108, 176, 0.2);
}

/* Emojis que aparecen */
.emoji-icono {
    font-size: 1.3em;
    margin-left: 1px;
    display: inline-block;
    animation: emojiAppear 0.5s ease;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

@keyframes emojiAppear {
    from { 
        opacity: 0; 
        transform: scale(0.3) rotate(-180deg); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

.emoji-icono.removing {
    animation: emojiDisappear 0.3s ease forwards;
}

@keyframes emojiDisappear {
    from { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
    to { 
        opacity: 0; 
        transform: scale(0.3) rotate(180deg); 
    }
}

/* CSS CORREGIDO - Reemplazar la sección de glosas en style.css */

/* Palabras con glosa - SIN panel flotante */
.glosa {
    color: #b83280 !important; /* Forzar color directo */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    padding: 2px 4px;
    margin: 0 2px;
    border-bottom: 1px dotted #b83280 !important;
}

.glosa:hover {
    color: var(--glosa-color) !important;
    border-bottom: 1px dotted var(--glosa-color) !important;
    background-color: rgba(184, 50, 128, 0.1);
    transform: translateY(-1px);
}

.glosa.clicked {
    background-color: rgba(184, 50, 128, 0.2) !important;
    border-bottom: 2px solid var(--glosa-color) !important;
}

/* GLOSARIO AL PIE DEL TEXTO - FORMATO BULLET POINTS */
.glossary-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--accent-warm);
    background: rgba(214, 158, 46, 0.05);
    border-radius: 8px;
    padding: 30px;
    min-height: 60px;
}

.glossary-section h3 {
    font-family: 'Inter', sans-serif;
    color: var(--accent-blue);
    font-size: 1.3em;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.glossary-section.empty {
    display: none;
}

.glossary-section.has-definitions {
    display: block;
}

.glossary-list {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    border-left: 4px solid var(--glosa-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: 'Crimson Text', serif;
    font-size: 22px; 
    line-height: 1.8;
}

.glossary-item {
    opacity: 0;
    transform: translateY(10px);
    animation: glossaryItemAppear 0.4s ease forwards;
    margin-bottom: 8px;
    position: relative;
    padding-left: 0;
}

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

@keyframes glossaryItemAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bullet point personalizado */
.glossary-item::before {
    content: "•";
    color: var(--glosa-color);
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 8px;
}

.glossary-word {
    font-weight: 600;
    color: var(--glosa-color);
    display: inline;
    font-family: 'Crimson Text', serif;
}

.glossary-definition {
    color: var(--text-secondary);
    display: inline;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
}

.clear-glossary {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.clear-glossary:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2a2a 100%);
    transform: translateY(-1px);
}

/* Responsive para el glosario */
@media (max-width: 768px) {
    .glossary-section {
        margin-top: 30px;
        padding: 20px;
    }
    
    .glossary-list {
        padding: 15px 20px;
        font-size: 20px;
    }
    
    .glossary-definition {
        font-size: 20px;
    }
}

/* Reproductor de audio */
.audio-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.audio-player audio {
    width: 100%;
    max-width: 400px;
    height: 45px;
    border-radius: 6px;
    outline: none;
}

/* Quizzes */
.quiz {
    background: var(--paper-bg);
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.quiz h3 {
    color: var(--accent-blue);
    font-family: 'Inter', sans-serif;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.4em;
    font-weight: 600;
}

.pregunta {
    background: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid var(--accent-warm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.pregunta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pregunta p {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    text-indent: 0;
}

.pregunta label {
    display: block;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 2px solid transparent;
    font-family: 'Crimson Text', serif;
}

.pregunta label:hover {
    background: #e9ecef;
    border-color: var(--accent-blue);
}

.pregunta input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

/* Estilos de respuestas del quiz */
.pregunta label.correct {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
    font-weight: 600;
}

.pregunta label.incorrect {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
    font-weight: 600;
}

.pregunta label.correct-answer {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    color: #004085;
    border-color: #007bff;
    font-weight: 600;
}

.quiz-submit-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    margin: 30px auto 0;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.quiz-submit-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Resultados del quiz */
.resultado-quiz {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transition: all 0.5s ease;
}

.resultado-quiz.show {
    opacity: 1;
}

.resultado-quiz.perfect {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
}

.resultado-quiz.good {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 2px solid #ffc107;
}

.resultado-quiz.needs-improvement {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Sistema de reacciones */
.reacciones {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.reacciones p {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.reacciones button {
    font-size: 2rem;
    border: none;
    background: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.reacciones button:hover {
    transform: scale(1.2) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.reacciones button.clicked {
    animation: reactionClick 0.6s ease;
}

@keyframes reactionClick {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(360deg); }
    100% { transform: scale(1.1); }
}

/* Mensaje final */
.final-message {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2d3748 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.final-message h3 {
    margin-bottom: 20px;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Crimson Text', serif;
}

.final-message p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
    text-indent: 0;
}

/* Navegación entre capítulos */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
}

.chapter-nav a {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #2d3748 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    flex: 1;
    text-align: center;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(74, 85, 104, 0.3);
}

.chapter-nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 85, 104, 0.4);
}

.back-to-index {
    background: linear-gradient(135deg, var(--accent-warm) 0%, #ed8936 100%) !important;
    box-shadow: 0 2px 8px rgba(214, 158, 46, 0.3) !important;
}

.back-to-index:hover {
    box-shadow: 0 4px 15px rgba(214, 158, 46, 0.4) !important;
}

/* Explicación de idiomas (capítulo 5) */
.language-explanation {
    background: #f8f9fa;
    border-left: 4px solid var(--accent-blue);
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.language-explanation p {
    margin: 10px 0;
    font-weight: 500;
    text-indent: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 30px 35px; 
        border-radius: 6px;
    }
    
    .container::before {
        left: 35px;
    }
    
   .chapter-content p {
        text-align: justify !important; /* ✅ Mantener justificado en móviles */
        text-indent: 1.5em; /* ✅ Menos sangría en móviles */
    } 
    
    body {
        font-size: 20px;
        line-height: 1.6;
        padding: 10px 0;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .chapter-content p:first-child::first-letter {
        font-size: 5em; 
        padding: 2px 8px 0 0; 
        margin: 2px 8px 0 0; 
        line-height: 0.5; 
    }
    
    .chapter-nav {
        flex-direction: column;
    }
    
    .quiz {
        padding: 20px;
        margin: 20px 0;
    }
    
    .pregunta {
        padding: 15px;
    }
    
    .reacciones button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0 5px;
    }
    
    .emoji-toggle-button {
        width: 90%;
        margin: 0 auto 20px;
    }
    
    .final-message {
        padding: 20px;
        margin: 20px 0;
    }
    
    .final-message h3 {
        font-size: 1.3em;
    }
    
    .glosa-panel {
        max-width: 90%;
        bottom: 10px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 5px;
        padding: 20px 25px; /* CAMBIO: de 15px a 25px para que no sea demasiado estrecho */
    }
    
    .container::before {
        left: 20px; 
    }
    
    .chapter-content p:first-child::first-letter {
        font-size: 2.5em;
    }
    
    .glosa-panel {
        font-size: 14px;
        padding: 12px;
    }
}
/* Estilo del título principal del índice */
.container h1 {
    font-family: 'Crimson Text', serif;
    font-size: 3em;
    font-weight: 600;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.container h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--accent-warm), transparent);
}

/* Subtítulo del índice */
.container h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8em;
    font-weight: 500;
    color: var(--accent-blue);
    text-align: center;
    margin: 40px 0 50px 0;
}

/* Descripción de bienvenida */
.container p {
    font-size: 1.1em;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 50px;
    font-family: 'Inter', sans-serif;
    font-style: italic;
}

/* Contenedor de la lista de capítulos */
.chapter-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 40px;
    padding: 0;
}

.chapter-list a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 25px 60px 25px 30px; /* ✅ Más espacio a la derecha */
    background: linear-gradient(135deg, 
        rgba(74, 85, 104, 0.1) 0%, 
        rgba(74, 85, 104, 0.05) 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: 'Crimson Text', serif;
    font-size: 1.0em; /* ✅ Texto ligeramente más pequeño */
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    line-height: 1.3; /* ✅ Mejor espaciado de líneas */
}

.chapter-list a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--accent-blue) 0%, 
        #2d3748 100%);
    transition: all 0.4s ease;
    z-index: -1;
}

/* Número del capítulo */
.chapter-list a::after {
    content: attr(data-chapter);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-warm);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85em;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

/* Estados hover */
.chapter-list a:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: var(--accent-blue);
    color: white;
}

.chapter-list a:hover::before {
    left: 0;
}

.chapter-list a:hover::after {
    background: white;
    color: var(--accent-blue);
    transform: translateY(-50%) scale(1.1);
}

/* Estados active/focus */
.chapter-list a:active {
    transform: translateY(-4px) scale(0.98);
}

.chapter-list a:focus {
    outline: 3px solid rgba(74, 85, 104, 0.3);
    outline-offset: 4px;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .chapter-list {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
    
    .chapter-list a {
        padding: 20px 25px;
        font-size: 1em;
    }
    
    .chapter-list a::after {
        width: 30px;
        height: 30px;
        right: 20px;
        font-size: 0.8em;
    }
    
    .container h1 {
        font-size: 2.5em;
    }
    
    .container h2 {
        font-size: 1.5em;
        margin: 30px 0 40px 0;
    }
}

@media (max-width: 480px) {
    .chapter-list {
        gap: 12px;
    }
    
    .chapter-list a {
        padding: 18px 20px;
        font-size: 0.95em;
    }
    
    .container h1 {
        font-size: 2.2em;
    }
}
/* Añadir estas reglas CSS al archivo style.css existente */

/* Palabras que son TANTO emoji COMO glosa */
.emoji-word.glosa {
    color: #8b5a87; /* Color intermedio entre emoji y glosa */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 3px;
    padding: 2px 4px;
    margin: 0 2px;
    position: relative;
    border-bottom: 1px dotted #8b5a87;
}

.emoji-word.glosa:hover {
    background-color: rgba(139, 90, 135, 0.15);
    transform: translateY(-1px);
}

.emoji-word.glosa.clicked {
    background-color: rgba(139, 90, 135, 0.25);
    border-bottom: 2px solid #8b5a87;
}

/* Cuando tiene emoji activo Y glosa activa */
.emoji-word.glosa.clicked.emoji-active {
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.2) 0%, rgba(184, 50, 128, 0.2) 100%);
    border-bottom: 2px solid #8b5a87;
    box-shadow: 0 2px 8px rgba(139, 90, 135, 0.3);
}

/* Prioridad visual cuando ambos están activos */
.emoji-word.glosa.emoji-active .emoji-icono {
    margin-left: 1px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}
/* MINIJUEGO DE FLASHCARDS - Añadir al style.css existente */

.flashcards-game {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: white;
    font-family: 'Inter', sans-serif;
}

.flashcards-game.hidden {
    display: none;
}

.flashcards-game h3 {
    margin-bottom: 20px;
    font-size: 1.4em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.flashcards-game p {
    margin-bottom: 25px;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Controles del juego */
.flashcards-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.flashcards-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
}

.flashcards-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.flashcards-btn.primary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-color: transparent;
}

.flashcards-btn.primary:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

.flashcards-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Contenedor de la tarjeta */
.flashcard-container {
    perspective: 1000px;
    margin: 30px auto;
    width: 100%;
    max-width: 400px;
    height: 250px;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    padding: 30px;
    box-sizing: border-box;
}

.flashcard-front {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-primary);
    border: 3px solid var(--accent-blue);
}

.flashcard-back {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    transform: rotateY(180deg);
    border: 3px solid #28a745;
}

.flashcard-content {
    text-align: center;
    width: 100%;
}

.flashcard-word {
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Crimson Text', serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.flashcard-definition {
    font-size: 1.3em;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.flashcard-audio {
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.flashcard-audio:hover {
    background: rgba(0,0,0,0.2);
    transform: scale(1.1);
}

/* Estadísticas del juego */
.flashcards-stats {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

/* Progreso */
.flashcards-progress {
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    height: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    height: 100%;
    border-radius: 25px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* Botones de acción */
.flashcard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.action-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.action-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.action-btn.correct {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-color: transparent;
}

.action-btn.incorrect {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: transparent;
}

.action-btn.correct:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
}

.action-btn.incorrect:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* Indicadores de teclas */
.key-hint {
    position: absolute;
    top: -8px;
    right: -8px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
}

/* Mensaje de finalización */
.flashcards-complete {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.flashcards-complete h4 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #fff;
}

.flashcards-complete p {
    font-size: 1.1em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.complete-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.complete-stat {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.complete-stat-number {
    display: block;
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 5px;
}

.complete-stat-label {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Animaciones */
@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.flashcard.new-card {
    animation: slideInCard 0.6s ease;
}

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

@keyframes incorrectAnswer {
    0% { transform: scale(1); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
    100% { transform: scale(1); }
}

.flashcard.correct-feedback {
    animation: correctAnswer 0.6s ease;
}

.flashcard.incorrect-feedback {
    animation: incorrectAnswer 0.6s ease;
}

/* Confetti animation */
@keyframes confetti {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f39c12;
    animation: confetti 3s linear;
    z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flashcards-game {
        padding: 20px;
        margin: 20px 0;
    }
    
    .flashcard-container {
        height: 200px;
        max-width: 350px;
    }
    
    .flashcard-word {
        font-size: 1.8em;
    }
    
    .flashcard-definition {
        font-size: 1.1em;
    }
    
    .flashcard-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        min-width: auto;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .flashcards-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }
    
    .stat-number {
        font-size: 1.4em;
    }
}
/* Añade estas reglas al final de tu archivo assets/css/style.css */

/* Corregir visibilidad del texto en flashcards */
.flashcards-game p {
    color: white !important; /* Forzar texto blanco */
    margin-bottom: 25px;
    opacity: 1; /* Cambiar de 0.9 a 1 para mayor visibilidad */
    font-size: 1.1em;
    font-weight: 500; /* Hacer el texto un poco más bold */
}

.flashcards-game #flashcards-description {
    color: white !important;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Añadir sombra para mejor legibilidad */
}

/* Mejorar el texto de finalización */
.flashcards-complete p {
    color: white !important;
    font-size: 1.1em;
    margin-bottom: 20px;
    opacity: 1;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.flashcards-complete #completion-message {
    color: white !important;
    font-weight: 600; /* Más bold para el mensaje principal */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}
/* AÑADIR ESTOS ESTILOS AL FINAL DE assets/css/style.css */

/* ===== HERO SECTION - PORTADA ===== */

.hero-section {
    position: relative;
    width: calc(100% + 80px);
    /* height: 500px;  ❌ Elimina esto */
    aspect-ratio: 1 / 1; /* ✅ Esto lo hace cuadrado moderno */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: -40px -40px 40px -40px;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #4a5568 50%, #2d3748 100%);
}

.hero-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7) saturate(1.1);
    transform: scale(1.2); /* ✅ REDUCIDO: de 1.9 a 1.2 para mejor ajuste */
    transition: all 3s ease-out;
    opacity: 0;
}

.cover-image.loaded {
    opacity: 1;
    transform: scale(1); /* ✅ Ahora se verá la imagen completa */
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(74, 85, 104, 0.5) 0%,
        rgba(45, 55, 72, 0.7) 50%,
        rgba(26, 32, 44, 0.9) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 80%; /* ✅ AJUSTADO: para que quepa mejor en el cuadrado */
    padding: 20px;
    margin: 0 auto;
}

.main-title {
    font-family: 'Crimson Text', serif;
    font-size: 3.5rem; /* ✅ REDUCIDO: de 4rem a 3.5rem */
    font-weight: 700;
    margin-bottom: 15px; /* ✅ REDUCIDO: de 20px a 15px */
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
    background: linear-gradient(135deg, #ffffff, #f7fafc, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem; /* ✅ REDUCIDO: de 1.8rem a 1.6rem */
    font-weight: 500;
    margin-bottom: 20px; /* ✅ REDUCIDO: de 30px a 20px */
    color: #ffffff !important;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.3s;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    font-style: italic;
}

.story-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem; /* ✅ REDUCIDO: de 1.2rem a 1.1rem */
    line-height: 1.5; /* ✅ REDUCIDO: de 1.6 a 1.5 */
    margin-bottom: 30px; /* ✅ REDUCIDO: de 40px a 30px */
    color: #ffffff !important;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.6s;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    max-width: 90%; /* ✅ AUMENTADO: de 600px a 90% */
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.start-reading-btn {
    background: linear-gradient(135deg, #d69e2e 0%, #ed8936 50%, #c05621 100%);
    color: white;
    border: none;
    padding: 15px 35px; /* ✅ REDUCIDO: de 18px 40px a 15px 35px */
    border-radius: 50px;
    font-size: 1rem; /* ✅ REDUCIDO: de 1.1rem a 1rem */
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(214, 158, 46, 0.4);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

/* Responsive Design - AJUSTADO para contenedor cuadrado */
@media (max-width: 768px) {
    .hero-section {
        height: 400px;
        margin: -30px -35px 30px -35px;
        width: calc(100% + 70px);
    }
    
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .subtitle {
        font-size: 1.3rem;
        text-shadow: 3px 3px 10px rgba(0,0,0,0.9);
        font-weight: 600;
    }
    
    .story-description {
        font-size: 0.95rem;
        text-shadow: 3px 3px 10px rgba(0,0,0,0.9);
        font-weight: 600;
        max-width: 95%;
    }
    
    .start-reading-btn {
        padding: 12px 28px;
        font-size: 0.9rem;
    }
    
    /* ✅ AJUSTE del zoom en móviles para contenedor cuadrado */
    .cover-image {
        transform: scale(1.3);
    }
    
    .cover-image.loaded {
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .hero-section {
        margin: -20px -25px 30px -25px;
        border-radius: 0 0 10px 10px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .story-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .hero-content {
        padding: 15px;
        max-width: 95%;
    }
    
    /* ✅ AJUSTE adicional del zoom en pantallas muy pequeñas */
    .cover-image {
        transform: scale(1.4);
    }
    
    .cover-image.loaded {
        transform: scale(1.1);
    }
}

.start-reading-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(214, 158, 46, 0.6);
    background: linear-gradient(135deg, #ed8936 0%, #c05621 50%, #9c2a2a 100%);
}

.start-reading-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-icon {
    font-size: 1.3em;
    transition: transform 0.3s ease;
}

.start-reading-btn:hover .btn-icon {
    transform: rotate(10deg) scale(1.1);
}

/* Efecto de ondas en el botón */
.start-reading-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.start-reading-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Animaciones de entrada */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.start-reading-btn.fade-in {
    transform: translateY(0) scale(1) !important;
}

/* Welcome section mejorada */
.welcome-section {
    text-align: center;
    margin: 50px 0;
    padding: 30px 20px;
    background: rgba(74, 85, 104, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(74, 85, 104, 0.1);
}

.welcome-section h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--accent-blue);
    margin: 0;
    text-align: center;
}

/* Partículas flotantes de fondo */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px, 75px 75px;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        margin: -30px -35px 40px -35px;
    }
    
    .main-title {
        font-size: 2.8rem;
        letter-spacing: 1px;
    }
    
.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: #ffffff; /* ✅ CAMBIADO: de #ffd700 a blanco puro */
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.3s;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8); /* ✅ MEJORADO: sombra más fuerte */
    font-style: italic;
    font-weight: 500; /* ✅ AÑADIDO: texto más bold para mejor legibilidad */
}
    
.story-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #f7fafc; /* ✅ CAMBIADO: de #e2e8f0 a blanco más puro */
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.6s;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9); /* ✅ MEJORADO: sombra más intensa */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500; /* ✅ AÑADIDO: texto más bold para mejor legibilidad */
}
    
    .start-reading-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .welcome-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 70vh;
        margin: -20px -25px 30px -25px;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .story-description {
        font-size: 0.95rem;
    }
    
    .hero-content {
        padding: 30px 15px;
    }
}
/* ===== CLASE HIDDEN GLOBAL ===== */
.hidden {
    display: none !important;
}

/* ===== ESPECIFICIDAD PARA FLASHCARDS ===== */
.flashcards-game.hidden {
    display: none !important;
}

#flashcards-content.hidden {
    display: none !important;
}

#flashcards-complete.hidden {
    display: none !important;
}
/* Sección de modos */
.mode-section {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.mode-section:hover {
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

.mode-section h4 {
    color: white;
    font-size: 1.2em;
    margin-bottom: 8px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.mode-description {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
    font-family: 'Inter', sans-serif;
}

/* Modo productivo con color diferente */
.productive-mode {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
}

.productive-mode:hover {
    border-color: rgba(46, 204, 113, 0.5);
}

.productive-mode h4 {
    color: #2ecc71;
}

/* Botones de modo */
.mode-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.flashcards-btn.productive {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-color: transparent;
}

.flashcards-btn.productive:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
}

/* Indicador de modo activo */
.mode-indicator {
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    padding: 10px 20px;
    margin: 0 auto 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    max-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#current-mode-text {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    font-family: 'Inter', sans-serif;
}

#mode-arrow {
    font-size: 1.2em;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
}

/* Tarjetas en modo productivo */
.flashcard.productive-mode .flashcard-front {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-color: #28a745;
}

.flashcard.productive-mode .flashcard-back {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #6c757d;
}

/* Ajustes de texto para modo productivo */
.flashcard.productive-mode .flashcard-word {
    color: #155724;
}

.flashcard.productive-mode .flashcard-definition {
    color: #495057;
    font-weight: 600;
    font-size: 1.4em;
}

/* Responsive para nuevos elementos */
@media (max-width: 768px) {
    .mode-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .mode-section h4 {
        font-size: 1.1em;
    }
    
    .mode-buttons {
        flex-direction: column;
    }
    
    .flashcards-btn {
        width: 100%;
        margin: 0;
    }
    
    .mode-indicator {
        flex-direction: column;
        gap: 8px;
        padding: 12px 15px;
    }
    
    #mode-arrow {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .mode-section {
        padding: 12px;
    }
    
    .mode-description {
        font-size: 0.85em;
    }
    
    .mode-indicator {
        max-width: 250px;
        padding: 10px 12px;
    }
    
    #current-mode-text {
        font-size: 0.85em;
    }
}

/* Animación especial para modo productivo */
@keyframes productiveModeEntry {
    from {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        transform: scale(0.95);
    }
    to {
        background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
        transform: scale(1);
    }
}

.flashcard.productive-entry {
    animation: productiveModeEntry 0.6s ease;
}

/* Estado hover mejorado para secciones de modo */
.mode-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mode-section:hover::before {
    opacity: 1;
}

.productive-mode::before {
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.1), transparent);
}

/* Efecto de glow para el indicador de modo */
.mode-indicator.active {
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.4);
}

/* Estilo especial para descripción del modo productivo */
.productive-mode .mode-description {
    color: rgba(46, 204, 113, 0.9) !important;
    font-weight: 500;
}
/* Botón de audio en el reverso de la tarjeta */
.flashcard-audio-back {
    background: rgba(0,0,0,0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    color: #155724;
}

.flashcard-audio-back:hover {
    background: rgba(0,0,0,0.2);
    transform: scale(1.1);
}

/* Mejorar el texto en modo productivo */
.flashcard.productive-mode .flashcard-word {
    color: #155724 !important;
    font-size: 1.8em;
}

.flashcard.productive-mode .flashcard-definition {
    color: #495057 !important;
    font-weight: 600;
    font-size: 1.8em;
}
