/* ============================================
   LEARNTUBE — iOS Glass Design
   Real transparency · Soft blue gradient bg
   ============================================ */

@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;

  --text:    #0f1c2e;
  --text-2:  #3d5166;
  --muted:   #7a95aa;
  --accent:  #1a4a7a;
  --border:  rgba(255,255,255,0.45);
  --border-dark: rgba(0,0,0,0.08);

  --glass:       rgba(255,255,255,0.35);
  --glass-heavy: rgba(255,255,255,0.55);
  --glass-nav:   rgba(255,255,255,0.6);
  --blur:        blur(20px);
  --blur-heavy:  blur(32px);

  --green:      #166534;
  --green-soft: rgba(22,101,52,0.1);
  --gold:       #92400e;
  --gold-soft:  rgba(146,64,14,0.1);

  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 12px rgba(15,28,46,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  --shadow:    0 8px 32px rgba(15,28,46,0.12), inset 0 1px 0 rgba(255,255,255,0.5);
  --shadow-lg: 0 20px 60px rgba(15,28,46,0.18), inset 0 1px 0 rgba(255,255,255,0.4);
}

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

/* ── BACKGROUND — the real star ─────────── */
body {
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;

  /* The actual background that shows through glass */
  background:
    radial-gradient(ellipse 140% 80% at 20% -10%, #a8d8f0 0%, transparent 55%),
    radial-gradient(ellipse 80%  60% at 80%  10%, #c5e8f7 0%, transparent 50%),
    radial-gradient(ellipse 100% 70% at 60% 100%, #dbeeff 0%, transparent 60%),
    radial-gradient(ellipse 60%  50% at 0%  80%,  #b8e0f5 0%, transparent 50%),
    linear-gradient(175deg, #cce8f8 0%, #def0fb 35%, #eaf6ff 65%, #f0f8ff 100%);
  background-attachment: fixed;
}

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

/* ── 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-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 0 var(--border-dark);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo span { 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(26,74,122,0.12);
  border: 1.5px solid rgba(26,74,122,0.2);
  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-2);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

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

/* ── NAV DROPDOWN ───────────────────────── */
.nav-mycourses { margin-right: 4px; }

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

.nav-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.55);
  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.55); }

.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(26,74,122,0.12);
  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);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.nav-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(15,28,46,0.14), 0 2px 8px rgba(15,28,46,0.08);
  border: 1px solid rgba(0,0,0,0.07);
  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);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s;
  width: 100%;
}
.nav-dd-item:hover { background: rgba(0,0,0,0.04); }

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

/* ── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 24px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26,74,122,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(26,74,122,0.4); }

.btn-secondary {
  background: var(--glass-heavy);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: rgba(255,255,255,0.7); }

.btn-ghost {
  background: rgba(255,255,255,0.3);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.5); color: var(--text); }

.btn-success {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(22,101,52,0.3);
}

.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);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.5s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: var(--text);
  margin-bottom: 24px;
  animation: fadeUp 0.5s 0.08s ease both;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  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);
  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);
}
.hero-stat-l { font-size: 12px; color: var(--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: rgba(255,255,255,0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.68);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(15,28,46,0.14), inset 0 1px 0 rgba(255,255,255,0.7);
  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);
  letter-spacing: -0.3px;
}
.hero-card-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--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);
}
.page-header p { color: var(--text-2); font-size: 15px; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--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-dark);
  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 — real glass ───────────── */
.pillar-card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s ease both;
  text-decoration: none;
  display: block;
}
.pillar-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.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;
  background: rgba(200,215,230,0.3);
}
.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); }

/* All pillar images = frosted tints over the blue bg */
.grad-mystery  { background: rgba(147,51,234,0.08);  }
.grad-history  { background: rgba(180,83,9,0.10);    }
.grad-tech     { background: rgba(26,74,122,0.08);   }
.grad-ai       { background: rgba(6,182,212,0.09);   }
.grad-money    { background: rgba(22,101,52,0.08);   }
.grad-income   { background: rgba(219,39,119,0.07);  }
.grad-science  { background: rgba(37,99,235,0.09);   }
.grad-music    { background: rgba(124,58,237,0.08);  }
.grad-dance    { background: rgba(236,72,153,0.08);  }
.grad-cooking  { background: rgba(234,88,12,0.09);   }
.grad-arts     { background: rgba(147,51,234,0.07);  }
.grad-mind     { background: rgba(13,148,136,0.08);  }
.grad-myth     { background: rgba(109,40,217,0.08);  }
.grad-fitness  { background: rgba(220,38,38,0.08);   }
.grad-language { background: rgba(16,185,129,0.08);  }

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

.coming-soon-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--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(22,101,52,0.15); }
.badge-paid   { background: var(--gold-soft);   color: var(--gold);  border: 1px solid rgba(146,64,14,0.15); }
.badge-locked { background: rgba(0,0,0,0.05);   color: var(--muted); border: 1px solid var(--border-dark); }

/* ── SUBJECT (PILLAR) PAGE ──────────────── */
.subject-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  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); }

.subject-hero {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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(200,215,230,0.3);
}
.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.35));
  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);
  margin-bottom: 5px;
}
.subject-hero-desc { color: var(--text-2); 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(--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(--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 — real glass ───────────── */
.course-card {
  background: var(--glass-heavy);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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);
  margin-bottom: 5px;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.course-card-meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.course-card-footer { display: flex; align-items: center; justify-content: space-between; }

/* ── COURSE PAGE ────────────────────────── */
.course-hero {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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(200,215,230,0.3);
}
.course-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.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.25));
  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);
  margin-bottom: 5px;
}
.course-hero-desc { color: var(--text-2); 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.4);
  border: 1px solid var(--border);
  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(--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(--glass-heavy);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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-color: rgba(22,101,52,0.2); }

.video-num {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border);
  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-2);
}
.video-num.done { background: var(--green-soft); border-color: rgba(22,101,52,0.25); color: var(--green); }

.video-info { flex: 1; min-width: 0; }
.video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.video-meta { font-size: 12px; color: var(--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(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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);
  background: rgba(255,255,255,0.2);
}
.player-status { flex: 1; font-size: 13px; color: var(--text-2); font-weight: 500; }

/* ── QUIZ / PAYWALL / LOGIN ─────────────── */
.quiz-cta, .paywall-card, .login-gate {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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);
}
.quiz-cta p, .paywall-card p, .login-gate p {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 20px;
}

.paywall-card { border-color: rgba(146,64,14,0.15); }
.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(26,74,122,0.15); }

.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(--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);
}
.quiz-header p { color: var(--text-2); font-size: 14px; }

.question-card {
  background: var(--glass-heavy);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  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); }

.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  padding: 12px 15px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  background: rgba(255,255,255,0.45);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text);
  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(26,74,122,0.06); }
.option.selected { border-color: var(--accent); background: rgba(26,74,122,0.09); }
.option.correct  { border-color: var(--green);  background: var(--green-soft); }
.option.wrong    { border-color: #dc2626;        background: rgba(220,38,38,0.07); }

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

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

/* ── RESULT ─────────────────────────────── */
.result-card {
  background: var(--glass-heavy);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border: 1px solid var(--border);
  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); }
.result-sub { color: var(--text-2); 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;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.alert-info    { background: rgba(26,74,122,0.08);   border: 1px solid rgba(26,74,122,0.15);  color: var(--accent); }
.alert-success { background: var(--green-soft);       border: 1px solid rgba(22,101,52,0.2);   color: var(--green); }
.alert-warning { background: var(--gold-soft);        border: 1px solid rgba(146,64,14,0.15);  color: var(--gold); }

/* ── LOADING ────────────────────────────── */
.loading { text-align: center; padding: 80px 20px; color: var(--muted); font-size: 14px; position: relative; z-index: 1; }
.loading-spinner {
  width: 26px; height: 26px;
  border: 2.5px solid rgba(26,74,122,0.15);
  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; }
}