:root {
  --bg: #070707;
  --surface: #111;
  --surface-2: #171717;
  --line: #252525;
  --text: #f5f5f5;
  --muted: #888;
  --gold: #ffb800;
  --orange: #ff6b00;
  --green: #22c55e;
  --neon: linear-gradient(135deg, var(--gold), var(--orange));
  --glow: 0 0 24px rgba(255, 107, 0, .28);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 184, 0, .12), transparent 28%),
    linear-gradient(180deg, #0b0b0b 0%, #050505 100%);
  color: var(--text);
  font-family: var(--font);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.login-page {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(420px, 100%);
}

.brand {
  margin-bottom: 28px;
  text-align: center;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--neon);
  color: #050505;
  font-size: 22px;
  font-weight: 900;
  box-shadow: var(--glow);
}

.brand h1 {
  margin: 18px 0 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.brand p, .muted {
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 17, 17, .88);
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
}

.login-card {
  padding: 28px;
}

.field {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.field label {
  color: #cfcfcf;
  font-size: 13px;
  font-weight: 700;
}

.input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #0b0b0b;
  color: var(--text);
  padding: 0 15px;
  outline: none;
}

.input:focus {
  border-color: rgba(255, 184, 0, .75);
  box-shadow: 0 0 0 3px rgba(255, 184, 0, .12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--neon);
  color: #080808;
  cursor: pointer;
  font-weight: 800;
  box-shadow: var(--glow);
}

.btn.secondary {
  border: 1px solid var(--line);
  background: #101010;
  color: var(--text);
  box-shadow: none;
}

.btn.full { width: 100%; min-height: 52px; }
.btn:disabled { cursor: wait; opacity: .65; }

.alert {
  display: none;
  margin-top: 14px;
  border: 1px solid rgba(244, 63, 94, .4);
  border-radius: 8px;
  padding: 12px;
  background: rgba(244, 63, 94, .08);
  color: #fecdd3;
  font-size: 13px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
  padding: 0 clamp(18px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, .88);
  backdrop-filter: blur(14px);
}

.logo {
  font-size: 21px;
  font-weight: 900;
  background: var(--neon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.xp-pill {
  border: 1px solid rgba(255, 184, 0, .24);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(255, 184, 0, .08);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.page {
  padding: 34px clamp(18px, 4vw, 44px) 48px;
}

.hero {
  max-width: 860px;
  margin-bottom: 30px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: 0;
}

.hero h1 span {
  background: var(--neon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.progress-wrap {
  max-width: 860px;
  margin-bottom: 34px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  color: #b8b8b8;
  font-size: 13px;
  font-weight: 700;
}

.track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #171717;
}

.fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--neon);
  box-shadow: var(--glow);
  transition: width .45s ease;
}

.section-title {
  margin: 0 0 16px;
  color: #d6d6d6;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.lesson-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.lesson-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 184, 0, .42);
  box-shadow: 0 16px 38px rgba(0,0,0,.38);
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(255,184,0,.24), rgba(255,107,0,.12)), #151515;
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.thumb img.is-missing { display: none; }

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.18);
}

.play span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--neon);
  color: #050505;
  font-weight: 900;
}

.done-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.card-body { padding: 14px; }
.card-num { color: var(--gold); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.card-title { min-height: 44px; margin: 7px 0 12px; font-size: 15px; font-weight: 800; line-height: 1.35; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.video-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-info {
  margin-top: 18px;
}

.lesson-info h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 38px);
}

.side-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.side-list h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.side-link {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 10px;
  color: #d7d7d7;
}

.side-link:hover, .side-link.active {
  background: #1c1c1c;
}

.side-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #0b0b0b;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.support {
  margin-top: 24px;
  border: 1px solid rgba(37, 211, 102, .24);
  border-radius: 8px;
  padding: 18px;
  background: rgba(37, 211, 102, .06);
}

.support h2 { margin: 0 0 6px; font-size: 18px; }
.support p { margin: 0 0 14px; }
.support .btn { background: #25d366; color: white; box-shadow: 0 0 22px rgba(37, 211, 102, .25); }

.celebrate {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.78);
  z-index: 30;
}

.celebrate.show { display: grid; }

.celebrate-box {
  width: min(380px, 100%);
  border: 1px solid rgba(255,184,0,.3);
  border-radius: 8px;
  padding: 34px 26px;
  background: #151515;
  text-align: center;
  animation: pop .28s ease both;
}

.celebrate-icon {
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--neon);
  color: #050505;
  font-size: 34px;
  font-weight: 900;
}

@keyframes pop {
  from { transform: scale(.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 860px) {
  .watch-layout { grid-template-columns: 1fr; }
  .nav-actions .muted { display: none; }
}

@media (max-width: 560px) {
  .topbar { height: auto; padding-block: 14px; align-items: flex-start; }
  .nav-actions { align-items: flex-end; flex-direction: column; }
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-title { font-size: 13px; min-height: 54px; }
}
