/* ══════════════════════════════════════════════════════════════════════════
   LimenGate Learning UI — Shared styles for all learn-*.html pages
   ══════════════════════════════════════════════════════════════════════════ */

.learn-grid { display: grid; grid-template-columns: 280px 1fr; gap: 24px; min-height: 600px; }
.sidebar { background: var(--bg-secondary); border-radius: 8px; padding: 20px; max-height: 85vh; overflow-y: auto; }
.sidebar h3 { color: var(--text-bright); font-size: 0.85rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.main-panel { background: var(--bg-secondary); border-radius: 8px; padding: 28px; min-height: 500px; }

.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-tertiary); color: var(--text-primary); cursor: pointer; font-size: 0.9rem; transition: all 0.15s; font-family: inherit; margin: 3px; line-height: 1.4; }
.btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--text-bright); }
.btn.active { background: rgba(0,212,255,0.08); border-color: var(--accent); color: var(--accent); }
.btn.correct { background: rgba(61,220,132,0.15); border-color: var(--success); color: var(--success); pointer-events: none; }
.btn.wrong { background: rgba(249,65,68,0.12); border-color: var(--error); color: var(--error); pointer-events: none; }
.btn.dim { opacity: 0.4; pointer-events: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.style-btn { text-align: center; min-width: 100px; padding: 14px 10px; }
.style-icon { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.style-label { font-size: 0.75rem; }

.topic-btn { width: 100%; text-align: left; padding: 8px 12px; margin: 2px 0; font-size: 0.85rem; }
.subject-section { margin-bottom: 14px; }
.subject-header { color: var(--accent); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid var(--border-subtle, var(--border)); }

.qbox { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; padding: 24px; margin-bottom: 20px; }
.qtype-tag { display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 12px; background: rgba(0,212,255,0.08); color: var(--accent); margin-bottom: 12px; }
.qtext { font-size: 1.15rem; color: var(--text-bright); line-height: 1.6; margin-bottom: 6px; }
.qscenario { color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; font-size: 0.95rem; }

.visual-block { background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-bottom: 18px; text-align: center; }
.visual-big { font-size: 2.8rem; margin-bottom: 8px; line-height: 1.3; }
.visual-caption { color: var(--text-secondary); font-size: 0.9rem; }

.read-block { color: var(--text-secondary); line-height: 1.8; margin-bottom: 18px; padding: 16px 20px; background: var(--bg-primary); border-radius: 8px; border-left: 3px solid var(--accent); }
.read-block strong { color: var(--text-bright); }

.scene-break { text-align: center; padding: 20px 16px; margin: 20px 0; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border-subtle, var(--border)); }
.scene-emoji { font-size: 3rem; line-height: 1.4; margin-bottom: 6px; }
.scene-cap { font-size: 0.82rem; color: var(--text-muted); font-style: italic; letter-spacing: 0.02em; }

.word-card { text-align: center; padding: 28px 16px; margin: 16px 0; background: var(--bg-secondary); border-radius: 16px; border: 2px solid var(--border); }
.word-card:hover { border-color: var(--accent); }
.word-pic { font-size: 4.5rem; line-height: 1.2; margin-bottom: 10px; }
.word-text { font-size: 1.6rem; color: var(--text-bright); font-weight: 700; line-height: 1.4; }
.word-text .wh { color: var(--accent); font-size: 1.9rem; text-decoration: underline; text-decoration-color: rgba(0,212,255,0.3); text-underline-offset: 4px; }
.word-text .wr { color: var(--error); font-size: 1.9rem; }
.word-text .wg { color: var(--success); font-size: 1.9rem; }
.word-text .wb { color: #5BA8FF; font-size: 1.9rem; }
.word-text .wy { color: #F9C74F; font-size: 1.9rem; }
.word-text .wp { color: #C77DFF; font-size: 1.9rem; }
.word-text .wo { color: #FF8C42; font-size: 1.9rem; }
.word-laugh { font-size: 0.9rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }

.steps-list { counter-reset: step; list-style: none; padding: 0; margin-bottom: 18px; }
.steps-list li { counter-increment: step; padding: 10px 0 10px 44px; position: relative; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle, var(--border)); line-height: 1.5; }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; background: rgba(0,212,255,0.08); color: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }

.handson-input { background: var(--bg-primary); border: 2px solid var(--border); border-radius: 8px; padding: 12px 16px; color: var(--text-bright); font-size: 16px; width: 100%; max-width: 360px; font-family: inherit; transition: border-color 0.15s; -webkit-appearance: none; }
.handson-input:focus { outline: none; border-color: var(--accent); }

.feedback { margin-top: 16px; padding: 16px 20px; border-radius: 8px; font-size: 0.95rem; line-height: 1.6; }
.feedback.correct { background: rgba(61,220,132,0.08); border: 1px solid var(--success); }
.feedback.correct .fb-title { color: var(--success); font-weight: 700; margin-bottom: 6px; }
.feedback.wrong { background: rgba(249,65,68,0.06); border: 1px solid var(--error); }
.feedback.wrong .fb-title { color: var(--error); font-weight: 700; margin-bottom: 6px; }
.feedback .fb-body { color: var(--text-secondary); }
.feedback .funfact { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle, var(--border)); color: var(--text-muted); font-size: 0.85rem; font-style: italic; }

.hint-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; padding: 4px 0; font-family: inherit; }
.hint-btn:hover { color: var(--accent); }
.hint-text { color: var(--text-muted); font-style: italic; font-size: 0.85rem; margin-top: 6px; }

.timer-box { text-align: center; padding: 14px; background: var(--bg-primary); border-radius: 8px; margin-bottom: 16px; }
.timer-time { font-family: monospace; font-size: 1.6rem; color: var(--accent); }
.timer-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

.stat-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.82rem; }
.stat-k { color: var(--text-secondary); }
.stat-v { color: var(--text-bright); font-weight: 600; }
.pbar { height: 5px; background: var(--bg-primary); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.pfill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }

.welcome-box { text-align: center; padding: 50px 20px; }
.welcome-box h2 { color: var(--text-bright); margin-bottom: 14px; font-size: 1.3rem; }
.welcome-box p { color: var(--text-secondary); max-width: 480px; margin: 0 auto 20px; line-height: 1.6; }
.next-btn { margin-top: 18px; padding: 12px 24px; font-size: 0.95rem; }

.break-screen { text-align: center; padding: 30px 20px; }
.break-emoji { font-size: 4rem; margin-bottom: 12px; animation: breakBounce 1.5s ease infinite; }
@keyframes breakBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.break-title { font-size: 1.4rem; color: var(--success); font-weight: 700; margin-bottom: 16px; }
.break-msg { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; max-width: 460px; margin: 0 auto 20px; }
.break-stretch { background: var(--bg-primary); border-radius: 12px; padding: 20px; margin: 16px auto; max-width: 420px; text-align: left; }
.break-stretch-title { color: var(--accent); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.break-stretch-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; color: var(--text-secondary); line-height: 1.5; }
.break-stretch-icon { font-size: 1.5rem; min-width: 32px; text-align: center; }
.break-water { background: rgba(0,212,255,0.06); border: 1px solid rgba(0,212,255,0.2); border-radius: 12px; padding: 16px; margin: 16px auto; max-width: 420px; display: flex; align-items: center; gap: 12px; }
.break-water-icon { font-size: 2rem; }
.break-water-text { color: var(--accent); font-size: 0.95rem; }
.break-done { opacity: 0.3; pointer-events: none; transition: opacity 0.3s; }
.break-done.ready { opacity: 1; pointer-events: auto; }

/* ── Mobile sidebar toggle ─────────────────────────────── */
.sidebar-toggle { display: none; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-tertiary); color: var(--accent); cursor: pointer; font-family: inherit; font-size: 0.9rem; margin-bottom: 12px; text-align: center; }
.mobile-menu-btn { display: none; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--text-bright); font-size: 1.3rem; padding: 6px 10px; cursor: pointer; line-height: 1; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 860px) {
  .learn-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.mobile-visible { display: block; }
  .sidebar-toggle { display: block; }
}
@media (max-width: 640px) {
  .main-panel { padding: 18px 14px; }
  .qbox { padding: 16px 14px; }
  .qtext { font-size: 1.05rem; }
  .btn { padding: 12px 14px; font-size: 0.88rem; min-height: 44px; }
  .style-btn { min-width: 70px; padding: 10px 6px; }
  .style-icon { font-size: 1.2rem; }
  .style-label { font-size: 0.7rem; }
  .visual-big { font-size: 2.2rem; }
  .word-pic { font-size: 3.5rem; }
  .word-text { font-size: 1.3rem; }
  .word-text .wh, .word-text .wr, .word-text .wg, .word-text .wb, .word-text .wy, .word-text .wp, .word-text .wo { font-size: 1.5rem; }
  .scene-emoji { font-size: 2.4rem; }
  .read-block { padding: 14px 12px; font-size: 0.9rem; line-height: 1.7; }
  .break-emoji { font-size: 3rem; }
  .break-msg { font-size: 0.95rem; }
  .handson-input { max-width: 100%; }
  .feedback { padding: 14px; }
  .next-btn { width: 100%; margin-top: 10px; }
  .welcome-box { padding: 30px 14px; }
  .timer-box { padding: 10px; }
  .timer-time { font-size: 1.3rem; }
  .btn-group { gap: 4px; }
  .btn-group .btn { flex: 1 1 calc(50% - 4px); min-width: 0; text-align: center; }
}
@media (max-width: 480px) {
  .mobile-menu-btn { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); padding: 12px 16px; border-bottom: 1px solid var(--border); gap: 4px; z-index: 50; }
  .nav-links.nav-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a, .nav-links button { display: block; width: 100%; padding: 12px; text-align: left; font-size: 0.95rem; }
  .nav-inner { position: relative; }
}
@media (max-width: 380px) {
  .style-btn { min-width: 60px; padding: 8px 4px; }
  .qtext { font-size: 0.95rem; }
  .word-pic { font-size: 2.8rem; }
  .word-text { font-size: 1.1rem; }
  .word-text .wh, .word-text .wr, .word-text .wg, .word-text .wb, .word-text .wy, .word-text .wp, .word-text .wo { font-size: 1.3rem; }
  .btn-group .btn { flex: 1 1 100%; }
}
