
:root {
  --bg: #0b1020;
  --panel: #141a2e;
  --text: #eaeefc;
  --muted: #a9b2d0;
  --accent: #6ea8fe;
  --good: #73d13d;
  --bad: #ff7875;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; background: var(--bg); color: var(--text); }
header { padding: 16px 20px; border-bottom: 1px solid #1f2746; background: linear-gradient(180deg, #121938, #0b1020); position: sticky; top: 0; z-index: 2;}
header h1 { margin: 0; font-size: 22px; }
header .sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
main { display: grid; grid-template-columns: 280px 1fr; gap: 16px; padding: 16px; }
@media (max-width: 800px) {
  main { grid-template-columns: 1fr; }
  #sidebar { order: 2; }
}
#sidebar { background: var(--panel); padding: 12px; border-radius: 12px; border: 1px solid #1f2746; height: fit-content; position: sticky; top: 72px; }
.progress { margin-bottom: 12px; }
.bar { background: #0c142e; height: 8px; border-radius: 999px; overflow: hidden; border: 1px solid #1f2746; }
.fill { background: var(--good); height: 100%; width: 0%; transition: width .3s; }
#lessonList button { width: 100%; text-align: left; padding: 8px 10px; margin: 6px 0; border: 1px solid #25305a; border-radius: 10px; background: #0e1630; color: var(--text); cursor: pointer; }
#lessonList button.active { outline: 2px solid var(--accent); }
#lessonList button.done::before { content: "✅ "; }
.button { display: inline-block; padding: 8px 10px; background: #0e1630; border: 1px solid #25305a; color: var(--text); border-radius: 10px; text-decoration: none; }
section#content { background: var(--panel); padding: 16px; border-radius: 12px; border: 1px solid #1f2746;}
h2, h3 { margin-top: 8px; }
.code { background: #0e1630; padding: 12px; border-radius: 8px; border: 1px solid #25305a; overflow:auto; }
#editor { width: 100%; background: #0e1630; color: var(--text); border: 1px solid #25305a; border-radius: 8px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.controls { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
#runBtn { padding: 8px 12px; border-radius: 8px; background: var(--accent); color: #081022; border: none; font-weight: 600; }
#status { color: var(--muted); font-size: 12px;}
#output { background: #0e1630; padding: 10px; border: 1px solid #25305a; border-radius: 8px; min-height: 80px; white-space: pre-wrap; }
.quiz-q { background: #0e1630; padding: 10px; border: 1px solid #25305a; border-radius: 8px; margin-bottom: 10px; }
.quiz-q button { margin-top: 6px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.done { display: inline-flex; align-items:center; gap: 8px; }
.nav { display: flex; justify-content: space-between; margin-top: 12px; }
footer { padding: 16px; color: var(--muted); text-align: center; }
