:root {
  --bg: #071019;
  --bg-soft: #0b1823;
  --panel: rgba(10, 22, 34, 0.85);
  --panel-2: rgba(12, 27, 40, 0.98);
  --line: rgba(151, 176, 196, 0.18);
  --text: #e7f0f7;
  --muted: #98b0c2;
  --brand: #38bdf8;
  --brand-2: #60a5fa;
  --green: #22c55e;
  --amber: #f59e0b;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.11), transparent 24%),
    linear-gradient(160deg, #040a11 0%, #09131d 48%, #0b1723 100%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.site-header,
.panel,
.hero-copy,
.hero-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header {
  width: min(1160px, calc(100% - 32px));
  margin: 22px auto 0;
  border-radius: 24px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.brand-wrap {
  display: grid;
  gap: 4px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.84rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav a,
.nav-user,
.text-link {
  color: var(--muted);
  text-decoration: none;
}

.nav-cta,
.button-primary,
.button-secondary,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, opacity 140ms ease;
}

.nav-cta,
.button-primary,
button {
  color: #04111a;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.nav-cta:hover,
.button-primary:hover,
.button-secondary:hover,
button:hover {
  transform: translateY(-1px);
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 18px auto 38px;
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 18px;
}

.hero-copy,
.hero-card,
.panel {
  border-radius: 28px;
}

.hero-copy {
  padding: 34px;
}

.hero-card {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.eyebrow,
.kicker,
.course-level {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--brand);
}

h1,
h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  margin-top: 10px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 0.98;
  max-width: 12ch;
}

.lead,
.lead-small,
.course-desc,
.course-tagline,
.status,
.empty-state,
.metric span {
  color: var(--muted);
}

.lead {
  margin-top: 16px;
  max-width: 62ch;
  line-height: 1.75;
  font-size: 1.03rem;
}

.lead-small {
  line-height: 1.7;
}

.hero-actions,
.hero-badges,
.stacked-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 22px;
}

.hero-badges,
.stacked-pills {
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  color: #d7f2ff;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(56, 189, 248, 0.08);
}

.pill.subtle {
  color: #ffe0a2;
  border-color: rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.09);
}

.metric {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 0.84rem;
  color: #d7e8f3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric span {
  display: block;
  margin-top: 7px;
}

.feature-grid,
.course-grid,
.auth-layout,
.lesson-layout {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.feature-card,
.course-card,
.auth-panel,
.auth-aside,
.lesson-copy,
.narrow-panel {
  padding: 24px;
}

.auth-layout {
  grid-template-columns: 1.1fr 0.85fr;
}

.course-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lesson-layout {
  grid-template-columns: 0.95fr 1.05fr;
}

.lesson-player {
  margin-top: 18px;
  padding: 24px;
}

.player-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #d4e5f0;
}

input,
pre,
code,
button {
  font: inherit;
}

input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.11);
}

.note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  background: rgba(245, 158, 11, 0.08);
  color: #f4d48e;
}

.clean-list {
  margin: 14px 0 20px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.course-tagline {
  margin: 10px 0 8px;
}

.course-desc {
  line-height: 1.75;
}

.course-lessons {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.lesson-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.lesson-link strong {
  color: var(--amber);
  font-size: 0.85rem;
}

pre {
  margin: 0;
  min-height: 280px;
  padding: 18px;
  border-radius: 18px;
  overflow: auto;
  border: 1px solid rgba(56, 189, 248, 0.12);
  background: #02070c;
  color: #d4f0ff;
  line-height: 1.7;
}

code {
  color: #ffe2a9;
}

.narrow-panel {
  max-width: 640px;
}

.media-shell {
  min-height: 320px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(8, 18, 28, 0.94), rgba(5, 11, 18, 0.98));
  overflow: hidden;
}

.media-locked {
  display: grid;
  place-items: center;
}

.media-state {
  text-align: center;
  max-width: 420px;
  padding: 24px;
}

.media-state strong,
.transcript strong,
.video-overlay h3 {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.media-state p,
.transcript p,
.video-overlay p {
  color: var(--muted);
  line-height: 1.7;
}

.video-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 320px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.22), transparent 40%),
    linear-gradient(160deg, #081521 0%, #0b2030 48%, #08131d 100%);
}

.scanline {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.05) 2px,
      transparent 2px,
      transparent 6px
    );
  opacity: 0.22;
}

.video-overlay {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
}

.video-chip {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #baf7cd;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.video-overlay h3 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.signal-bars {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.signal-bars span {
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
  animation: pulseBars 1.2s ease-in-out infinite;
}

.signal-bars span:nth-child(1) { height: 18px; animation-delay: 0s; }
.signal-bars span:nth-child(2) { height: 28px; animation-delay: 0.12s; }
.signal-bars span:nth-child(3) { height: 38px; animation-delay: 0.24s; }
.signal-bars span:nth-child(4) { height: 24px; animation-delay: 0.36s; }

.transcript {
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes pulseBars {
  0%, 100% { opacity: 0.45; transform: scaleY(0.85); }
  50% { opacity: 1; transform: scaleY(1.05); }
}

@media (max-width: 980px) {
  .hero,
  .feature-grid,
  .course-grid,
  .auth-layout,
  .lesson-layout,
  .page-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-card {
    grid-template-columns: 1fr;
  }

  .transcript {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
