@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  --bg: #090c12;
  --bg-alt: #10141d;
  --card: #141a26;
  --card-hover: #182035;
  --border: #232b3d;
  --border-light: #2c3648;
  --text: #edf1f7;
  --text-dim: #8d9bb2;
  --accent: #35d68a;
  --accent-glow: rgba(53, 214, 138, 0.18);
  --accent-dim: #1f8f5c;
  --gold: #e8bf52;
  --red: #ff6b6b;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 12, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a:not(.btn) {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #29b876);
  color: #052015;
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 12px 28px -6px rgba(53, 214, 138, 0.35); }
.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--accent-dim); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(53, 214, 138, 0.16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, black, transparent);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid rgba(232, 191, 82, 0.3);
  border-radius: 100px;
  background: rgba(232, 191, 82, 0.06);
}
.hero h1 {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 0 auto 22px;
}
.hero p {
  color: var(--text-dim);
  font-size: 18.5px;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-title {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.section-sub { text-align: center; color: var(--text-dim); max-width: 540px; margin: 0 auto 50px; font-size: 16px; }

/* ---------- Curriculum ---------- */
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  background: var(--card-hover);
}
.module-card:hover::before { opacity: 1; }
.module-num { color: var(--accent); font-weight: 700; font-size: 12.5px; letter-spacing: 0.05em; margin-bottom: 12px; }
.module-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.module-card p { color: var(--text-dim); font-size: 14px; margin: 0; line-height: 1.6; }

/* ---------- Instructor ---------- */
#instructor .container { animation: fadeIn 0.6s ease; }

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--card), var(--bg-alt));
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 44px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}
.price { font-size: 56px; font-weight: 800; margin: 12px 0 4px; letter-spacing: -0.02em; }
.price span { font-size: 18px; color: var(--text-dim); font-weight: 500; }
.pricing-card ul { list-style: none; padding: 0; margin: 28px 0 32px; text-align: left; }
.pricing-card li { padding: 9px 0; color: var(--text-dim); font-size: 15px; display: flex; align-items: center; gap: 10px; }
.pricing-card li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  background: var(--accent-glow);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.pay-note { margin-top: 18px; font-size: 13px; color: var(--text-dim); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-item h4 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; }
.faq-item p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------- Auth forms ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(53, 214, 138, 0.1), transparent 70%);
  pointer-events: none;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 44px;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.6);
}
.auth-card h2 { margin-top: 0; font-size: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; color: var(--text-dim); margin-bottom: 7px; font-weight: 500; }
.field input {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s ease;
}
.field input:focus { outline: none; border-color: var(--accent); }
.error-msg { color: var(--red); font-size: 14px; margin-bottom: 14px; min-height: 18px; }
.switch-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }
.switch-link a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---------- Dashboard shell ---------- */
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.dash-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
  padding: 30px 0 80px;
}
.dash-sidebar {
  position: sticky;
  top: 90px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.progress-bar-wrap { margin-bottom: 16px; }
.progress-bar-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); margin-bottom: 8px; }
.progress-bar-track { height: 6px; background: var(--bg-alt); border-radius: 100px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 100px; transition: width 0.4s ease; }

.sidebar-module {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-dim);
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.35;
}
.sidebar-module:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sidebar-module.active { background: var(--accent-glow); color: var(--accent); font-weight: 600; }
.sidebar-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; color: transparent;
}
.sidebar-module.completed .sidebar-check { background: var(--accent); border-color: var(--accent); color: #052015; }
.sidebar-module.active .sidebar-check { border-color: var(--accent); }

.dash-modules { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.dash-module {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.dash-module:hover { transform: translateX(4px); border-color: var(--border-light); }
.dash-module .module-check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: transparent; flex-shrink: 0; margin-right: 14px;
}
.dash-module.completed .module-check { background: var(--accent); border-color: var(--accent); color: #052015; }

.lock-screen { text-align: center; padding: 90px 20px; }
.lock-screen .btn { margin-top: 22px; }

/* ---------- Lesson reader ---------- */
.lesson-body {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 20px;
}
.lesson-body h1 {
  font-size: 32px;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  padding-bottom: 22px;
  margin-bottom: 30px;
  letter-spacing: -0.01em;
}
.lesson-body h2 { font-size: 24px; margin-top: 42px; color: var(--accent); font-weight: 700; }
.lesson-body h3 { font-size: 19px; margin-top: 32px; font-weight: 700; }
.lesson-body p, .lesson-body li { color: var(--text); font-size: 15.5px; line-height: 1.8; }
.lesson-body ul, .lesson-body ol { padding-left: 22px; }
.lesson-body li { margin-bottom: 7px; }
.lesson-body strong { color: var(--gold); }
.lesson-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
}
.lesson-body th, .lesson-body td {
  border: 1px solid var(--border);
  padding: 11px 15px;
  text-align: left;
}
.lesson-body th { background: var(--bg-alt); }

.chart-figure {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 16px;
  margin: 30px 0;
}
.chart-figure svg { width: 100%; height: auto; display: block; }
.chart-figure figcaption {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 12px;
}

.pro-tip {
  background: linear-gradient(135deg, rgba(232, 191, 82, 0.08), rgba(232, 191, 82, 0.02));
  border: 1px solid rgba(232, 191, 82, 0.25);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 28px 0;
}
.pro-tip .pro-tip-label {
  color: var(--gold);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pro-tip p { margin: 0; font-size: 15px; color: var(--text); }

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.lesson-nav-btn {
  flex: 1;
  max-width: 320px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: block;
}
.lesson-nav-btn:hover { transform: translateY(-2px); border-color: var(--accent-dim); }
.lesson-nav-btn.next { text-align: right; margin-left: auto; }
.lesson-nav-label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.lesson-nav-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.lesson-nav-btn.complete-cta {
  background: linear-gradient(135deg, var(--accent), #29b876);
  border: none;
}
.lesson-nav-btn.complete-cta .lesson-nav-label,
.lesson-nav-btn.complete-cta .lesson-nav-title { color: #052015; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .section-title { font-size: 26px; }
  .lesson-nav { flex-direction: column; }
  .lesson-nav-btn.next { margin-left: 0; text-align: left; }
}
