:root {
  --bg: #0d0f12;
  --surface: #15191e;
  --surface-2: #1b2026;
  --surface-3: #222831;
  --gold: #d9b95f;
  --gold-soft: rgba(217, 185, 95, 0.15);
  --text: #f5f5f2;
  --muted: #9ea4ad;
  --border: rgba(255, 255, 255, 0.09);
  --green: #42bd88;
  --green-soft: rgba(66, 189, 136, 0.14);
  --danger: #d56d6d;
  --shadow: 0 20px 70px rgba(0,0,0,.34);
  --radius: 22px;
  --max: 1240px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(217,185,95,.08), transparent 30%),
    linear-gradient(180deg, #0b0d10 0%, #0d1014 45%, #0a0c0f 100%);
  font-family: "Inter", system-ui, sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
code {
  font-size: .92em;
  color: #e8d48e;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .16;
  pointer-events: none;
}
.ambient-one { width: 340px; height: 340px; background: #b9973e; top: 80px; right: -100px; }
.ambient-two { width: 260px; height: 260px; background: #315d4a; bottom: 50px; left: -100px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(22px, calc((100vw - var(--max))/2));
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 15, .82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217,185,95,.5);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(217,185,95,.2), rgba(217,185,95,.04));
  color: var(--gold);
  font-family: "Sora";
  font-weight: 700;
}
.brand strong, .brand span { display: block; }
.brand strong { font-family: "Sora"; font-size: .88rem; letter-spacing: .12em; }
.brand span { font-size: .67rem; color: var(--gold); letter-spacing: .22em; margin-top: 3px; }

.header-progress {
  width: min(260px, 38vw);
}
.header-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: .74rem;
  margin-bottom: 7px;
  color: var(--muted);
}
.header-progress-text strong { color: var(--text); }

main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 60px;
  align-items: center;
  padding: 80px 0 70px;
}
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .18em;
}
.hero h1 {
  font-family: "Sora";
  font-size: clamp(3rem, 6vw, 6.3rem);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 16px 0 24px;
}
.hero-subtitle {
  max-width: 720px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
}
.hero-actions, .lesson-actions, .completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: .2s ease;
  font-weight: 700;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #131313;
  background: linear-gradient(135deg, #ead27f, #caa749);
  box-shadow: 0 12px 32px rgba(217,185,95,.18);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,.035);
  border-color: var(--border);
}
.btn-success {
  background: var(--green-soft);
  color: #8de3ba;
  border-color: rgba(66,189,136,.25);
}
.btn-success.is-complete {
  color: #141916;
  background: var(--green);
}

.hero-stats {
  display: flex;
  gap: 42px;
  margin-top: 48px;
}
.hero-stats strong {
  display: block;
  font-family: "Sora";
  font-size: 1.65rem;
}
.hero-stats span {
  color: var(--muted);
  font-size: .82rem;
}

.hero-card {
  min-height: 380px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
}
.hero-card-label {
  color: var(--gold);
  font-size: .7rem;
  letter-spacing: .2em;
  font-weight: 700;
  margin-bottom: 28px;
}
.ring {
  --progress: 0;
  width: 185px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold) calc(var(--progress) * 1%), rgba(255,255,255,.08) 0);
  position: relative;
}
.ring::after {
  content: "";
  position: absolute;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 40px rgba(0,0,0,.3);
}
.ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.ring-inner strong {
  display: block;
  font-family: "Sora";
  font-size: 2.25rem;
}
.ring-inner span { color: var(--muted); font-size: .78rem; }
.hero-card p {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 24px;
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.section-heading h2 {
  margin: 8px 0 0;
  font-family: "Sora";
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -.035em;
}
.section-heading p {
  color: var(--muted);
  max-width: 410px;
  line-height: 1.55;
  margin: 0;
}

.journey-section { padding: 35px 0 90px; }

.journey-map {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  background: rgba(255,255,255,.024);
  overflow-x: auto;
}
.journey-track {
  display: flex;
  align-items: flex-start;
  min-width: 960px;
}
.journey-step {
  position: relative;
  flex: 1;
  text-align: center;
  cursor: pointer;
}
.journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 57%;
  right: -43%;
  top: 23px;
  height: 1px;
  background: var(--border);
}
.journey-step.completed:not(:last-child)::after {
  background: rgba(66,189,136,.42);
}
.step-dot {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: "Sora";
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: .2s ease;
}
.journey-step:hover .step-dot { transform: scale(1.08); border-color: rgba(217,185,95,.5); }
.journey-step.active .step-dot {
  background: var(--gold);
  color: #121212;
  border-color: var(--gold);
  box-shadow: 0 0 0 7px var(--gold-soft);
}
.journey-step.completed .step-dot {
  background: var(--green);
  color: #101712;
  border-color: var(--green);
}
.step-title {
  font-size: .77rem;
  color: var(--muted);
  line-height: 1.35;
  padding: 0 6px;
}
.journey-step.active .step-title { color: var(--text); }

.course-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 30px;
  align-items: start;
  padding: 10px 0 90px;
}

.sidebar {
  position: sticky;
  top: 98px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.025);
  border-radius: var(--radius);
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.sidebar-heading {
  padding: 8px 8px 20px;
}
.sidebar-heading h3 {
  margin: 8px 0 0;
  font-family: "Sora";
}
.module {
  border-top: 1px solid var(--border);
  padding: 18px 0 4px;
}
.module:first-child { border-top: 0; }
.module-title {
  font-size: .71rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .12em;
  margin: 0 8px 10px;
}
.lesson-link {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 12px 10px;
  cursor: pointer;
  transition: .18s ease;
}
.lesson-link:hover {
  color: var(--text);
  background: rgba(255,255,255,.035);
}
.lesson-link.active {
  color: var(--text);
  background: var(--gold-soft);
  border-color: rgba(217,185,95,.15);
}
.lesson-link.completed .lesson-index {
  background: var(--green-soft);
  color: #91e2bd;
  border-color: rgba(66,189,136,.22);
}
.lesson-index {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
}
.lesson-link-title {
  font-size: .82rem;
  line-height: 1.35;
}
.lesson-link small {
  display: block;
  color: #717984;
  margin-top: 3px;
}

.lesson-area {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  padding: clamp(22px, 4vw, 42px);
}
.lesson-topline {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.lesson-kicker, .lesson-status {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.lesson-kicker { color: var(--gold); }
.lesson-status {
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
}
.lesson-status.done {
  color: #91e2bd;
  border-color: rgba(66,189,136,.26);
  background: var(--green-soft);
}
.lesson-area > h2 {
  font-family: "Sora";
  font-size: clamp(2rem, 4vw, 3.8rem);
  max-width: 930px;
  line-height: 1.08;
  letter-spacing: -.045em;
  margin: 16px 0 16px;
}
.lesson-description {
  max-width: 850px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 28px;
}

.video-shell {
  aspect-ratio: 16 / 9;
  border-radius: 19px;
  background: #060708;
  border: 1px solid rgba(255,255,255,.07);
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  position: relative;
}
#youtubePlayer,
#youtubePlayer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

#youtubePlayer {
  display: none;
}

.custom-player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(5,6,7,0), rgba(5,6,7,.95) 44%);
}

.player-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.player-btn:hover {
  background: rgba(255,255,255,.15);
}

.player-time {
  flex: 0 0 auto;
  min-width: 42px;
  color: #f4f4f0;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.player-progress,
.volume-range {
  accent-color: var(--gold);
  cursor: pointer;
}

.player-progress {
  flex: 1;
  min-width: 80px;
}

.volume-range {
  width: 90px;
}

.video-end-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  padding: 30px;
  background:
    radial-gradient(circle at center, rgba(217,185,95,.12), transparent 35%),
    rgba(6,7,8,.97);
}

.video-end-cover.visible {
  display: flex;
}

.video-end-cover strong {
  font-family: "Sora";
  font-size: 1.25rem;
}

.video-end-cover span {
  color: var(--muted);
  font-size: .86rem;
}

.end-cover-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #101712;
  font-weight: 800;
}

.btn-small {
  min-height: 42px;
  padding: 0 15px;
  margin-top: 4px;
}
.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  text-align: center;
  padding: 25px;
  color: var(--muted);
  background:
    radial-gradient(circle at center, rgba(217,185,95,.08), transparent 30%),
    linear-gradient(145deg, #101317, #080a0c);
}
.video-placeholder strong { color: var(--text); font-family: "Sora"; }
.play-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 4px;
  background: var(--gold);
  color: #101010;
  box-shadow: 0 0 0 10px var(--gold-soft);
  margin-bottom: 8px;
}

.lesson-actions {
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 34px;
}
.lesson-actions .btn-success { margin-left: auto; }

.lesson-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.info-card {
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 22px;
  background: rgba(255,255,255,.026);
}
.info-icon {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
}
.info-card h4 {
  font-family: "Sora";
  margin: 16px 0 10px;
  font-size: .98rem;
}
.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.58;
}

.plan-card {
  display: none;
  border-top: 1px solid var(--border);
  margin-top: 38px;
  padding-top: 34px;
}
.plan-card.visible { display: block; }
.plan-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}
.plan-header h3 {
  font-family: "Sora";
  margin: 7px 0 0;
}
.plan-header > span {
  color: var(--muted);
  font-size: .8rem;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.plan-column {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.plan-column h4 {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "Sora";
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
  margin: 10px 0;
}
.check-item input { margin-top: 2px; accent-color: var(--green); }

.materials { padding: 10px 0 90px; }
.material-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 15px;
}
.material-card {
  min-height: 112px;
  border-radius: 17px;
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255,255,255,.026);
  transition: .2s ease;
}
.material-card:not(.disabled):hover { transform: translateY(-3px); border-color: rgba(217,185,95,.35); }
.material-card.disabled {
  opacity: .6;
  cursor: not-allowed;
}
.material-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 13px;
  color: var(--gold);
  background: var(--gold-soft);
  font-size: .68rem;
  font-weight: 800;
}
.material-card div { flex: 1; }
.material-card strong, .material-card span { display: block; }
.material-card strong { font-size: .9rem; }
.material-card div span { color: var(--muted); font-size: .75rem; margin-top: 5px; }

.completion {
  display: none;
  text-align: center;
  padding: 62px 30px;
  margin-bottom: 90px;
  border: 1px solid rgba(217,185,95,.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at center top, rgba(217,185,95,.12), transparent 42%),
    rgba(255,255,255,.025);
}
.completion.visible { display: block; }
.completion-badge {
  color: var(--gold);
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 700;
}
.completion h2 {
  font-family: "Sora";
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 14px 0;
}
.completion p { color: var(--muted); }
.completion-actions { justify-content: center; }

footer {
  border-top: 1px solid var(--border);
  padding: 30px 20px 45px;
  display: flex;
  justify-content: center;
  gap: 15px;
  color: var(--muted);
  font-size: .77rem;
}
footer strong { color: var(--text); }

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.progress-track.compact { height: 5px; }
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #bea047, #ead17f);
  transition: width .35s ease;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f2f1eb;
  color: #121212;
  font-weight: 700;
  font-size: .8rem;
  box-shadow: var(--shadow);
  transition: .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 65px; }
  .hero-card { min-height: 300px; }
  .course-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: auto; max-height: none; }
  .lesson-insights, .material-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  main { width: min(100% - 24px, var(--max)); }
  .topbar { min-height: 68px; padding: 10px 14px; }
  .brand strong { font-size: .76rem; }
  .brand span { font-size: .58rem; }
  .brand-mark { width: 38px; height: 38px; }
  .header-progress { width: 110px; }
  .header-progress-text span { display: none; }

  .hero { padding: 52px 0 50px; gap: 35px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.2rem); }
  .hero-subtitle { font-size: .97rem; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 22px; justify-content: space-between; }
  .hero-card { border-radius: 22px; }

  .section-heading { display: block; }
  .section-heading p { margin-top: 14px; }

  .journey-map { padding: 26px 16px; }
  .lesson-area { padding: 20px 16px; }
  .lesson-area > h2 { font-size: 2.15rem; }
  .lesson-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .lesson-actions .btn-success {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0;
  }

  .plan-header { display: block; }
  .plan-header > span { display: block; margin-top: 8px; }

  footer { flex-direction: column; align-items: center; text-align: center; }
}


@media (max-width: 680px) {
  .custom-player-controls {
    gap: 7px;
    padding: 9px 10px;
  }

  .player-time {
    display: none;
  }

  .volume-range {
    width: 64px;
  }

  .player-btn {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}
