/* --- 1. GLOBAL STYLES --- */
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; }
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; }
.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; }

/* --- 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); } }

/* --- VOCAB --- */
.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: 150px; color: #fff; }
.ipa { color: #f39c12; width: 140px; font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', sans-serif; font-size: 0.9rem; }
.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; }

/* --- GRAMMAR --- */
.grammar-block { margin-bottom: 40px; }
.grammar-title-bar { background: #121212; padding: 10px 15px; border-left: 5px solid #555; display: flex; justify-content: space-between; align-items: center; color: #fff; font-weight: bold; margin-bottom: 10px; }
.grammar-title-bar.positive { border-left-color: #2ecc71; }
.grammar-title-bar.negative { border-left-color: #e74c3c; }
.grammar-title-bar.question { border-left-color: #f39c12; }
.pro-table { width: 100%; border-collapse: collapse; background: #222; border: 1px solid #333; font-size: 0.95rem; }
.pro-table th { background: #1a1a1a; color: #2ecc71; padding: 12px; text-align: left; border-bottom: 2px solid #333; font-weight: 600; }
.pro-table td { padding: 12px; border-bottom: 1px solid #333; color: #e0e0e0; }
.pro-table tr:hover { background: #2a2a2a; }
.short-answer-box { background: #252525; padding: 10px; border: 1px solid #333; border-top: none; color: #bbb; font-style: italic; font-size: 0.9rem; }

/* --- READING --- */
.newspaper-container { border: 2px solid #555; background: #222; padding: 20px; border-radius: 8px; min-height: 300px; position: relative; }
.newspaper-page { display: none; animation: fadeIn 0.5s; }
.newspaper-page.active { display: block; }
.news-layout { display: flex; gap: 20px; flex-wrap: wrap; }
.news-img { flex: 1; min-width: 200px; height: 250px; background: #333; border: 1px solid #444; display:flex; align-items:center; justify-content:center; border-radius: 5px; }
.news-content { flex: 2; min-width: 250px; }
.news-content h3 { color: #f39c12; margin-top: 0; }
.news-controls { display: flex; justify-content: center; align-items: center; margin-top: 20px; }

/* --- DRILLS (CARD LAYOUT) --- */
.quiz-block { border: 1px solid #333; padding: 20px; border-radius: 8px; background: #252525; margin-bottom: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.quiz-header { font-weight: bold; color: #2ecc71; margin-bottom: 10px; border-bottom: 1px solid #444; padding-bottom: 5px; font-size: 1.1rem; }
.mini-quiz-item { margin-bottom: 15px; padding: 15px; background: #1e1e1e; border-radius: 4px; display: flex; flex-direction: column; gap: 10px; border: 1px solid #333; font-size: 1rem; color: #eee; }
.party-options { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; width: 100%; } /* 4 buttons in a row */
.ex-btn { background: #34495e; border: 1px solid #2c3e50; color: #ccc; padding: 12px 10px; border-radius: 4px; cursor: pointer; transition: 0.2s; font-size: 0.9rem; text-align: center; }
.ex-btn:hover { background: #3d566e; border-color: #777; color: white; }
.quiz-input { background: #333; border: 1px solid #555; color: #fff; padding: 8px 10px; border-radius: 4px; width: 200px; font-family: 'Segoe UI', sans-serif; font-size: 1rem; }
.check-btn { background: #2ecc71; color: white; border: none; padding: 8px 20px; border-radius: 4px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 0.9rem; margin-left: 10px; }
.check-btn:hover { background: #27ae60; }
.feedback-icon { font-weight: bold; font-size: 1.2rem; margin-left: 10px; }

/* --- LIGHT NOVEL --- */
.level-selector { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.lvl-btn { background: #333; color: #888; border: 1px solid #444; padding: 5px 15px; cursor: pointer; border-radius: 20px; font-size: 0.9rem; transition: 0.3s; }
.lvl-btn.active { background: #2ecc71; color: #fff; border-color: #2ecc71; font-weight: bold; }
.comic-board { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-width: 900px; margin: 0 auto; background: #2c3e50; padding: 20px; border-radius: 8px; border: 4px solid #1a252f; }
.comic-panel { background: #fff; border: 3px solid #000; padding: 10px; border-radius: 4px; display: flex; align-items: center; gap: 15px; min-height: 110px; }
.comic-panel.right { justify-content: flex-end; flex-direction: row; }
.comic-img { width: 70px; height: 70px; border-radius: 50%; border: 2px solid #333; object-fit: cover; background: #ddd;}
.speech-bubble { background: #fff; border: 2px solid #000; border-radius: 15px; padding: 10px 15px; color: #000; font-weight: bold; position: relative; flex-grow: 1; text-align: center; min-height: 40px; display: flex; align-items: center; justify-content: center; font-family: 'Comic Sans MS', sans-serif;}
.speech-bubble.empty { border: 2px dashed #bbb; color: #bbb; background: #f4f4f4; }
.speech-bubble.correct { border: 2px solid #2ecc71; background: #d5f5e3; }
.comic-bank { display:flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top:20px; border-top: 1px dashed #555; padding-top: 20px; }
.comic-phrase { background: #f1f1f1; color: #333; padding: 8px 15px; border: 1px solid #999; border-radius: 20px; cursor: grab; display: inline-block; box-shadow: 0 2px 5px rgba(0,0,0,0.5); font-family: 'Comic Sans MS', sans-serif;}

/* --- THE FORTUNE GAME --- */
.game-container { display: flex; flex-direction: column; max-width: 800px; margin: 0 auto; background: #1a1a1a; padding: 20px; border-radius: 15px; border: 5px solid #27ae60; box-shadow: 0 0 30px rgba(39, 174, 96, 0.3); }
.cal-layout { display: flex; gap: 20px; min-height: 400px; }
.cal-left { flex: 1; display: flex; flex-direction: column; align-items: center; }
.cal-right { flex: 1; display: flex; flex-direction: column; align-items: center; border-left: 2px dashed #444; padding-left: 20px; }
.dialogue-box { background: #fff; color: #333; padding: 15px; border-radius: 10px; position: relative; width: 100%; text-align: center; border: 2px solid #333; margin-top: 20px; }
.dialogue-box::before { content:''; position:absolute; top:-10px; left:50%; transform:translateX(-50%); border-left:10px solid transparent; border-right:10px solid transparent; border-bottom:10px solid #fff; }
.cal-btn-grid { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.cal-opt-btn { background: #34495e; color: white; border: none; padding: 10px; border-radius: 5px; cursor: pointer; text-align: left; font-size: 0.9rem; transition: 0.2s; border: 1px solid #444; }
.cal-opt-btn:hover { background: #2c3e50; border-color: #27ae60; }
.reaction-bubble { background: #ecf0f1; color: #333; padding: 5px 15px; border-radius: 20px; margin-top: 10px; font-weight: bold; min-height: 30px; display: flex; align-items: center; justify-content: center; }

/* CSS LAVA LAMP (LEFT SIDE) */
.lava-lamp { width: 120px; height: 120px; border-radius: 50%; background: #000; border: 4px solid #27ae60; position: relative; overflow: hidden; box-shadow: 0 0 20px #27ae60; }
.lava-blob { width: 80px; height: 80px; background: radial-gradient(circle, #2ecc71, #145a32); border-radius: 50%; position: absolute; top: 20%; left: 20%; animation: blobMove 5s infinite ease-in-out alternate; filter: blur(5px); opacity: 0.8; }
.lava-blob::after { content:''; width: 40px; height: 40px; background: #27ae60; border-radius: 50%; position: absolute; top: -10px; left: 40px; animation: blobMove2 4s infinite ease-in-out reverse; }
@keyframes blobMove { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(10px, 20px) scale(1.1); } 100% { transform: translate(-5px, -10px) scale(0.9); } }
@keyframes blobMove2 { 0% { transform: translate(0, 0); } 100% { transform: translate(-20px, 30px); } }

@media (max-width: 600px) {
    .cal-layout { flex-direction: column; }
    .cal-right { border-left: none; border-top: 2px dashed #444; padding-left: 0; padding-top: 20px; }
    .party-options { grid-template-columns: 1fr 1fr; }
}
/* ─── LESSON 06 — GRAMMAR LAB EXTENSIONS ──────────────────────────────── */
.rule-box { margin-bottom: 35px; border-bottom: 1px solid #333; padding-bottom: 28px; }
.rule-box:last-child { border-bottom: none; }
.rule-box h3 { color: #2ecc71; font-size: 1.1rem; margin-bottom: 8px; }
.rule-intro { color: #bbb; margin-bottom: 14px; font-size: 0.95rem; line-height: 1.75; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 18px; }
.rule-card { background: #252525; border: 1px solid #444; padding: 14px; border-radius: 8px; }
.rule-card h4 { color: #f39c12; margin-top: 0; border-bottom: 1px solid #555; padding-bottom: 5px; font-size: 0.9rem; }
.rule-card ul { padding-left: 16px; color: #ccc; font-size: 0.87rem; margin: 0; }
.rule-card ul li { margin-bottom: 5px; }
.grammar-ex-block { background: #1a1a1a; border-radius: 8px; padding: 18px; margin-top: 18px; border: 1px solid #333; }
.easy-ex { border-left: 4px solid #27ae60; }
.hard-ex { border-left: 4px solid #e67e22; }
.ex-instructions { color: #ddd; margin-bottom: 13px; font-size: 0.93rem; background: #252525; padding: 9px 13px; border-radius: 5px; }
.g-item { margin-bottom: 10px; padding: 8px 10px; background: #222; border-radius: 4px; font-size: 0.92rem; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #ddd; border: 1px solid #333; }
.g-input { background: #333; border: 1px solid #555; color: #fff; padding: 5px 10px; border-radius: 4px; width: 180px; font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; }
.g-input.wide { width: 320px; }
.g-fb { font-weight: bold; font-size: 0.88rem; margin-left: 6px; }
.ex-btn-row { display: flex; align-items: center; gap: 14px; margin-top: 13px; padding-top: 10px; border-top: 1px solid #333; }
.score-display { font-weight: bold; font-size: 1rem; color: #f39c12; }
.example-compare { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.wrong-box { background: #2f1a1a; border: 1px solid #e74c3c; border-radius: 6px; padding: 10px 14px; color: #e0a0a0; font-size: 0.9rem; flex: 1; min-width: 180px; }
.correct-box { background: #1a2f1a; border: 1px solid #2ecc71; border-radius: 6px; padding: 10px 14px; color: #a0e0a0; font-size: 0.9rem; flex: 1; min-width: 180px; }
.news-content p { color: #ddd; font-size: 0.95rem; line-height: 1.8; white-space: pre-line; }
.news-content h3 { color: #f39c12; margin-top: 0; }
.news-img { flex: 0 0 80px; height: 100px; background: #333; border: 1px solid #444; display:flex; align-items:center; justify-content:center; border-radius: 5px; font-size: 2.8rem; }
.news-layout { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.reading-quiz { background: #1a1a1a; padding: 16px; border-radius: 5px; border-left: 3px solid #f39c12; margin-top: 8px; }
.reading-quiz h4 { color: #f39c12; margin-top: 0; margin-bottom: 13px; }
.mc-q { margin-bottom: 16px; }
.mc-q p { color: #fff; font-weight: bold; margin-bottom: 7px; font-size: 0.93rem; }
.mc-q label { display: block; padding: 6px 11px; margin-bottom: 3px; background: #252525; border-radius: 4px; cursor: pointer; font-size: 0.88rem; 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: 7px; accent-color: #27ae60; }
.mc-fb { display: block; font-weight: bold; font-size: 0.88rem; margin-top: 4px; }
.wide-speak { font-size: 0.88rem; background: #252525; border: 1px solid #444; border-radius: 4px; padding: 4px 11px; cursor: pointer; color: #2ecc71; margin-top: 6px; }
.cloze-container { background: #222; border: 1px solid #444; padding: 22px; border-radius: 8px; }
.cloze-text { font-size: 0.97rem; line-height: 2.4; color: #ddd; }
.cloze-text p { margin-bottom: 16px; }
.cloze-select { background: #2a2a2a; border: 1px solid #555; border-bottom: 2px solid #f39c12; color: #fff; padding: 3px 7px; border-radius: 4px 4px 0 0; font-size: 0.93rem; cursor: pointer; margin: 0 3px; }
.cloze-controls { display: flex; align-items: center; gap: 13px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #333; flex-wrap: wrap; }
.cloze-feedback-box { background: #1a2a1a; border: 1px solid #2ecc71; padding: 13px; border-radius: 5px; margin-top: 13px; font-size: 0.88rem; color: #ccc; line-height: 1.8; }
.reset-btn { background: #333 !important; color: #aaa !important; }
.drill-instructions { background: #1e1e1e; padding: 8px 11px; border-radius: 4px; border-left: 3px solid #27ae60; color: #ccc; margin-bottom: 10px; font-size: 0.86rem; }
.drill-fb { font-weight: bold; font-size: 0.86rem; }
.g-select { background: #333; border: 1px solid #555; border-bottom: 2px solid #27ae60; color: #fff; padding: 5px 10px; border-radius: 4px 4px 0 0; font-family: 'Segoe UI', sans-serif; font-size: 0.9rem; cursor: pointer; }
.g-select:focus { outline: none; border-color: #2ecc71; }
.level-badge { display: inline-block; background: #27ae60; color: #fff; font-size: 0.75rem; font-weight: bold; padding: 2px 8px; border-radius: 3px; margin-bottom: 4px; letter-spacing: 0.04em; }
.subtitle { font-size: 0.88rem; color: #888; margin-top: 4px; }
.compare-table { width: 100%; border-collapse: collapse; background: #222; border: 1px solid #333; font-size: 0.93rem; margin-bottom: 14px; }
.compare-table th { background: #1a1a1a; color: #2ecc71; padding: 11px 14px; text-align: left; border-bottom: 2px solid #333; }
.compare-table td { padding: 11px 14px; border-bottom: 1px solid #2a2a2a; color: #ddd; }
.compare-table tr:hover td { background: #2a2a2a; }
.highlight-yellow { color: #f39c12; font-weight: bold; }
.highlight-green { color: #2ecc71; font-weight: bold; }
.info-box { background: #1a2a2a; border-left: 4px solid #3498db; padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 12px 0; font-size: 0.9rem; color: #ccc; }
.info-box strong { color: #3498db; }
.signal-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.signal-tag { background: #1e2e1e; border: 1px solid #2ecc71; color: #2ecc71; padding: 4px 12px; border-radius: 20px; font-size: 0.87rem; font-weight: bold; }
.signal-tag.orange { background: #2e2210; border-color: #f39c12; color: #f39c12; }
.grammar-block { margin-bottom: 40px; }
.grammar-title-bar { background: #121212; padding: 10px 15px; border-left: 5px solid #555; display: flex; justify-content: space-between; align-items: center; color: #fff; font-weight: bold; margin-bottom: 10px; }
.grammar-title-bar.positive { border-left-color: #2ecc71; }
.grammar-title-bar.negative { border-left-color: #e74c3c; }
.grammar-title-bar.question { border-left-color: #f39c12; }
.pro-table { width: 100%; border-collapse: collapse; background: #222; border: 1px solid #333; font-size: 0.95rem; }
.pro-table th { background: #1a1a1a; color: #2ecc71; padding: 12px; text-align: left; border-bottom: 2px solid #333; font-weight: 600; }
.pro-table td { padding: 12px; border-bottom: 1px solid #333; color: #e0e0e0; }
.pro-table tr:hover { background: #2a2a2a; }
.short-answer-box { background: #252525; padding: 10px; border: 1px solid #333; border-top: none; color: #bbb; font-style: italic; font-size: 0.9rem; }
.v3-table { width:100%; border-collapse: collapse; background:#222; font-size:0.9rem; margin-bottom:14px; }
.v3-table th { background:#1a1a1a; color:#f39c12; padding:9px 12px; text-align:left; border-bottom:2px solid #333; }
.v3-table td { padding:9px 12px; border-bottom:1px solid #2a2a2a; color:#ddd; }
.v3-table tr:hover td { background:#2a2a2a; }
.v3-group { color:#2ecc71; font-weight:bold; font-size:0.8rem; padding:6px 12px !important; background:#1a1a1a !important; letter-spacing:0.05em; text-transform:uppercase; }