/* ============================================================
   STYLE.CSS — B1 Lesson 9: Health & Gerunds (UK English)
   Green dark theme, matching lesson template
   ============================================================ */

/* --- 1. GLOBAL --- */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}
.container { max-width: 1100px; margin: 0 auto; padding-bottom: 100px; }

/* --- 2. HEADER & NAV --- */
header {
    border-bottom: 2px solid #27ae60;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
h1 { margin: 0; font-size: 1.8rem; color: #fff; }
.level-badge {
    display: inline-block; background: #27ae60; color: #fff;
    font-size: 0.75rem; font-weight: bold; padding: 3px 9px;
    border-radius: 3px; margin-bottom: 8px; letter-spacing: 0.05em;
}
.subtitle { color: #aaa; font-size: 0.9rem; margin-top: 6px; }

.back-link {
    text-decoration: none; color: #888; border: 1px solid #444;
    padding: 5px 10px; border-radius: 4px; font-size: 0.9rem;
    transition: 0.2s; white-space: nowrap;
}
.back-link:hover { color: #fff; border-color: #fff; }

.nav-container { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
button.nav-btn {
    background: #1e1e1e; border: 1px solid #333; color: #aaa;
    padding: 10px 16px; cursor: pointer; border-radius: 4px;
    transition: 0.3s; font-weight: bold; font-size: 0.95rem;
}
button.nav-btn.active,
button.nav-btn:hover { background: #27ae60; color: white; border-color: #27ae60; }

/* --- 3. SECTIONS --- */
.section-box {
    display: none;
    background: #1e1e1e;
    border: 1px solid #333;
    border-top: 4px solid #27ae60;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    animation: fadeIn 0.4s ease;
}
.section-box.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- 4. VOCABULARY --- */
.vocab-list-single { display: flex; flex-direction: column; gap: 5px; max-width: 800px; margin: 0 auto; }
.vocab-category {
    color: #2ecc71; margin-top: 25px; margin-bottom: 5px;
    border-bottom: 1px solid #444; padding-bottom: 5px;
    text-transform: uppercase; font-size: 1rem;
}
.vocab-row {
    display: flex; align-items: center; padding: 10px 15px;
    border-bottom: 1px solid #333; font-size: 1rem;
    background: #222; border-radius: 4px;
}
.vocab-row:hover { background: #2a2a2a; border-left: 3px solid #27ae60; }
.vocab-row span:first-child { font-weight: bold; width: 220px; color: #fff; flex-shrink: 0; }
.ipa { color: #f39c12; width: 180px; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', sans-serif; font-size: 0.9rem; flex-shrink: 0; }
.bg { color: #aaa; font-style: italic; margin-right: auto; }
.speak-btn {
    background: none; border: none; cursor: pointer; font-size: 1.2rem;
    margin-left: 10px; filter: grayscale(1); transition: 0.2s; color: #2ecc71;
}
.speak-btn:hover { filter: grayscale(0); transform: scale(1.1); }
.context-note {
    background: #2a2a2a; padding: 15px; border-left: 3px solid #2ecc71;
    color: #ccc; margin-bottom: 20px; font-size: 0.95rem;
    border-radius: 0 4px 4px 0;
}

/* --- 5. GRAMMAR RULES --- */
.rule-box { margin-bottom: 40px; border-bottom: 1px solid #333; padding-bottom: 30px; }
.rule-box:last-child { border-bottom: none; }
.rule-box h3 { color: #2ecc71; font-size: 1.15rem; margin-bottom: 8px; }
.rule-intro { color: #bbb; margin-bottom: 15px; font-size: 0.95rem; line-height: 1.7; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 20px; }
.three-col { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rule-card { background: #252525; border: 1px solid #444; padding: 15px; border-radius: 8px; }
.rule-card h4 { color: #f39c12; margin-top: 0; border-bottom: 1px solid #555; padding-bottom: 5px; font-size: 0.95rem; }
.rule-card ul { padding-left: 18px; color: #ccc; font-size: 0.88rem; margin: 0; }
.rule-card ul li { margin-bottom: 6px; }

.pro-table { width: 100%; border-collapse: collapse; background: #222; border: 1px solid #333; font-size: 0.9rem; margin-bottom: 20px; }
.pro-table th { background: #1a1a1a; color: #2ecc71; padding: 12px; text-align: left; border-bottom: 2px solid #333; font-weight: 600; }
.pro-table td { padding: 10px 12px; border-bottom: 1px solid #333; color: #e0e0e0; vertical-align: top; line-height: 1.6; }
.pro-table tr:hover { background: #2a2a2a; }
.pro-table .col-div { border-left: 2px solid #444; }

/* --- 6. GRAMMAR EXERCISE BLOCKS --- */
.grammar-ex-block {
    background: #1a1a1a; border-radius: 8px; padding: 20px;
    margin-top: 20px; border: 1px solid #333;
}
.easy-ex { border-left: 4px solid #27ae60; }
.hard-ex { border-left: 4px solid #e67e22; }
.ex-instructions {
    color: #ddd; margin-bottom: 15px; font-size: 0.95rem;
    background: #252525; padding: 10px 14px; border-radius: 5px;
}
.g-item {
    margin-bottom: 12px; padding: 8px 10px; background: #222;
    border-radius: 4px; font-size: 0.93rem; display: flex;
    align-items: center; flex-wrap: wrap; gap: 8px;
    color: #ddd; border: 1px solid #333;
}
.g-select {
    background: #333; border: 1px solid #555; color: #fff;
    padding: 4px 8px; border-radius: 4px;
    font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; cursor: pointer;
}
.g-input {
    background: #333; border: 1px solid #555; color: #fff;
    padding: 5px 10px; border-radius: 4px; width: 200px;
    font-family: 'Segoe UI', sans-serif; font-size: 0.9rem;
}
.g-input.wide-input { width: 320px; }
.g-fb { font-weight: bold; font-size: 0.9rem; }
.ex-btn-row {
    display: flex; align-items: center; gap: 15px;
    margin-top: 15px; padding-top: 12px; border-top: 1px solid #333;
}

/* --- 7. MC MEANING PAIRS (Section 5 hard exercise) --- */
.meaning-pair-block {
    background: #1a1a1a; border-radius: 8px; padding: 20px;
    margin-top: 20px; border: 1px solid #333; border-left: 4px solid #e67e22;
}
.meaning-pair-block .ex-instructions {
    margin-bottom: 18px;
}
.pair-item {
    background: #222; border: 1px solid #333; border-radius: 6px;
    padding: 14px 16px; margin-bottom: 16px;
}
.pair-sentences {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.pair-sentence {
    flex: 1; min-width: 200px;
    background: #2a2a2a; border: 1px solid #444;
    border-radius: 5px; padding: 8px 12px;
    font-size: 0.92rem; color: #fff; line-height: 1.6;
}
.pair-sentence strong { color: #f39c12; }
.pair-question {
    font-size: 0.9rem; color: #bbb; margin-bottom: 8px; font-weight: bold;
}
.mc-options {
    display: flex; flex-direction: column; gap: 6px;
}
.mc-option {
    background: #2a2a2a; border: 1px solid #444; border-radius: 4px;
    padding: 8px 14px; cursor: pointer; font-size: 0.9rem;
    color: #ccc; text-align: left; transition: 0.2s; width: 100%;
}
.mc-option:hover { background: #333; border-color: #666; }
.mc-option.selected { border-color: #f39c12; color: #fff; background: #2f2b1a; }
.mc-option.correct { background: #1a2f1a !important; border-color: #2ecc71 !important; color: #2ecc71 !important; }
.mc-option.wrong { background: #2f1a1a !important; border-color: #e74c3c !important; color: #e74c3c !important; }
.pair-fb { font-size: 0.88rem; margin-top: 8px; font-weight: bold; display: none; }

/* --- 8. READING --- */
.newspaper-container {
    border: 2px solid #555; background: #222;
    padding: 20px; border-radius: 8px; min-height: 450px; position: relative;
}
.newspaper-page { display: none; animation: fadeIn 0.5s; }
.newspaper-page.active { display: block; }
.news-layout { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.news-img {
    flex: 0 0 100px; height: 120px; background: #333; border: 1px solid #444;
    display: flex; align-items: center; justify-content: center;
    border-radius: 5px; font-size: 3rem;
}
.news-content { flex: 3; min-width: 250px; }
.news-content h3 { color: #f39c12; margin-top: 0; }
.news-content p { color: #ddd; font-size: 0.95rem; line-height: 1.75; margin: 0 0 10px; white-space: pre-line; }
.news-controls { display: flex; justify-content: center; align-items: center; margin-top: 20px; }
.reading-quiz {
    background: #1a1a1a; padding: 18px; border-radius: 5px;
    border-left: 3px solid #f39c12; margin-top: 10px;
}
.reading-quiz h4 { color: #f39c12; margin-top: 0; margin-bottom: 15px; }
.mc-q { margin-bottom: 18px; }
.mc-q p { color: #fff; font-weight: bold; margin-bottom: 8px; font-size: 0.95rem; }
.mc-q label {
    display: block; padding: 7px 12px; margin-bottom: 4px;
    background: #252525; border-radius: 4px; cursor: pointer;
    font-size: 0.9rem; color: #ccc; border: 1px solid #333; transition: 0.2s;
}
.mc-q label:hover { background: #2e2e2e; border-color: #555; }
.mc-q input[type="radio"] { margin-right: 8px; accent-color: #27ae60; }
.mc-fb { display: block; font-weight: bold; font-size: 0.9rem; margin-top: 4px; }
.wide-speak {
    font-size: 0.9rem; background: #252525; border: 1px solid #444;
    border-radius: 4px; padding: 5px 12px; cursor: pointer;
    color: #2ecc71; margin-top: 8px; filter: none;
}
.wide-speak:hover { background: #2f2f2f; }

/* --- 9. CLOZE --- */
.cloze-container { background: #222; border: 1px solid #444; padding: 25px; border-radius: 8px; }
.cloze-text { font-size: 1rem; line-height: 2.3; color: #ddd; }
.cloze-text p { margin-bottom: 18px; }
.cloze-select {
    background: #2a2a2a; border: 1px solid #555;
    border-bottom: 2px solid #f39c12; color: #fff;
    padding: 3px 8px; border-radius: 4px 4px 0 0;
    font-size: 0.95rem; cursor: pointer; margin: 0 4px; transition: 0.2s;
}
.cloze-select:focus { outline: none; border-color: #f39c12; }
.cloze-controls {
    display: flex; align-items: center; gap: 15px;
    margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; flex-wrap: wrap;
}
.cloze-feedback-box {
    background: #1a2a1a; border: 1px solid #2ecc71;
    padding: 15px; border-radius: 5px; margin-top: 15px;
    font-size: 0.9rem; color: #ccc; line-height: 1.8;
}
.reset-btn { background: #333 !important; color: #aaa !important; }
.reset-btn:hover { background: #444 !important; }

/* --- 10. DRILLS --- */
.quiz-block {
    border: 1px solid #333; padding: 20px; border-radius: 8px;
    background: #252525; margin-bottom: 20px;
}
.quiz-header { font-weight: bold; color: #f39c12; margin-bottom: 8px; border-bottom: 1px solid #444; padding-bottom: 5px; font-size: 1rem; }
.drill-instructions {
    background: #1e1e1e; padding: 9px 12px; border-radius: 4px;
    border-left: 3px solid #27ae60; color: #ccc; margin-bottom: 12px; font-size: 0.88rem;
}
.mini-quiz-item {
    margin-bottom: 8px; padding: 10px; background: #222; border-radius: 4px;
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    border: 1px solid #333; font-size: 0.93rem; color: #ddd;
}
.quiz-input {
    background: #333; border: 1px solid #555; color: #fff;
    padding: 5px 10px; border-radius: 4px; width: 200px;
    font-family: 'Segoe UI', sans-serif;
}
.check-btn {
    background: #f39c12; color: #111; border: none;
    padding: 7px 14px; border-radius: 4px; cursor: pointer;
    font-weight: bold; transition: 0.2s; font-size: 0.9rem;
}
.check-btn:hover { background: #d35400; color: white; }
.drill-fb { font-weight: bold; font-size: 0.88rem; }
.score-display { font-weight: bold; font-size: 1rem; color: #f39c12; }

/* --- 11. COMPARE BOXES --- */
.example-compare { display: flex; gap: 15px; align-items: stretch; flex-wrap: wrap; margin: 20px 0; }
.wrong-box {
    background: #2f1a1a; border: 1px solid #e74c3c; padding: 14px;
    border-radius: 6px; flex: 1; min-width: 200px; font-size: 0.9rem;
    color: #f5b7b1; line-height: 1.8;
}
.correct-box {
    background: #1a2f1a; border: 1px solid #2ecc71; padding: 14px;
    border-radius: 6px; flex: 1; min-width: 200px; font-size: 0.9rem;
    color: #a9dfbf; line-height: 1.8;
}

/* --- 12. KWT --- */
.kwt-item {
    background: #252525; border: 1px solid #444; border-radius: 8px;
    padding: 18px 20px; margin-bottom: 16px;
}
.kwt-number { font-size: 0.78rem; color: #888; font-weight: bold; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.kwt-s1 { color: #ddd; font-size: 0.95rem; margin-bottom: 14px; line-height: 1.6; border-left: 3px solid #555; padding-left: 10px; }
.kwt-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.kwt-keyword {
    background: #f39c12; color: #111; font-weight: bold; font-size: 0.88rem;
    padding: 4px 10px; border-radius: 4px; letter-spacing: 0.05em; white-space: nowrap;
}
.kwt-gapped { color: #ccc; font-size: 0.95rem; line-height: 1.8; }
.kwt-input {
    background: #333; border: 1px solid #555; color: #fff;
    padding: 5px 10px; border-radius: 4px; width: 260px;
    font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; margin: 0 4px;
}
.kwt-fb { display: none; font-weight: bold; font-size: 0.9rem; margin-top: 6px; }

/* --- 13. LEVEL TAGS --- */
.level-tag { font-size: 0.65rem; font-weight: bold; padding: 1px 5px; border-radius: 3px; vertical-align: middle; margin-left: 4px; }
.level-tag.b2 { background: #8e44ad; color: #fff; }

/* --- 14. TENSE WRITING --- */
/* reuses .grammar-ex-block.hard-ex */

/* --- 15. RESPONSIVE --- */
@media (max-width: 600px) {
    .vocab-row span:first-child { width: 140px; }
    .ipa { width: 100px; font-size: 0.8rem; }
    .g-input.wide-input { width: 100%; }
    .pair-sentences { flex-direction: column; }
}