/* ============================================
   BIBLIY — Dark Luxury Editorial Design
   Deep dark theme · Premium streaming feel
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── TOKENS ─────────────────────────────── */
:root {
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Dark Theme Colors */
  --bg-page:        #0D0F14;
  --bg-card:        #13161E;
  --bg-card-hover:  #1A1E28;
  --border-subtle:  rgba(255,255,255,0.07);
  --border-light:   rgba(255,255,255,0.12);
  
  /* Text Colors */
  --text:           #FFFFFF;
  --text-heading:   #FFFFFF;
  --text-body:      rgba(255,255,255,0.6);
  --text-muted:     rgba(255,255,255,0.35);
  --text-2:         rgba(255,255,255,0.6);
  --muted:          rgba(255,255,255,0.35);
  
  /* Accent Colors */
  --accent:         #F5C842;  /* Warm electric gold */
  --accent-dark:    #6C63FF;  /* Indigo-electric */
  --border:         rgba(255,255,255,0.07);
  --border-dark:    rgba(255,255,255,0.05);

  /* Pillar Colors */
  --pillar-tech:     #1A73E8;
  --pillar-ai:       #7B2FBE;
  --pillar-money:    #D4A017;
  --pillar-history:  #A0522D;
  --pillar-mystery:  #2D1B69;
  --pillar-science:  #0097A7;
  --pillar-music:    #C2185B;
  --pillar-dance:    #E64A19;
  --pillar-cooking:  #FF8F00;
  --pillar-arts:     #B71C1C;
  --pillar-mind:     #303F9F;
  --pillar-myth:     #795548;
  --pillar-fitness:  #558B2F;
  --pillar-language: #00838F;
  --pillar-income:   #2E7D32;

  /* Legacy glass effects (kept for compatibility) */
  --glass:          rgba(255,255,255,0.03);
  --glass-heavy:    rgba(255,255,255,0.06);
  --glass-nav:      rgba(13,15,20,0.85);
  --blur:           blur(20px);
  --blur-heavy:     blur(32px);

  --green:          #22C55E;
  --green-soft:     rgba(34,197,94,0.15);
  --gold:           #F5C842;
  --gold-soft:      rgba(245,200,66,0.15);

  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.2);
  --shadow:    0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.4);
}

/* ── RESET ──────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

/* ── BACKGROUND ─────────────────────────── */
body {
  font-family: var(--font-body);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: var(--bg-page);
}

/* ── LAYOUT ─────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── NAV ────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-nav);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-heading);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .logo-y {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.15em;
  letter-spacing: -1px;
}

.hero h1 .accent { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

#nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-avatar img { width:100%; height:100%; object-fit:cover; }

.nav-link {
  font-size: 13px;
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text-heading); }

.nav-name {
  font-size: 13px;
  color: var(--text-body);
  font-weight: 500;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── NAV DROPDOWN ───────────────────────── */
.nav-mycourses { 
  margin-right: 4px; 
  background: var(--accent);
  color: var(--bg-page);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.2s;
}
.nav-mycourses:hover { filter: brightness(1.1); }

.nav-dropdown-wrap {
  position: relative;
  flex-shrink: 0;
}

.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-body);
}
.nav-avatar-btn:hover { background: rgba(255,255,255,0.12); }

.nav-av-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-av-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.nav-dd-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-heading);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-dd-chevron {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
}

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border: 1px solid var(--border-subtle);
  padding: 8px;
  min-width: 160px;
  z-index: 200;
}

.nav-dd-item {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s;
  width: 100%;
}
.nav-dd-item:hover { background: rgba(255,255,255,0.05); color: var(--text-heading); }

.nav-dd-hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 4px 0;
}

/* ── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: filter 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); }

.btn-primary {
  background: var(--accent);
  color: var(--bg-page);
  box-shadow: 0 4px 16px rgba(245,200,66,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,200,66,0.35); }

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-heading);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-body);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-heading); }

.btn-success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(34,197,94,0.25);
}

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-xs { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ── HERO ───────────────────────────────── */
.hero {
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 80px 60px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-heavy);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 36px;
  animation: fadeUp 0.5s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-heading);
  margin-bottom: 24px;
  animation: fadeUp 0.5s 0.08s ease both;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-wordmark {
  font-family: var(--font-display);
  font-size: 76px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text-heading);
  margin-bottom: 16px;
  line-height: 1;
  animation: fadeUp 0.5s 0.04s ease both;
}

.hero-wordmark .logo-y {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.15em;
  letter-spacing: -1px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-body);
  max-width: 480px;
  margin: 0 auto 48px;
  line-height: 1.7;
  font-weight: 400;
  animation: fadeUp 0.5s 0.16s ease both;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.5s 0.24s ease both;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
  animation: fadeUp 0.5s 0.32s ease both;
}
.hero-stat-n {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-heading);
}
.hero-stat-l { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

/* ── HERO SPLIT LAYOUT ──────────────────── */
.hero-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.hero-left .hero-sub   { margin: 0 0 48px; }
.hero-left .hero-cta   { justify-content: flex-start; }
.hero-left .hero-stats { justify-content: flex-start; }

/* ── 3D CARD STACK ──────────────────────── */
.hero-right {
  flex: 0 0 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  padding: 40px 0;
}

.hero-card-stack {
  position: relative;
  width: 340px;
  height: 500px;
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px)   rotateY(-4deg); }
  50%       { transform: translateY(-20px) rotateY(4deg); }
}

.hero-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 340px;
  height: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px 30px;
  gap: 5px;
  transform-origin: center bottom;
}
.hero-card:nth-child(1) { transform: rotateZ(-5deg) translate(-18px, 0px);   opacity: 0.6; }
.hero-card:nth-child(2) { transform: rotateZ(-1deg) translate(-6px,  150px); opacity: 0.82; }
.hero-card:nth-child(3) { transform: rotateZ(3deg)  translate(10px,  300px); opacity: 1; }

.hero-card-icon { font-size: 36px; line-height: 1; margin-bottom: 10px; }
.hero-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}
.hero-card-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── PAGE HEADER ────────────────────────── */
.page-header { padding: 48px 0 32px; position: relative; z-index: 1; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
  color: var(--text-heading);
}
.page-header p { color: var(--text-body); font-size: 15px; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  opacity: 0.4;
}

/* ── SUBJECTS GRID ──────────────────────── */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

/* ── PILLAR CARD ────────────────────────── */
.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s ease both;
  text-decoration: none;
  display: block;
}
.pillar-card:hover { 
  transform: scale(1.03); 
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.pillar-card.locked { opacity: 0.45; cursor: default; }
.pillar-card.locked:hover { transform: none; box-shadow: var(--shadow); }

/* Pillar image zones */
.pillar-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}
.pillar-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.3s ease;
}
.pillar-image img.img-ready { opacity: 1; }
.pillar-card:hover .pillar-image img { transform: scale(1.05); }
.pillar-card.locked .pillar-image img { filter: grayscale(60%) brightness(0.85); }

/* Gradient overlays for each pillar */
.pillar-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--pillar-color) 60%);
  opacity: 0.7;
  transition: opacity 0.25s ease;
}
.pillar-card:hover .pillar-image::after { opacity: 0.85; }

/* Pillar color assignments */
.grad-tech     { --pillar-color: var(--pillar-tech); }
.grad-ai       { --pillar-color: var(--pillar-ai); }
.grad-money    { --pillar-color: var(--pillar-money); }
.grad-history  { --pillar-color: var(--pillar-history); }
.grad-mystery  { --pillar-color: var(--pillar-mystery); }
.grad-science  { --pillar-color: var(--pillar-science); }
.grad-music    { --pillar-color: var(--pillar-music); }
.grad-dance    { --pillar-color: var(--pillar-dance); }
.grad-cooking  { --pillar-color: var(--pillar-cooking); }
.grad-arts     { --pillar-color: var(--pillar-arts); }
.grad-mind     { --pillar-color: var(--pillar-mind); }
.grad-myth     { --pillar-color: var(--pillar-myth); }
.grad-fitness  { --pillar-color: var(--pillar-fitness); }
.grad-language { --pillar-color: var(--pillar-language); }
.grad-income   { --pillar-color: var(--pillar-income); }

.pillar-body { padding: 16px 18px 20px; }
.pillar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}
.pillar-meta { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.coming-soon-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
}

/* ── BADGE ──────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 100px;
  flex-shrink: 0;
}
.badge-free   { background: var(--green-soft);  color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-paid   { background: var(--gold-soft);   color: var(--gold);  border: 1px solid rgba(245,200,66,0.25); }
.badge-locked { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-subtle); }

/* ── SUBJECT (PILLAR) PAGE ──────────────── */
.subject-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-body);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.15s;
  position: relative;
  z-index: 1;
  padding-top: 20px;
  display: block;
}
.subject-back:hover { color: var(--text-heading); }

.subject-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.subject-hero-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.05);
}
.subject-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.subject-hero-image img.img-ready { opacity: 1; }
.subject-hero-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.6));
  pointer-events: none;
}
.subject-hero-body { padding: 22px 26px 26px; }
.subject-hero-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-heading);
  margin-bottom: 5px;
}
.subject-hero-desc { color: var(--text-body); font-size: 14px; }

/* ── COURSE TRACK (leveled) ─────────────── */
.course-track {
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.course-track-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.course-track-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.course-track-row::-webkit-scrollbar { display: none; }

.level-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  width: 28px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* ── COURSE GRID (completion) ───────────── */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

/* ── COURSE CARD ─────────────────────────── */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: block;
  flex-shrink: 0;
  width: 220px;
  position: relative;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* In grid mode, override fixed width */
.course-grid .course-card { width: auto; }

.course-card-icon { font-size: 26px; margin-bottom: 12px; }
.course-card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 5px;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.course-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.course-card-footer { display: flex; align-items: center; justify-content: space-between; }

/* ── COURSE PAGE ────────────────────────── */
.course-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.course-hero-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.05);
}
.course-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 8px;
}
.course-hero-image img.img-ready { opacity: 1; }
.course-hero-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5));
  pointer-events: none;
}
.course-hero-body { padding: 20px 24px 24px; }
.course-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 7px;
}
.course-hero-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-heading);
  margin-bottom: 5px;
}
.course-hero-desc { color: var(--text-body); font-size: 14px; line-height: 1.6; }

/* ── PROGRESS ───────────────────────────── */
.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.progress-bar {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  height: 7px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--accent);
  transition: width 0.5s ease;
}
.progress-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-weight: 600; }

/* ── VIDEO LIST ─────────────────────────── */
.video-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; position: relative; z-index: 1; }

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.video-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.video-card.completed { border-left: 3px solid var(--accent); }

.video-num {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-body);
}
.video-num.done { background: var(--green-soft); border-color: rgba(34,197,94,0.3); color: var(--green); }

.video-info { flex: 1; min-width: 0; }
.video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.video-meta { font-size: 12px; color: var(--text-muted); }

.video-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.done-label { font-size: 12px; font-weight: 700; color: var(--green); }

/* ── PLAYER ─────────────────────────────── */
.player-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.video-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.video-embed-wrapper iframe,
.video-embed-wrapper > div { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.player-footer {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.03);
}
.player-status { flex: 1; font-size: 13px; color: var(--text-body); font-weight: 500; }

/* ── QUIZ / PAYWALL / LOGIN ─────────────── */
.quiz-cta, .paywall-card, .login-gate {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.quiz-cta h2, .paywall-card h2, .login-gate h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-heading);
}
.quiz-cta p, .paywall-card p, .login-gate p {
  color: var(--text-body);
  font-size: 14px;
  margin-bottom: 20px;
}

.paywall-card { border-color: rgba(245,200,66,0.2); }
.paywall-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-gate { border-color: rgba(108,99,255,0.2); }

.price-tag { font-family: var(--font-display); font-size: 38px; font-weight: 800; color: var(--gold); letter-spacing: -1px; margin-bottom: 4px; }
.price-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }

.video-list-preview { filter: blur(4px); opacity: 0.3; pointer-events: none; user-select: none; }

/* ── QUIZ PAGE ──────────────────────────── */
.quiz-header { padding: 36px 0 24px; position: relative; z-index: 1; }
.quiz-header h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 5px;
  color: var(--text-heading);
}
.quiz-header p { color: var(--text-body); font-size: 14px; }

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.35s ease both;
  position: relative;
  z-index: 1;
}
.question-number { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 9px; }
.question-text { font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.5; margin-bottom: 16px; color: var(--text-heading); }

.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  padding: 12px 15px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  color: var(--text-body);
  font-family: var(--font-body);
  transition: all 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.option:hover   { border-color: var(--accent); background: rgba(245,200,66,0.05); }
.option.selected { border-color: var(--accent); background: rgba(245,200,66,0.1); }
.option.correct  { border-color: var(--green);  background: var(--green-soft); }
.option.wrong    { border-color: #dc2626;        background: rgba(220,38,38,0.1); }

.option-letter {
  width: 21px; height: 21px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
  color: var(--text-muted);
}

.quiz-submit-row { text-align: center; padding: 24px 0 48px; position: relative; z-index: 1; }
.quiz-msg { color: var(--text-muted); font-size: 13px; margin-top: 10px; }

/* ── RESULT ─────────────────────────────── */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  text-align: center;
  max-width: 460px;
  margin: 60px auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.score-ring {
  width: 115px; height: 115px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 34px; font-weight: 800;
  border: 3px solid;
}
.score-ring.pass { color: var(--green); border-color: var(--green); }
.score-ring.fail { color: #dc2626; border-color: #dc2626; }
.result-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 8px; color: var(--text-heading); }
.result-sub { color: var(--text-body); font-size: 14px; margin-bottom: 26px; line-height: 1.6; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── ALERTS ─────────────────────────────── */
.alert {
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 14px;
  margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 10px;
  position: relative; z-index: 1;
}
.alert-info    { background: rgba(108,99,255,0.1);   border: 1px solid rgba(108,99,255,0.2);  color: var(--accent-dark); }
.alert-success { background: var(--green-soft);       border: 1px solid rgba(34,197,94,0.25);   color: var(--green); }
.alert-warning { background: var(--gold-soft);        border: 1px solid rgba(245,200,66,0.25);  color: var(--gold); }

/* ── LOADING ────────────────────────────── */
.loading { text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 14px; position: relative; z-index: 1; }
.loading-spinner {
  width: 26px; height: 26px;
  border: 2.5px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}

/* ── ANIMATIONS ─────────────────────────── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.pillar-card:nth-child(1)  { animation-delay:0.00s }
.pillar-card:nth-child(2)  { animation-delay:0.04s }
.pillar-card:nth-child(3)  { animation-delay:0.08s }
.pillar-card:nth-child(4)  { animation-delay:0.12s }
.pillar-card:nth-child(5)  { animation-delay:0.16s }
.pillar-card:nth-child(6)  { animation-delay:0.20s }
.pillar-card:nth-child(7)  { animation-delay:0.24s }
.pillar-card:nth-child(8)  { animation-delay:0.28s }
.pillar-card:nth-child(9)  { animation-delay:0.32s }
.pillar-card:nth-child(10) { animation-delay:0.36s }
.pillar-card:nth-child(11) { animation-delay:0.40s }
.pillar-card:nth-child(12) { animation-delay:0.44s }
.pillar-card:nth-child(13) { animation-delay:0.48s }
.pillar-card:nth-child(14) { animation-delay:0.52s }
.pillar-card:nth-child(15) { animation-delay:0.56s }

/* ── PAGE TRANSITIONS ───────────────────── */
.page-wrapper {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 350ms ease-out, transform 350ms ease-out;
}
.page-wrapper.page-visible {
  opacity: 1;
  transform: translateY(0);
}
.page-wrapper.page-exit {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 280ms ease-in, transform 280ms ease-in;
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
  header { padding: 0 16px; }
  .container { padding: 0 16px; }
  .hero h1 { font-size: 38px; letter-spacing: -1.5px; }
  .hero-stats { gap: 24px; }
  .subjects-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .result-card { padding: 36px 20px; margin: 32px auto; }
  .question-card { padding: 18px 14px; }
  .quiz-cta, .paywall-card, .login-gate { padding: 22px 16px; }
}

@media (max-width: 480px) {
  .subjects-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pillar-image { height: 90px; font-size: 38px; }
  .pillar-name { font-size: 13px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .course-grid { grid-template-columns: 1fr; }
}

/* ── FOOTER ─────────────────────────────── */
.site-footer {
  text-align: center;
  font-size: 13px;
  color: #666;
  padding: 40px 24px;
  border-top: 1px solid #1a1a2e;
  background: #0D0F14;
}

.site-footer a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: #fff;
}
