/* =========================================
   STYLE.CSS (GAEILGE MODULE)
   ========================================= */

:root { 
    --primary: #16a34a;       /* Verde Irlanda */
    --primary-dark: #15803d;
    --secondary: #ea580c;     /* Naranja */
    --study: #7c3aed;         /* Púrpura (Study Mode) */
    --study-light: #ddd6fe;
    --bg: #f0fdf4;            /* Fondo verde muy pálido */
    --text: #022c22; 
}

body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); padding: 20px; margin: 0; }

/* Container */
.container { max-width: 800px; margin: 0 auto; background: white; padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); min-height: 90vh; display: flex; flex-direction: column; }

/* HEADER */
header { text-align: center; margin-bottom: 20px; }
h1 { margin: 0; color: var(--primary); font-size: 2.2rem; letter-spacing: -1px; }
.subtitle { color: #64748b; margin-top: 5px; font-size: 0.95rem; font-weight: 700; }

/* TECH ALERT */
.tech-alert {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    padding: 15px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-top: 20px;
    text-align: left;
    border-left: 5px solid var(--secondary);
}

.info-toggle { background: #dcfce7; color: var(--primary-dark); border: none; padding: 8px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; cursor: pointer; margin-top: 15px; display: inline-flex; align-items: center; gap: 5px; }
.info-box { display: none; background: #f0fdf4; border: 1px solid #bbf7d0; padding: 15px; border-radius: 12px; margin-bottom: 20px; text-align: left; font-size: 0.9rem; color: #334155; }

/* TABS SYSTEM */
.tabs-container { display: flex; gap: 10px; margin-bottom: 25px; padding: 5px; background: #f1f5f9; border-radius: 15px; overflow-x: auto; }
.tab-btn { flex: 1; padding: 12px; border: none; border-radius: 10px; font-weight: 800; cursor: pointer; transition: 0.2s; color: #64748b; background: transparent; white-space: nowrap; }
.tab-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-bottom: 3px solid var(--secondary); }

/* LEVEL SELECTOR */
.level-selector { display: flex; background: #f8fafc; padding: 5px; border-radius: 12px; margin-bottom: 10px; border: 1px solid #e2e8f0; }
.level-btn { flex: 1; padding: 10px; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; transition: 0.3s; font-size: 0.9rem; color: #64748b; background: transparent; }
.level-btn.active { background: white; color: var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* MODE SELECTOR (NUEVO) */
.mode-selector { display: flex; background: #f8fafc; padding: 5px; border-radius: 12px; margin-bottom: 25px; border: 1px solid #e2e8f0; }
.mode-btn { flex: 1; padding: 10px; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; transition: 0.3s; font-size: 0.9rem; color: #64748b; background: transparent; }
.mode-btn.active { background: white; color: var(--study); box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 2px solid var(--study); }
#modeExam.active { color: var(--primary); border-color: var(--primary); }

/* STUDY CONTAINER & CHECKPOINTS (NUEVO) */
.study-box { background: #f5f3ff; border: 2px solid #8b5cf6; border-radius: 15px; padding: 20px; margin-bottom: 25px; animation: fadeIn 0.3s ease-in; }
.study-box h3 { margin-top: 0; color: #5b21b6; }
.small-text { font-size: 0.85rem; color: #6d28d9; margin-bottom: 15px; }

.checklist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); gap: 8px; margin-bottom: 15px; }
.check-btn { padding: 10px; border: 1px solid #ddd6fe; border-radius: 8px; background: white; text-align: left; cursor: pointer; font-size: 0.9rem; color: #4c1d95; transition: 0.2s; display: flex; align-items: center; gap: 8px; }
.check-btn:hover { background: #ede9fe; transform: translateX(3px); }

/* Colores para Checkpoints (Irish Colors) */
.btn-ol { border-left: 4px solid var(--primary); } /* Verde */
.btn-hl { border-left: 4px solid var(--secondary); } /* Naranja */
.btn-top { background: #f0fdf4; border: 1px solid var(--primary-dark); color: var(--primary-dark); font-weight: bold; border-left: 4px solid var(--primary-dark); }

/* AI EXPLANATION BOX */
.ai-box { margin-top: 15px; background: white; border-left: 4px solid #8b5cf6; padding: 15px; border-radius: 4px; font-size: 0.95rem; line-height: 1.6; color: #374151; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15); animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* MOCK EXAM BUTTON */
.mock-btn { width: 100%; padding: 15px; margin-bottom: 25px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border: none; border-radius: 12px; font-weight: 800; font-size: 1.1rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3); transition: transform 0.2s; }
.mock-btn:hover { transform: scale(1.02); }

/* GRID TEMAS */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 25px; }
.topic-btn { padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: white; cursor: pointer; font-size: 0.85rem; font-weight: 600; text-align: center; color: #475569; transition: 0.2s; }
.topic-btn:hover { background: #dcfce7; border-color: var(--primary); }
.topic-btn.active { border-color: var(--primary); background: #dcfce7; color: var(--primary-dark); transform: scale(1.02); font-weight: 800; }

.question-card { background: #f0fdf4; border-left: 5px solid var(--primary); padding: 25px; border-radius: 0 12px 12px 0; margin-bottom: 20px; }

/* POEMAS & SRAITH */
.rp-selector { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 10px; margin-bottom: 20px; scrollbar-width: none; }
.rp-btn-select { min-width: 140px; padding: 10px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 50px; font-size: 0.85rem; font-weight: 700; cursor: pointer; color: #475569; text-align: center; }
.rp-btn-select.active { background: var(--primary); color: white; border-color: var(--primary); }

/* REPRODUCTOR DE AUDIO PRO */
.custom-audio-player {
    background: #f0fdf4; 
    border: 1px solid #16a34a;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-controls { display: flex; align-items: center; gap: 15px; }

.play-btn-circle {
    width: 45px; height: 45px; border-radius: 50%; background: #16a34a; color: white; border: none; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.play-btn-circle:hover { transform: scale(1.05); background: #15803d; }

.timeline-container { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }

input[type=range].audio-range { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range].audio-range::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #16a34a; cursor: pointer; margin-top: -6px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
input[type=range].audio-range::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #bbf7d0; border-radius: 2px; }

.time-display { font-size: 0.8rem; color: #166534; font-weight: 600; margin-top: 5px; display: flex; justify-content: space-between; }

/* SHARED */
.audio-btn { margin-top: 15px; background: white; border: 1px solid #e2e8f0; padding: 8px 16px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; cursor: pointer; color: var(--text); }
textarea { width: 100%; border: 2px solid #e2e8f0; border-radius: 15px; padding: 15px; min-height: 120px; box-sizing: border-box; font-size: 1rem; margin-bottom: 15px; font-family: inherit; }
textarea:focus { border-color: var(--primary); outline: none; }
.btn-main { width: 100%; padding: 16px; background: var(--text); color: white; border: none; border-radius: 15px; font-weight: 800; cursor: pointer; font-size: 1.1rem; }
.btn-main:disabled { opacity: 0.5; cursor: wait; }

/* FEEDBACK */
.student-response-box { background: #f1f5f9; padding: 15px; border-radius: 10px; margin-bottom: 20px; border-left: 4px solid #94a3b8; font-style: italic; color: #475569; }
.feedback-box { padding: 25px; border-radius: 15px; background: #fff; border: 1px solid #e2e8f0; }
.error-item { margin-bottom: 15px; padding: 15px; background: #fff7ed; border-radius: 10px; border-left: 4px solid var(--secondary); }

/* FOOTER */
.footer-section { margin-top: auto; padding: 40px 20px 20px; border-top: 1px solid #e2e8f0; background: #fafafa; border-radius: 20px; text-align: center; }
.profile-img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); margin-bottom: 15px; }
.bio-text { max-width: 600px; margin: 0 auto 25px auto; font-size: 0.95rem; line-height: 1.6; color: #475569; text-align: justify; }
.revolut-btn { background: #000; color: white; text-decoration: none; padding: 14px 28px; border-radius: 50px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; transition: 0.2s; }
.revolut-btn:hover { transform: translateY(-2px); }

/* SUPPORT BOX */
.support-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 12px; padding: 15px; margin: 20px auto 15px auto; max-width: 90%; text-align: center; }
.support-title { font-weight: 800; color: #92400e; margin-bottom: 5px; display: block; font-size: 0.95rem; }
.support-text { font-size: 0.85rem; color: #78350f; line-height: 1.5; margin: 0; }

/* =========================================
   FOOTER LEGAL & EXTRAS (NUEVO)
   ========================================= */
.feedback-section { margin-top: 35px; border-top: 1px dashed #cbd5e1; padding-top: 25px; }
.legal-section { margin-top: 50px; border-top: 1px solid #e2e8f0; padding-top: 20px; font-size: 0.75rem; color: #94a3b8; line-height: 1.5; }
.legal-section p { margin: 5px 0; }
