:root {
  color-scheme: dark;
  --bg: #060c15;
  --panel: #0b1422;
  --panel-2: #101c2c;
  --line: #1d2c3f;
  --text: #f2f7fc;
  --muted: #8da0b6;
  --blue: #18a9ff;
  --blue-2: #77d0ff;
  --orange: #ff8a36;
  --green: #2dd4a3;
  --sidebar: 256px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 15, 25, .98);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 32px; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
  color: #03101c; background: var(--blue); font-size: 15px; box-shadow: 0 0 26px #18a9ff55;
}
.brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.nav { display: grid; gap: 6px; }
.nav a { display: flex; align-items: center; gap: 13px; min-height: 45px; padding: 0 14px; border-radius: 11px; color: var(--muted); font-size: 14px; font-weight: 600; transition: .2s; }
.nav a span { display: grid; place-items: center; width: 20px; color: inherit; font-size: 19px; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: var(--blue-2); background: #18a9ff16; box-shadow: inset 0 0 0 1px #18a9ff22; }
.sidebar-note { margin-top: auto; display: grid; gap: 6px; padding: 17px; border: 1px solid #18a9ff33; border-radius: 17px; background: linear-gradient(135deg, #18a9ff17, transparent); }
.sidebar-note strong { color: var(--blue-2); font-size: 12px; }
.sidebar-note span { color: var(--muted); font-size: 11px; line-height: 1.45; }

.page { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(6, 12, 21, .84); backdrop-filter: blur(14px); }
.topbar-title { color: var(--muted); font-size: 13px; font-weight: 600; }
.progress-label { margin-left: auto; color: var(--muted); font-size: 12px; }
.menu-button { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; }
#app { width: min(1240px, 100%); margin: 0 auto; padding: 34px 38px 64px; outline: none; }

.hero { position: relative; overflow: hidden; padding: 52px; border: 1px solid #18a9ff38; border-radius: 30px; background: radial-gradient(circle at 90% 20%, #18a9ff22, transparent 34%), linear-gradient(120deg, #10243a, #09111d 58%, #151326); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--blue-2); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; max-width: 760px; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.045em; }
h1 span, .accent { color: var(--blue-2); text-shadow: 0 0 24px #18a9ff44; }
.hero p { max-width: 620px; margin-bottom: 28px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: 13px; background: var(--blue); color: #02101c; font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .2s, filter .2s; }
.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button.secondary { color: var(--text); background: var(--panel-2); border-color: var(--line); }
.button.orange { background: var(--orange); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 40px 0 18px; }
.section-head h2, .page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.025em; }
.section-head a { color: var(--blue-2); font-size: 13px; font-weight: 700; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { max-width: none; }
.page-heading p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.module-card { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(145deg, var(--panel), #09111d); transition: transform .22s, border-color .22s; }
.module-card:hover { transform: translateY(-4px); border-color: #18a9ff66; }
.card-image { position: relative; aspect-ratio: 16 / 8.4; overflow: hidden; background: #0f1c2b; }
.card-image img { width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: transform .35s; }
.module-card:hover .card-image img { transform: scale(1.05); }
.card-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, #0b1422); }
.badge { position: absolute; z-index: 1; left: 13px; bottom: 12px; padding: 5px 8px; border-radius: 7px; background: var(--blue); color: #02101c; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.lock { position: absolute; z-index: 2; inset: 12px 12px auto auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #07111fdd; color: var(--muted); }
.card-body { padding: 18px; }
.card-body h3 { margin-bottom: 8px; font-size: 16px; line-height: 1.25; }
.card-body p { min-height: 42px; margin-bottom: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.mini-progress { height: 4px; margin-top: 13px; border-radius: 10px; background: #1b2b3d; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: var(--green); }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.video { overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 22px; background: #000; box-shadow: 0 24px 80px #0008; }
.video iframe { display: block; width: 100%; height: 100%; border: 0; }
.lesson-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 22px 2px; }
.lesson-kicker { color: var(--blue-2); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.lesson-header h1 { max-width: none; margin: 8px 0 0; font-size: clamp(23px, 3vw, 34px); }
.lesson-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.info-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.info-card h2 { font-size: 17px; }
.info-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.lesson-list { position: sticky; top: 88px; overflow: hidden; max-height: calc(100vh - 112px); border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.lesson-list-head { padding: 19px; border-bottom: 1px solid var(--line); }
.lesson-list-head strong { display: block; font-size: 14px; }
.lesson-list-head span { color: var(--muted); font-size: 11px; }
.lesson-items { overflow: auto; max-height: calc(100vh - 190px); padding: 9px; }
.lesson-item { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid transparent; border-radius: 13px; background: transparent; text-align: left; cursor: pointer; }
.lesson-item:hover { background: var(--panel-2); }
.lesson-item.active { border-color: #18a9ff66; background: #18a9ff14; }
.lesson-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #152337; color: var(--blue-2); font-size: 11px; font-weight: 800; }
.lesson-item.done .lesson-number { color: #052318; background: var(--green); }
.lesson-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.lesson-copy span, .lesson-duration { color: var(--muted); font-size: 10px; }

.project-list { display: grid; gap: 16px; }
.project { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 22px; padding: 26px; border: 1px solid #18a9ff32; border-radius: 22px; background: linear-gradient(120deg, #18a9ff10, var(--panel)); }
.project:nth-child(even) { border-color: #ff8a3633; background: linear-gradient(120deg, #ff8a3610, var(--panel)); }
.project-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; background: var(--blue); color: #03101c; font-size: 24px; }
.project:nth-child(even) .project-icon { background: var(--orange); }
.project h2 { margin-bottom: 6px; font-size: 20px; }
.project p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.support-card { max-width: 660px; padding: 34px; border: 1px solid var(--line); border-radius: 25px; background: radial-gradient(circle at 85% 10%, #18a9ff20, transparent 33%), var(--panel); }
.support-card h2 { font-size: 25px; }
.support-card p { color: var(--muted); line-height: 1.65; }
.empty { padding: 55px 25px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; }
.scrim { display: none; }

@media (max-width: 1050px) {
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-list { position: static; max-height: none; }
  .lesson-items { max-height: 500px; }
}

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; z-index: 40; background: #0009; }
  .scrim.show { display: block; }
  .page { margin-left: 0; }
  .menu-button { display: block; }
  .topbar { padding: 0 16px; }
  #app { padding: 22px 16px 50px; }
  .hero { padding: 34px 24px; border-radius: 23px; }
  .hero p { font-size: 15px; }
  .module-grid { grid-template-columns: 1fr; }
  .lesson-header { flex-direction: column; }
  .project { grid-template-columns: 50px 1fr; padding: 20px; gap: 16px; }
  .project-icon { width: 50px; height: 50px; }
  .project .button { grid-column: 1 / -1; width: 100%; }
  .progress-label { display: none; }
}

