/* ============================================
   Pari — Design Tokens & Global Styles
   ============================================ */

:root {
  /* Wispr Flow Design Tokens */
  
  /* Colors */
  --color-cream-paper: #ffffeb;
  --color-midnight-ink: #1a1a1a;
  --color-pure-black: #000000;
  --color-white: #ffffff;
  --color-stone-mist: #e4e4d0;
  --color-graphite-veil: #8a8a80;
  --color-smoke: #5f5f59;
  --color-charcoal: #222222;
  --color-charcoal-mist: #333333;
  --color-deep-forest-teal: #034f46;
  --color-lavender-whisper: #f0d7ff;
  --color-amber-pulse: #ffa946;

  /* Typography — Font Families */
  --font-figtree: 'Figtree', 'Inter', 'DM Sans', 'Manrope', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-eb-garamond: 'EB Garamond', 'Cormorant Garamond', 'Playfair Display', 'Lora', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-apple-color-emoji: 'Apple Color Emoji', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Typography — Scale */
  --text-caption: 14px;
  --leading-caption: 1.3;
  --text-body: 16px;
  --leading-body: 1.3;
  --text-subheading: 20px;
  --leading-subheading: 1.3;
  --text-heading-sm: 24px;
  --leading-heading-sm: 1;
  --text-heading: 32px;
  --leading-heading: 1;
  --text-heading-lg: 48px;
  --leading-heading-lg: 0.95;
  --tracking-heading-lg: -0.07px;
  --text-display: 64px;
  --leading-display: 0.95;
  --tracking-display: -0.05px;
  --text-display-xl: 120px;
  --leading-display-xl: 0.85;
  --tracking-display-xl: -0.13px;

  /* Typography — Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --spacing-8: 8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-56: 56px;
  --spacing-64: 64px;
  --spacing-80: 80px;
  --spacing-96: 96px;
  --spacing-104: 104px;
  --spacing-128: 128px;
  --spacing-168: 168px;
  --spacing-224: 224px;

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: 80px;
  --card-padding: 24px;
  --element-gap: 16px;

  /* Border Radius */
  --radius-lg: 8px;
  --radius-xl: 14px;
  --radius-3xl: 32px;
  --radius-3xl-2: 40px;
  --radius-full: 64px;
  --radius-full-2: 80px;
  --radius-full-3: 992px;
  --radius-full-4: 1000px;
  --radius-full-5: 1600px;

  /* Named Radii */
  --radius-nav: 14px;
  --radius-cards: 32px;
  --radius-badges: 1000px;
  --radius-images: 40px;
  --radius-buttons: 14px;
  --radius-smallbadges: 8px;
  --radius-decorativeorbs: 1600px;

  /* Shadows */
  --shadow-subtle: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-subtle-2: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-subtle-3: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-subtle-4: 0 4px 16px rgba(0,0,0,0.1);

  /* Legacy variable mappings for compatibility */
  --bg: var(--color-cream-paper);
  --fg: var(--color-midnight-ink);
  --muted: var(--color-graphite-veil);
  --surface: var(--color-stone-mist);
  --accent: var(--color-lavender-whisper);
  --accent-hover: var(--color-lavender-whisper);
  --radius: var(--radius-cards);
  --radius-sm: var(--radius-lg);
  --shadow-soft: var(--shadow-subtle);
  --shadow-hover: var(--shadow-subtle-2);
  --container: var(--page-max-width);
  --gap: var(--spacing-8);
  --gap-lg: var(--spacing-16);
  --gap-xl: var(--spacing-32);
  --font: var(--font-figtree);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap-xl);
}

/* ============================================
   Mobile Gate
   ============================================ */
#mobile-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  align-items: center;
  justify-content: center;
}
.mobile-gate-content {
  text-align: center;
  padding: var(--gap-xl);
  max-width: 380px;
}
.mobile-gate-icon { font-size: 56px; margin-bottom: 16px; }
.mobile-gate-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.mobile-gate-content p {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1023px) {
  #mobile-gate { display: flex; }
  #site-header, #hero, #batches, #site-footer { display: none; }
}

/* ============================================
   Header
   ============================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-cream-paper);
  border-bottom: 1px solid transparent;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--gap-lg);
  padding: 8px 12px;
  border-radius: var(--radius-nav);
  background: var(--color-white);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
}
.logo {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.3px;
  color: var(--color-midnight-ink);
  flex-shrink: 0;
}
.header-tagline {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-graphite-veil);
  white-space: nowrap;
  flex-shrink: 0;
}
.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-buttons);
  background: transparent;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  white-space: nowrap;
  flex-shrink: 0;
  transition: none;
  border: none;
  box-shadow: none;
}
.header-nav-link:hover {
  background: transparent;
  color: var(--color-midnight-ink);
  box-shadow: none;
}
.header-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.header-search input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-buttons);
  background: var(--color-white);
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-midnight-ink);
  outline: none;
  transition: none;
}
.header-search input::placeholder { color: var(--color-graphite-veil); }
.header-search input:focus {
  background: var(--color-white);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--color-midnight-ink);
}
.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-stone-mist);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--color-smoke);
  transition: all 0.2s ease;
}
.search-clear-btn:hover {
  background: var(--color-graphite-veil);
  color: var(--color-white);
}
.search-clear-btn:active {
  transform: translateY(-50%) scale(0.95);
}
.search-highlight {
  background: linear-gradient(120deg, var(--color-amber-pulse) 0%, #ffcc00 100%);
  color: var(--color-midnight-ink);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
.search-results-count {
  font-size: 13px;
  color: var(--color-smoke);
  margin-top: 4px;
}
.search-results-count.hidden {
  display: none;
}
.batch-id-direct-link {
  margin-top: 12px;
}
.batch-id-match {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--color-lavender-whisper) 0%, #f0e7ff 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-buttons);
  font-size: 14px;
  color: var(--color-midnight-ink);
}
.batch-id-match svg {
  flex-shrink: 0;
  color: var(--color-deep-forest-teal);
}
.batch-id-match strong {
  color: var(--color-deep-forest-teal);
  font-weight: 600;
}
.batch-id-link-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-deep-forest-teal);
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-smallbadges);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.batch-id-link-btn:hover {
  background: var(--color-midnight-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}
.batch-id-link-btn svg {
  color: var(--color-white);
}

/* ============================================
   Hero — Split Screen
   ============================================ */
#hero {
  padding: 80px 0 72px;
  background: var(--color-cream-paper);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-badges);
  background: var(--color-white);
  color: var(--color-midnight-ink);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  border: 1px solid var(--color-stone-mist);
  box-shadow: none;
}
.hero-left h1 {
  font-family: var(--font-eb-garamond);
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: var(--font-weight-regular);
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin-bottom: 20px;
  color: var(--color-midnight-ink);
}
.accent { color: var(--color-amber-pulse); }
.hero-sub {
  font-size: 18px;
  color: var(--color-graphite-veil);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.5;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-buttons);
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  border: 1px solid var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
  transition: none;
}
.hero-cta:hover { background: var(--color-lavender-whisper); }

/* Hero CTA group */
.hero-cta-group {
  display: flex;
  gap: 12px;
  align-items: center;
}
.hero-cta.secondary {
  background: transparent;
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: none;
}
.hero-cta.secondary:hover {
  background: transparent;
  transform: none;
}

/* Hero visual cards */
.hero-right { display: flex; justify-content: center; }
.hero-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius-images);
  box-shadow: var(--shadow-hover);
}
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 340px;
}
.hero-card {
  position: absolute;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
  padding: 20px;
}
.hero-card-1 { width: 220px; top: 0; left: 0; }
.hero-card-2 { width: 200px; top: 40px; right: 0; }
.hero-card-3 { width: 240px; bottom: 0; left: 40px; }
.hero-card-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--fg); margin-bottom: 12px;
}
.dot-accent { background: var(--accent); }
.dot-muted { background: var(--muted); }
.hero-card-line {
  height: 8px;
  border-radius: 4px;
  background: var(--surface);
  margin-bottom: 8px;
}
.w90 { width: 90%; } .w80 { width: 80%; } .w70 { width: 70%; }
.w65 { width: 65%; } .w60 { width: 60%; } .w50 { width: 50%; }
.w45 { width: 45%; } .w40 { width: 40%; }

/* ============================================
   Batches — Pinterest / Masonry Grid
   ============================================ */
#batches {
  padding: 72px 0 96px;
}
.section-header {
  margin-bottom: 40px;
}
.section-header h2 {
  font-family: var(--font-eb-garamond);
  font-size: 48px;
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.07em;
  color: var(--color-midnight-ink);
}
.section-sub {
  color: var(--color-graphite-veil);
  margin-top: 6px;
  font-size: 16px;
}

/* CSS columns for Pinterest masonry effect */
.batch-grid {
  column-count: 4;
  column-gap: var(--gap-lg);
}

.batch-card {
  break-inside: avoid;
  margin-bottom: var(--gap-lg);
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  transition: none;
  cursor: default;
}
.batch-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: none;
}

/* Card image */
.batch-card-img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: var(--surface);
}

/* Card body */
.batch-card-body {
  padding: 16px;
}
.batch-card-name {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-midnight-ink);
}
.batch-card-byname {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--color-graphite-veil);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-card-byname svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.batch-card-dates {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.batch-date {
  font-size: 14px;
  color: var(--color-graphite-veil);
  display: flex;
  align-items: center;
  gap: 6px;
}
.batch-date svg { flex-shrink: 0; }
.batch-card-price {
  display: flex;
  align-items: center;
  gap: 10px;
}
.price-original {
  font-size: 14px;
  color: var(--color-graphite-veil);
  text-decoration: line-through;
}
.price-free {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  background: var(--color-lavender-whisper);
  padding: 6px 14px;
  border-radius: var(--radius-badges);
  letter-spacing: 0.3px;
  border: 1px solid var(--color-midnight-ink);
}

/* Enrolled date on My Batches cards */
.batch-card-enrolled-date {
  font-size: 13px;
  color: var(--color-graphite-veil);
  margin-bottom: 8px;
}

/* Card action buttons */
.batch-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.btn-enroll, .btn-explore {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--color-midnight-ink);
  border-radius: var(--radius-buttons);
  font-family: var(--font);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: none;
}
.btn-enroll {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}
.btn-enroll:hover {
  background: var(--color-lavender-whisper);
  transform: none;
  box-shadow: var(--shadow-subtle);
}
.btn-enroll.enrolled {
  background: var(--color-white);
  color: var(--color-graphite-veil);
  cursor: default;
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
}
.btn-enroll.enrolled:hover {
  transform: none;
  box-shadow: var(--shadow-subtle);
}
.btn-explore {
  background: transparent;
  color: var(--color-midnight-ink);
  box-shadow: none;
}
.btn-explore:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

/* Enroll toast */
.enroll-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: #1D1D1F;
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s;
  z-index: 200;
}
.enroll-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.enroll-toast svg { color: #34C759; flex-shrink: 0; }

/* Skeleton loading */
.batch-card.skeleton {
  padding: 0;
}
.skel-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(110deg, var(--surface) 30%, #ececee 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skel-line {
  height: 10px;
  border-radius: 5px;
  margin: 12px 16px;
  background: linear-gradient(110deg, var(--surface) 30%, #ececee 50%, var(--surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* No results */
.no-results {
  text-align: center;
  padding: 48px 0;
  color: var(--color-graphite-veil);
  font-size: 16px;
}
.hidden { display: none; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  column-span: all;
  break-inside: avoid;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--color-graphite-veil);
  font-size: 16px;
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state .hero-cta {
  display: inline-block;
  margin: 0 auto;
}

.empty-state-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-buttons);
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-semibold);
  font-size: 14px;
  border: 1px solid var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
  text-decoration: none;
  transition: none;
}

.empty-state-btn:hover {
  background: var(--color-lavender-whisper);
}

/* ============================================
   PW Video Player Styles
   ============================================ */
.secure-player-page {
  color: #fff;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: #000;
  width: 100vw;
  height: 100dvh;
  font-family: Outfit, Inter, sans-serif;
  position: relative;
  overflow: hidden;
}

.player-main-workspace {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

.player-video-section {
  background: #000;
  flex-direction: column;
  flex: 1;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

.secure-player-page:not(:hover) {
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  .secure-player-page:not(:hover) {
    cursor: default;
  }
}

.header-left-group {
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
  max-width: 75%;
  display: flex;
  overflow: hidden;
}

.header-right-group {
  flex-shrink: 0;
  align-items: center;
  gap: 1rem;
  display: flex;
}

.secure-player-header {
  height: 70px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(2rem, env(safe-area-inset-left, 0px));
  padding-right: max(2rem, env(safe-area-inset-right, 0px));
  z-index: 100;
  background: linear-gradient(#000000d9 0%, #0000 100%);
  justify-content: space-between;
  align-items: center;
  transition: opacity .4s, transform .4s;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.secure-player-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.secure-player-header.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

.header-video-title {
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  overflow: hidden;
}

.player-back-btn {
  color: #fff;
  cursor: pointer;
  background: 0 0;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  transition: background .25s, transform .25s;
  display: flex;
}

.player-back-btn svg {
  width: 28px;
  height: 28px;
}

.player-back-btn:hover {
  background: #ffffff1f;
  transform: scale(1.05);
}

.header-tool-btn {
  color: #fff;
  cursor: pointer;
  opacity: .85;
  background: 0 0;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  transition: background .25s, opacity .25s, transform .25s;
  display: flex;
}

.header-tool-btn svg {
  width: 28px;
  height: 28px;
}

.header-tool-btn:hover {
  opacity: 1;
  background: #ffffff1f;
  transform: scale(1.05);
}

.player-center-overlay {
  z-index: 90;
  transition: opacity .3s, transform .3s;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.player-center-overlay.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.player-center-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.85);
}

.center-play-btn {
  color: #fff;
  cursor: pointer;
  width: 96px;
  height: 96px;
  box-shadow: none;
  background: 0 0;
  border: none;
  outline: none;
  justify-content: center;
  align-items: center;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), color .25s;
  display: flex;
}

.center-play-btn svg {
  width: 76px;
  height: 76px;
}

.center-play-btn:hover {
  color: #5a4bda;
  background: 0 0;
  transform: scale(1.1);
}

.center-controls-row {
  align-items: center;
  gap: 2.5rem;
  display: flex;
}

.center-control-btn {
  color: #fff;
  cursor: pointer;
  width: 56px;
  height: 56px;
  box-shadow: none;
  background: 0 0;
  border: none;
  outline: none;
  justify-content: center;
  align-items: center;
  transition: transform .2s, color .2s;
  display: none !important;
}

.center-control-btn:hover {
  color: #5a4bda;
  background: 0 0;
  transform: scale(1.08);
}

.center-control-btn:active {
  transform: scale(.95);
}

.center-control-btn svg {
  width: 46px;
  height: 46px;
}

.secure-player-content {
  background: #000;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}

.video-player-container {
  background: #000;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
}

#lecture-player {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.secure-player-controls {
  padding: 2.5rem 0 max(.75rem, env(safe-area-inset-bottom, 0px)) 0;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  z-index: 100;
  background: linear-gradient(#0000 0%, #0009 40%, #000000fa 100%);
  flex-direction: column;
  gap: 0;
  transition: opacity .4s, transform .4s;
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.secure-player-controls.visible {
  opacity: 1;
  transform: translateY(0);
}

.secure-player-controls.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.controls-time-row {
  justify-content: space-between;
  align-items: center;
  margin-bottom: .2rem;
  padding: 0 2rem;
  display: flex;
}

.progress-bar-container {
  cursor: pointer;
  box-sizing: border-box;
  align-items: center;
  width: 100%;
  height: 36px;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  position: relative;
}

.progress-bar-track {
  background: #ffffff38;
  border-radius: 9999px;
  width: 100%;
  height: 4px;
  transition: height .15s;
  position: relative;
  overflow: visible;
}

.progress-bar-container:hover .progress-bar-track,
.progress-bar-container:active .progress-bar-track {
  height: 6px;
}

.progress-bar-buffer {
  pointer-events: none;
  background: #ffffff2e;
  border-radius: 9999px;
  height: 100%;
  transition: width .3s linear;
  position: absolute;
  top: 0;
  left: 0;
}

.progress-bar-fill {
  pointer-events: none;
  background: #5a4bda;
  border-radius: 9999px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.progress-bar-handle {
  pointer-events: none;
  z-index: 10;
  background: #fff;
  border: 2px solid #5a4bda;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  transition: transform .15s;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 8px #5a4bdab3;
}

.progress-bar-container:hover .progress-bar-handle,
.progress-bar-container:active .progress-bar-handle {
  transform: translate(-50%, -50%) scale(1);
}

.controls-time-display {
  color: #fffffff2;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  white-space: nowrap;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-size: .88rem;
  font-weight: 600;
  display: flex;
}

.time-current {
  color: #fff;
}

.time-separator {
  color: #ffffff73;
  margin: 0 1px;
  font-weight: 400;
}

.time-duration {
  color: #fff9;
}

.speed-indicator-badge {
  color: #fff;
  letter-spacing: .02em;
  background: #ffffff2e;
  border-radius: 9999px;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: .72rem;
  font-weight: 700;
}

.controls-buttons-row {
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  padding: 0 2rem;
  display: flex;
}

.left-controls-group,
.right-controls-group {
  align-items: center;
  gap: .8rem;
  display: flex;
}

.control-action-btn {
  color: #fff;
  cursor: pointer;
  background: 0 0;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  position: relative;
  overflow: visible;
}

.control-action-btn:before {
  content: "";
  z-index: 0;
  background: #fff0;
  border: 1px solid #fff0;
  border-radius: 50%;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  position: absolute;
  inset: 0;
}

.control-action-btn svg {
  z-index: 1;
  opacity: .85;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), opacity .25s, color .25s;
  position: relative;
}

.play-pause-btn svg polygon {
  transform: translate(1px);
}

.control-action-btn:hover:before {
  background: #ffffff1a;
  border-color: #ffffff14;
  box-shadow: 0 4px 12px #00000026;
}

.control-action-btn:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

.control-action-btn:active:before {
  background: #ffffff2e;
  transform: scale(.95);
}

.control-action-btn:active svg {
  transform: scale(.95);
}

.control-action-btn.active {
  color: #5a4bda;
}

.control-action-btn.active svg {
  color: #5a4bda;
  filter: drop-shadow(0 0 6px #5a4bda99);
}

.control-action-btn.active:before {
  background: #5a4bda1f;
  border-color: #5a4bda33;
}

.player-icon {
  cursor: pointer;
  transition: transform .25s;
}

.volume-control-wrapper {
  align-items: center;
  gap: .5rem;
  display: flex;
}

/* ============================================
   Dashboard Styles
   ============================================ */

#dashboard {
  padding: var(--spacing-64) 0;
}

.dashboard-inner {
  max-width: var(--page-max-width);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-24);
  margin-bottom: var(--spacing-48);
}

.stat-card {
  background: var(--color-cream-paper);
  border-radius: var(--radius-cards);
  padding: var(--spacing-32);
  display: flex;
  align-items: center;
  gap: var(--spacing-24);
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-subtle-2);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.lectures-watched {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
}

.stat-icon.lectures-completed {
  background: #4ade80;
  color: var(--color-midnight-ink);
}

.stat-icon.watch-time {
  background: var(--color-amber-pulse);
  color: var(--color-midnight-ink);
}

.stat-icon.batches-enrolled {
  background: var(--color-deep-forest-teal);
  color: var(--color-white);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: var(--text-heading);
  font-weight: var(--font-weight-bold);
  color: var(--color-midnight-ink);
  line-height: var(--leading-heading);
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-body);
  color: var(--color-smoke);
  font-weight: var(--font-weight-medium);
}

.recent-activity {
  margin-bottom: var(--spacing-48);
}

.recent-activity h3 {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: var(--spacing-24);
}

.enrolled-batches {
  margin-bottom: var(--spacing-48);
}

.enrolled-batches h3 {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: var(--spacing-24);
}

.enrolled-batches-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-16);
}

.enrolled-batch-card {
  background: var(--color-white);
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-xl);
  padding: var(--spacing-24);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.enrolled-batch-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(-2px);
}

.batch-info {
  flex: 1;
}

.batch-name {
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: var(--spacing-8);
}

.batch-image {
  margin-bottom: var(--spacing-12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-stone-mist);
  aspect-ratio: 16/9;
}

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

.batch-id {
  font-size: var(--text-caption);
  color: var(--color-graphite-veil);
  margin-bottom: var(--spacing-8);
  font-family: monospace;
}

.batch-enrolled-date {
  font-size: var(--text-caption);
  color: var(--color-graphite-veil);
}

.batch-action-btn {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius-buttons);
  font-weight: var(--font-weight-medium);
  text-align: center;
  transition: background 0.2s ease;
}

.batch-action-btn:hover {
  background: #e0c0f0;
}

.batches-loading,
.batches-empty {
  text-align: center;
  padding: var(--spacing-32);
  color: var(--color-graphite-veil);
  font-size: var(--text-body);
}

.batches-empty a {
  color: var(--color-lavender-whisper);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.batches-empty a:hover {
  text-decoration: underline;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
}

.activity-item {
  background: var(--color-cream-paper);
  border-radius: var(--radius-buttons);
  padding: var(--spacing-16) var(--spacing-24);
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
  box-shadow: var(--shadow-subtle-3);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-white);
}

.activity-item-watched .activity-icon {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
}

.activity-item-completed .activity-icon {
  background: #4ade80;
  color: var(--color-midnight-ink);
}

.activity-item-enrolled .activity-icon {
  background: var(--color-deep-forest-teal);
}

.activity-details {
  flex: 1;
}

.activity-text {
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  margin-bottom: 4px;
}

.activity-time {
  font-size: var(--text-caption);
  color: var(--color-graphite-veil);
}

.activity-loading,
.activity-error,
.activity-empty {
  padding: var(--spacing-48);
  text-align: center;
  color: var(--color-graphite-veil);
  font-size: var(--text-body);
}

.activity-error {
  color: #ff6584;
}

.quick-actions {
  margin-bottom: var(--spacing-48);
}

.quick-actions h3 {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: var(--spacing-24);
}

.action-buttons {
  display: flex;
  gap: var(--spacing-16);
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-8);
  padding: var(--spacing-16) var(--spacing-24);
  background: var(--color-cream-paper);
  border-radius: var(--radius-buttons);
  color: var(--color-midnight-ink);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  font-size: var(--text-body);
  box-shadow: var(--shadow-subtle-3);
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--color-stone-mist);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.volume-slider {

  appearance: none;
  cursor: pointer;
  opacity: 0;
  background: #fff3;
  border-radius: 2px;
  outline: none;
  width: 0;
  height: 4px;
  transition: width .25s cubic-bezier(.4, 0, .2, 1), opacity .25s;
}

.volume-control-wrapper:hover .volume-slider,
.volume-slider:hover,
.volume-slider:active {
  opacity: 1;
  width: 65px;
}

.volume-slider::-webkit-slider-runnable-track {
  cursor: pointer;
  background: #ffffff40;
  border-radius: 2px;
  width: 100%;
  height: 4px;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  cursor: pointer;
  background: #fff;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  transition: transform .15s, background-color .15s;
  box-shadow: 0 1px 4px #0000004d;
}

.volume-slider:hover::-webkit-slider-thumb {
  background: #5a4bda;
  transform: scale(1.15);
}

.settings-menu-wrapper {
  position: relative;
}

.player-loading-overlay {
  z-index: 200;
  background: #090d16;
  justify-content: center;
  align-items: center;
  transition: opacity .3s;
  display: flex;
  position: absolute;
  inset: 0;
}

.player-loader-content {
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 90%;
  padding: 1.5rem;
  display: flex;
}

.player-loading-overlay .svg-spinner {
  color: #fff;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  animation: 1s linear infinite spin;
}

.player-loading-overlay .svg-spinner .opacity-25 {
  opacity: .25;
}

.player-loading-overlay .svg-spinner .opacity-75 {
  opacity: .75;
}

@keyframes spin {
  0% { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

.player-loading-overlay .loading-title {
  color: #f8fafc;
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
}

.player-loading-overlay .loading-subtitle {
  color: #94a3b8;
  margin: 0;
  font-size: .95rem;
}

.player-error-overlay {
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 200;
  background: #090d16f2;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  display: flex;
  position: absolute;
  inset: 0;
}

.error-content-card {
  text-align: center;
  background: #0f172aa6;
  border: 1px solid #ef444440;
  border-radius: 16px;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  animation: .35s cubic-bezier(.34, 1.56, .64, 1) forwards errorCardEntrance;
  display: flex;
  box-shadow: 0 20px 40px #0009, 0 0 30px #ef44440d;
}

@keyframes errorCardEntrance {
  0% { opacity: 0; transform: scale(.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.error-icon {
  color: #ef4444;
  text-shadow: 0 0 20px #ef444459;
  margin-bottom: .5rem;
  font-size: 3.5rem;
  animation: 2s ease-in-out infinite errorPulse;
}

@keyframes errorPulse {
  0%, to { opacity: 1; transform: scale(1); }
  50% { opacity: .85; transform: scale(1.06); }
}

.error-content-card h3 {
  color: #f8fafc;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.error-content-card p {
  color: #94a3b8;
  margin: 0 0 .75rem;
  font-size: .95rem;
  line-height: 1.55;
}

.error-retry-btn {
  color: #fff;
  cursor: pointer;
  background: #5a4bda;
  border: none;
  border-radius: 10px;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.75rem;
  font-size: .95rem;
  font-weight: 600;
  transition: background .2s, transform .2s, box-shadow .2s;
  display: inline-flex;
  box-shadow: 0 4px 14px #5a4bda66;
}

.error-retry-btn:hover {
  background: #493ac3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #5a4bda8c;
}

.error-retry-btn:active {
  transform: translateY(0);
}

.double-tap-zones {
  z-index: 50;
  pointer-events: auto;
  display: flex;
  position: absolute;
  inset: 0;
}

.tap-zone {
  pointer-events: auto;
  justify-content: center;
  align-items: center;
  transition: background .15s;
  display: flex;
}

.tap-zone-left {
  border-radius: 0 50% 50% 0;
  width: 35%;
}

.tap-zone-center {
  width: 30%;
}

.tap-zone-right {
  border-radius: 50% 0 0 50%;
  width: 35%;
}

.tap-zone.active {
  background: #ffffff1f;
  animation: .5s ease-out tap-zone-pulse;
}

@keyframes tap-zone-pulse {
  0% { background: #ffffff40; }
  to { background: #ffffff14; }
}

.mobile-action-bar,
.mobile-content-area,
.mobile-lecture-info {
  display: none;
}

@media (width <= 768px) {
  .secure-player-header {
    padding-left: max(.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(.75rem, env(safe-area-inset-right, 0px));
    height: calc(52px + env(safe-area-inset-top, 0px));
  }

  .header-left-group {
    gap: .5rem;
    max-width: calc(100% - 48px);
  }

  .header-video-title {
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    display: block !important;
  }

  .player-back-btn,
  .header-tool-btn {
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    display: flex;
    padding: 0 !important;
  }

  .player-back-btn svg,
  .header-tool-btn svg {
    width: 24px;
    height: 24px;
  }

  .secure-player-controls {
    padding: 0 0 max(6px, env(safe-area-inset-bottom, 0px)) 0;
    background: linear-gradient(#0000 0%, #0000008c 45%, #000000eb 100%);
    justify-content: flex-end;
    gap: 0;
    height: auto;
    top: auto;
  }

  .controls-buttons-row {
    order: 1;
    margin-bottom: .5rem;
    padding: 0 .75rem;
  }

  .secure-player-controls .progress-bar-container {
    order: 2;
    height: 24px;
    margin-top: 0;
    margin-bottom: .75rem;
    padding: 0 .75rem;
  }

  .progress-bar-handle,
  .volume-slider,
  .volume-control-wrapper,
  .pip-btn {
    display: none !important;
  }

  .left-controls-group,
  .right-controls-group {
    gap: .35rem;
  }

  .controls-buttons-row {
    align-items: center;
    min-height: 36px;
  }

  .left-controls-group {
    flex: 1;
    min-width: 0;
  }

  .right-controls-group {
    flex-shrink: 0;
  }

  .control-action-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .control-action-btn svg {
    width: 24px;
    height: 24px;
  }

  .controls-time-display {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    font-size: .78rem;
  }

  .speed-indicator-badge {
    margin-left: 4px;
    padding: 2px 6px;
    font-size: .65rem;
  }

  .progress-bar-track {
    height: 4px;
  }

  .progress-bar-handle {
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%) scale(1);
  }

  .touch-device .progress-bar-container:active .progress-bar-track {
    height: 5px;
  }

  .play-pause-btn,
  .skip-btn {
    display: none !important;
  }

  .center-controls-row {
    gap: 2rem;
  }

  .center-control-btn {
    width: 52px;
    height: 52px;
    display: flex !important;
  }

  .center-control-btn svg {
    width: 32px;
    height: 32px;
  }

  .center-play-btn {
    width: 72px;
    height: 72px;
  }

  .center-play-btn svg {
    width: 60px;
    height: 60px;
  }

  .mobile-action-bar {
    z-index: 99;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    padding: 10px 12px 8px;
    box-shadow: 0 1px 3px #0000000f;
    flex: none !important;
    display: flex !important;
  }

  .mobile-action-btn {
    color: #6b7280;
    cursor: pointer;
    background: 0 0;
    border: none;
    border-radius: 12px;
    outline: none;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 76px;
    padding: 4px 2px 8px;
    transition: color .18s;
    display: flex;
    position: relative;
  }

  .mobile-action-btn:active {
    background: 0 0;
  }

  .mobile-action-btn .btn-icon-wrap {
    color: #4b5563;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
    display: flex;
  }

  .mobile-action-btn .btn-icon-wrap svg {
    width: 24px;
    height: 24px;
  }

  .mobile-action-btn:active .btn-icon-wrap {
    transform: scale(.94);
  }

  .mobile-action-btn .btn-label {
    color: #6b7280;
    letter-spacing: .01em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.15;
    transition: color .18s;
    overflow: hidden;
  }

  .mobile-action-btn.active .btn-icon-wrap {
    color: #5a4bda;
    background: linear-gradient(145deg, #5a4bda2e 0%, #5a4bda14 100%);
    border-color: #5a4bda59;
    box-shadow: 0 2px 8px #5a4bda24;
  }

  .mobile-action-btn.active .btn-label {
    color: #5a4bda;
    font-weight: 700;
  }

  .mobile-content-area {
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    overflow-y: auto !important;
  }

  .mobile-lecture-info {
    background: #fff;
    flex-direction: column;
    flex: 1;
    gap: .75rem;
    padding: 1.25rem 1.25rem 2rem;
    display: flex;
  }

  .mobile-lecture-title {
    color: #111827;
    word-break: break-word;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
  }

  .mobile-lecture-hint {
    color: #9ca3af;
    margin: .5rem 0 0;
    font-size: .82rem;
    line-height: 1.5;
  }

  .secure-player-controls .slides-btn,
  .secure-player-controls .pip-btn {
    display: none !important;
  }
}

@media (width <= 380px) {
  .mobile-action-bar {
    gap: 2px;
    padding: 8px 8px 6px;
  }

  .mobile-action-btn .btn-icon-wrap {
    width: 40px;
    height: 40px;
  }

  .mobile-action-btn .btn-icon-wrap svg {
    width: 20px;
    height: 20px;
  }

  .mobile-action-btn .btn-label {
    font-size: .62rem;
  }

  .controls-time-display .time-duration,
  .controls-time-display .time-separator {
    display: none;
  }
}

@media (width <= 768px) and (orientation: landscape) {
  .player-main-workspace {
    flex-direction: row !important;
  }

  .player-video-section {
    min-width: 0;
    aspect-ratio: unset !important;
    flex: 1 !important;
    height: 100% !important;
    max-height: none !important;
  }

  .mobile-action-bar,
  .mobile-content-area {
    display: none !important;
  }

  .secure-player-controls .slides-btn,
  .secure-player-controls .pip-btn {
    display: flex !important;
  }
}

@media (width >= 769px) {
  .player-main-workspace {
    flex-direction: row;
  }

  .player-video-section {
    flex: 1;
    min-width: 0;
    height: 100%;
  }

  .secure-player-header {
    background: linear-gradient(#000000b8 0%, #0000 100%);
    height: 64px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .header-video-title {
    letter-spacing: .01em;
    font-size: 1rem;
    font-weight: 600;
  }

  .secure-player-controls {
    background: linear-gradient(#0000 0%, #00000073 30%, #000000eb 100%);
    padding: 0 0 .65rem;
  }

  .secure-player-controls .progress-bar-container {
    order: unset;
    height: 28px;
    margin-bottom: 2px;
    padding: 0 1.25rem;
  }

  .secure-player-controls .controls-buttons-row {
    order: unset;
    min-height: unset;
    margin-bottom: 0;
    padding: 0 1rem;
  }

  .progress-bar-track {
    height: 5px;
  }

  .progress-bar-container:hover .progress-bar-track {
    height: 7px;
  }

  .progress-bar-handle {
    border-width: 2px;
    width: 13px;
    height: 13px;
  }

  .left-controls-group,
  .right-controls-group {
    gap: .3rem;
  }

  .control-action-btn {
    width: 54px;
    min-width: 54px;
    height: 54px;
  }

  .control-action-btn svg,
  .settings-btn svg {
    width: 34px;
    height: 34px;
  }

  .controls-time-display {
    border-left: 1px solid #ffffff26;
    margin-left: 6px;
    padding-left: 8px;
    font-size: .84rem;
  }

  .speed-indicator-badge {
    margin-left: 8px;
    padding: 2px 6px;
    font-size: .68rem;
  }

  .volume-control-wrapper:hover .volume-slider,
  .volume-slider:hover {
    width: 80px;
  }

  .secure-player-controls .slides-btn,
  .secure-player-controls .pip-btn {
    display: flex !important;
  }

  .center-controls-row {
    gap: 0;
  }

  .center-play-btn svg {
    width: 56px;
    height: 56px;
  }

  .center-play-btn:hover {
    transform: scale(1.08);
  }
}

@media (width >= 1200px) {
  .secure-player-header {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .secure-player-controls .progress-bar-container,
  .secure-player-controls .controls-buttons-row {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}

.secure-player-controls,
.secure-player-header,
.player-center-overlay {
  z-index: 100;
}

.double-tap-zones {
  z-index: 45;
}

@media (width <= 768px) {
  .secure-player-page.fullscreen-mode {
    z-index: 9999;
    width: 100vw;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
  }

  .secure-player-page.fullscreen-mode .player-video-section {
    height: 100dvh !important;
  }

  .secure-player-page.fullscreen-mode video {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }

  .secure-player-page.fullscreen-mode .mobile-action-bar {
    display: none !important;
  }

  .secure-player-page.touch-device .control-action-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .secure-player-page.touch-device .progress-bar-container {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .secure-player-page.touch-device .progress-bar-track {
    height: 5px;
  }

  .secure-player-page.touch-device .progress-bar-handle {
    width: 16px;
    height: 16px;
    margin-top: -6px;
  }
}

/* Header Dropdown Menu */
.header-right-group {
  position: relative;
}

.header-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.header-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.header-dropdown-item svg {
  flex-shrink: 0;
}

/* Settings Dropdown Menu */
.settings-menu-wrapper {
  position: relative;
}

.settings-dropdown {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 0;
  min-width: 280px;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
  z-index: 1500;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 30, 0.5);
}

.settings-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.settings-back-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-content {
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
}

#settings-quality-menu,
#settings-speed-menu {
  display: none;
}

#settings-quality-menu.active,
#settings-speed-menu.active {
  display: block;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  color: #fff;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-item-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-item-icon svg {
  color: var(--color-lavender-whisper);
}

.settings-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-item-label {
  font-size: 14px;
  font-weight: 500;
}

.settings-item-value {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.settings-item-arrow {
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}

.settings-item:hover .settings-item-arrow {
  color: rgba(255, 255, 255, 0.8);
  transform: translateX(-2px);
}

.settings-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  color: #fff;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.settings-option-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.settings-option-item.active {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
}

.settings-option-item.active .settings-checkmark {
  opacity: 1;
}

.settings-checkmark {
  width: 18px;
  height: 18px;
  background: var(--color-midnight-ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.settings-checkmark::after {
  content: '✓';
  color: var(--color-lavender-whisper);
  font-size: 10px;
  font-weight: bold;
}

/* Slides Sidebar */
.slides-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.slides-modal.open {
  transform: translateX(0);
}

.slides-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(30, 30, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.slides-modal-header h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.slides-close-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.slides-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.slides-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slide-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  width: 100%;
}

.slide-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}

.slide-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  min-height: 180px;
}

.slide-info {
  padding: 12px 16px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slide-number {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

.slide-timestamp {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-lavender-whisper);
}

.slides-loading {
  color: #fff;
  text-align: center;
  padding: 48px 20px;
  font-size: 14px;
}

/* Video player adjustment when sidebar is open */
.player-main-workspace.slides-open {
  margin-right: 400px;
  transition: margin-right 0.3s ease;
  max-width: calc(100% - 400px);
}

.player-main-workspace.attachments-open {
  margin-right: 400px;
  transition: margin-right 0.3s ease;
  max-width: calc(100% - 400px);
}

/* Attachments Sidebar */
.attachments-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: rgba(20, 20, 20, 0.98);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  visibility: hidden;
}

.attachments-modal.open {
  transform: translateX(0);
  visibility: visible;
}

.attachments-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(30, 30, 30, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.attachments-modal-header h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.attachments-close-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.attachments-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.attachments-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attachment-section {
  margin-bottom: 16px;
}

.attachment-section-title {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.attachment-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 14px;
}

.attachment-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.attachment-icon {
  width: 48px;
  height: 48px;
  background: var(--color-lavender-whisper);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attachment-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-midnight-ink);
}

.attachment-info {
  flex: 1;
  min-width: 0;
}

.attachment-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.attachment-type {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.attachments-loading {
  color: #fff;
  text-align: center;
  padding: 48px 20px;
  font-size: 14px;
}

.no-attachments {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 48px 20px;
  font-size: 14px;
}

/* Video player adjustment when attachments sidebar is open */
.player-main-workspace.attachments-open {
  margin-right: 400px;
  transition: margin-right 0.3s ease;
}

@media (max-width: 768px) {
  .slides-modal {
    width: 320px;
  }
  
  .player-main-workspace.slides-open {
    margin-right: 320px;
  }
  
  .attachments-modal {
    width: 320px;
  }
  
  .player-main-workspace.attachments-open {
    margin-right: 320px;
  }
}

/* Live Class Actions (Today page) */
.live-class-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.live-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  background: var(--color-white);
  color: var(--color-midnight-ink);
  cursor: pointer;
  transition: none;
  box-shadow: var(--shadow-subtle-3);
}

.live-action-btn:hover {
  border-color: var(--color-midnight-ink);
  color: var(--color-midnight-ink);
  background: var(--color-white);
  box-shadow: var(--shadow-subtle);
}

.watch-recording-btn {
  background: var(--color-lavender-whisper);
  border-color: var(--color-midnight-ink);
  color: var(--color-midnight-ink);
}

/* Live Classes Container (Today page) */
.live-classes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.live-classes-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111827;
}

.live-classes-header p {
  font-size: 0.9rem;
  color: #6b7280;
}

.daily-schedule-badge {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: none;
}

.live-classes-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.live-class-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  overflow: hidden;
  transition: none;
  box-shadow: var(--shadow-subtle);
}

.live-class-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
}

.live-class-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f3f4f6;
}

.live-class-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--color-midnight-ink);
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: none;
}

.live-badge-live {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
}

.live-badge-upcoming {
  background: var(--color-buttercream);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
}

.live-badge-ended {
  background: var(--color-fog);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
}

.live-class-body {
  padding: 14px 16px 16px;
}

.live-class-subject {
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  display: inline-block;
  box-shadow: none;
}

.live-class-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 6px;
}

.live-class-tag {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-midnight-ink);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  margin-bottom: 8px;
  border: 1px solid var(--color-midnight-ink);
  box-shadow: none;
}

.live-class-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 6px;
}

.live-class-type {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: none;
}

.live-class-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #6b7280;
}

.countdown-label {
  font-weight: 500;
}

.countdown-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

/* Load more button */
.load-more-btn {
  display: block;
  margin: 32px auto 0;
  padding: 10px 18px;
  border: 1px solid var(--color-midnight-ink);
  border-radius: var(--radius-buttons);
  background: transparent;
  color: var(--color-midnight-ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: none;
  box-shadow: none;
}
.load-more-btn:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}
.load-more-btn:active {
  transform: none;
}

/* ============================================
   Footer
   ============================================ */
#site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--color-stone-mist);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-weight: var(--font-weight-semibold);
  font-size: 16px;
  color: var(--color-midnight-ink);
}
.footer-copy {
  font-size: 14px;
  color: var(--color-graphite-veil);
}

/* ============================================
   Responsive — PC & TV focus
   ============================================ */

/* Large TV / 4K */
@media (min-width: 2000px) {
  .container { max-width: 1600px; }
  .batch-grid { column-count: 5; }
  .hero-left h1 { font-size: 4rem; }
}

/* Standard desktop */
@media (min-width: 1400px) and (max-width: 1999px) {
  .batch-grid { column-count: 4; }
}

/* Smaller desktop / laptop */
@media (min-width: 1024px) and (max-width: 1399px) {
  .batch-grid { column-count: 3; }
  .hero-inner { gap: 40px; }
  .container { padding: 0 24px; }
}

/* Tablet (show mobile gate) */
@media (max-width: 1023px) {
  /* Gate is shown, content hidden */
}

/* Fade-in animation for cards */
.batch-card {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.45s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.batch-card:nth-child(1) { animation-delay: 0.02s; }
.batch-card:nth-child(2) { animation-delay: 0.06s; }
.batch-card:nth-child(3) { animation-delay: 0.10s; }
.batch-card:nth-child(4) { animation-delay: 0.14s; }
.batch-card:nth-child(5) { animation-delay: 0.18s; }
.batch-card:nth-child(6) { animation-delay: 0.22s; }
.batch-card:nth-child(7) { animation-delay: 0.26s; }
.batch-card:nth-child(8) { animation-delay: 0.30s; }
.batch-card:nth-child(9) { animation-delay: 0.34s; }
.batch-card:nth-child(10) { animation-delay: 0.38s; }
.batch-card:nth-child(11) { animation-delay: 0.42s; }
.batch-card:nth-child(12) { animation-delay: 0.46s; }

/* ============================================
   Today's Classes Page
   ============================================ */

/* Live Classes Header */
.live-classes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.live-classes-header h2 {
  font-size: 22px;
  color: #111827;
  margin: 0 0 4px 0;
  line-height: 1.2;
}

.live-classes-header p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.daily-schedule-badge {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 500;
}

/* Live Classes Row */
.live-classes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px 0;
}

/* Live Class Card */
.live-class-card {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ececec;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.live-class-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

/* Live Class Thumbnail */
.live-class-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-class-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 20px;
}

/* Live Badge */
.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.3px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

.live-badge-live {
  background: #22c55e;
  color: #fff;
}

.live-badge-upcoming {
  background: #facc15;
  color: #111827;
}

.live-badge-ended {
  background: #6b7280;
  color: #fff;
}

.live-class-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Live Class Body */
.live-class-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-class-subject {
  font-size: var(--text-body-sm);
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: none;
}

.live-class-title {
  font-size: 17px;
  color: #111827;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
  font-weight: 500;
}

.live-class-tag {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-class-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.live-class-type {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #374151;
  font-weight: 500;
}

/* Countdown Timer */
.live-class-countdown {
  margin-top: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.countdown-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.countdown-time {
  font-size: 13px;
  color: #fff;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Responsive for Today's Classes */
@media (max-width: 1023px) {
  .live-classes-header,
  .live-classes-row {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .live-classes-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1400px) and (max-width: 1799px) {
  .live-classes-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1800px) {
  .live-classes-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* ============================================
   Topic Details Page
   ============================================ */

/* Topic Name */
.topic-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 24px 0 20px;
}

/* Topic Tabs */
.topic-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-midnight-ink);
  padding-bottom: 0;
  overflow-x: auto;
}

.topic-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  border-bottom: none;
  cursor: pointer;
  border-radius: var(--radius-buttons) var(--radius-buttons) 0 0;
  white-space: nowrap;
  box-shadow: var(--shadow-subtle-3);
  transition: all 0.2s ease;
}

.topic-tab:hover {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}

.topic-tab.active {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-bold);
  border-color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}

/* Content Container */
.content-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* Lecture Card */
.lecture-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  overflow: hidden;
  border: 1px solid var(--color-midnight-ink);
  cursor: default;
  transition: none;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
}

.lecture-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
  border-color: var(--color-midnight-ink);
}

.lecture-card.completed-lecture {
  border: 2px solid #22c55e;
}

.lecture-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f3f4f6;
  cursor: pointer;
}

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

.lecture-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
  pointer-events: none;
}

.lecture-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.lecture-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lecture-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.lecture-date {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.lecture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.lecture-footer-left,
.lecture-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lecture-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: #6b7280;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lecture-icon-btn:hover {
  background: var(--color-fog);
  color: var(--color-midnight-ink);
}

.lecture-complete-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #22c55e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* Three Dots Context Menu */
.three-dots-menu {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 4px;
  min-width: 180px;
  animation: fadeIn 0.15s ease;
}

.three-dots-menu .menu-item {
  width: 100%;
  background: none;
  border: none;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  transition: background 0.15s;
}

.three-dots-menu .menu-item:hover {
  background: #f3f4f6;
}

.three-dots-menu .menu-item-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.three-dots-menu .menu-item-danger {
  color: #ef4444;
}

.three-dots-menu .menu-item-danger:hover {
  background: #fef2f2;
}

/* Note Card */
.note-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  overflow: hidden;
  border: 1px solid var(--color-midnight-ink);
  cursor: default;
  transition: none;
  box-shadow: var(--shadow-subtle);
}

.note-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
  border-color: var(--color-midnight-ink);
}

.note-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
}

.note-card-left {
  flex-shrink: 0;
}

.note-pdf-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.note-card-body {
  flex: 1;
  min-width: 0;
}

.note-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.note-type {
  font-size: 0.8rem;
  color: var(--accent, #6C5CE7);
  font-weight: 500;
  margin-bottom: 4px;
}

.note-date {
  font-size: 0.78rem;
  color: #6b7280;
}

.note-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.note-status.completed {
  background: #dcfce7;
  color: #166534;
}

.note-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.note-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.note-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.note-action-btn:hover {
  background: var(--color-fog);
  color: var(--color-midnight-ink);
}

/* Attachments Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  padding: 28px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
  box-shadow: var(--shadow-subtle-2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-buttons);
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-graphite-veil);
  line-height: 1;
  padding: 8px 12px;
  transition: none;
  box-shadow: var(--shadow-subtle-3);
}

.modal-close:hover { color: var(--color-midnight-ink); box-shadow: var(--shadow-subtle); }

.modal-title {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: 20px;
  padding-right: 32px;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle-3);
}

.attachment-pdf-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.attachment-info {
  flex: 1;
  min-width: 0;
}

.attachment-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-note {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 2px;
}

.attachment-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.attachment-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.attachment-view-btn {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  box-shadow: var(--shadow-subtle-3);
}

.attachment-view-btn:hover {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}

.attachment-dl-btn {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  box-shadow: var(--shadow-subtle-3);
}

.attachment-dl-btn:hover {
  background: var(--color-lavender-whisper);
  box-shadow: var(--shadow-subtle);
}

.attachment-btn img {
  width: 16px;
  height: 16px;
}

/* Congratulations Toast */
.congrats-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 10001;
  opacity: 0;
  transition: all 0.3s ease;
}

.congrats-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.congrats-toast-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  border-radius: var(--radius-cards);
  padding: 14px 20px;
  box-shadow: var(--shadow-subtle-2);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  white-space: normal;
  word-break: break-word;
  max-width: 480px;
  line-height: 1.4;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive for Topic Details */
@media (max-width: 1023px) {
  .topic-tabs,
  .content-container {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .content-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1400px) and (max-width: 1799px) {
  .content-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1800px) {
  .content-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* ============================================
   My Batches Page
   ============================================ */
.page-hero {
  padding: 56px 0 40px;
  background: var(--color-cream-paper);
}
.page-hero h1 {
  font-family: var(--font-eb-garamond);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.05em;
  color: var(--color-midnight-ink);
}
.page-hero p {
  color: var(--color-graphite-veil);
  margin-top: 8px;
  font-size: 16px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  margin-bottom: 20px;
  transition: gap 0.2s;
}
.back-link:hover { gap: 10px; }

/* My batches grid (Pinterest-style masonry) */
.my-batches-grid {
  column-count: 4;
  column-gap: var(--gap-lg);
  padding: 48px 0 96px;
}
.my-batch-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  transition: none;
  break-inside: avoid;
  margin-bottom: var(--gap-lg);
}
.my-batch-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: none;
}
.my-batch-card .batch-card-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.my-batch-card .batch-card-body { padding: 20px; }
.my-batch-card .batch-card-name {
  font-size: 1.05rem;
  margin-bottom: 8px;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 24px;
  margin-top: 16px;
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.btn-continue:hover { background: var(--color-lavender-whisper); transform: none; box-shadow: var(--shadow-subtle); }
.btn-unenroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 24px;
  margin-top: 8px;
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  background: var(--color-white);
  color: var(--color-steel);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.btn-unenroll:hover { background: var(--color-white); color: #D32F2F; border-color: var(--color-midnight-ink); box-shadow: var(--shadow-subtle); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 0;
}
.empty-state-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 24px; }

/* ============================================
   Batch Details Page
   ============================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 56px 0 96px;
  align-items: start;
}
.detail-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}
.detail-info h1 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.detail-byname {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 24px;
}
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.detail-meta-item svg { color: var(--muted); flex-shrink: 0; }
.detail-meta-label { color: var(--muted); min-width: 90px; }
.detail-meta-value { font-weight: 600; }
.detail-price-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.detail-price-original {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
}
.detail-price-free {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 5px 18px;
  border-radius: 999px;
}
.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.detail-actions .btn-enroll,
.detail-actions .btn-explore,
.detail-actions .btn-join-live,
.detail-actions .btn-announcements,
.detail-actions .btn-share {
  padding: 14px 28px;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
}

/* Enrolled state button (link style) */
.btn-enrolled {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: #E8F5E9;
  color: #2E7D32;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-enrolled:hover {
  background: #C8E6C9;
}

/* Announcements button */
.btn-announcements {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-midnight-ink);
  background: var(--color-white);
  color: var(--color-midnight-ink);
  cursor: pointer;
  border-radius: 100px;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.btn-announcements:hover {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}

/* Share on WhatsApp button */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-midnight-ink);
  background: var(--color-white);
  color: var(--color-midnight-ink);
  cursor: pointer;
  border-radius: 100px;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.btn-share:hover {
  background: var(--color-white);
  border-color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}
.btn-share svg {
  flex-shrink: 0;
}

/* Join Live button */
.btn-join-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  cursor: pointer;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.btn-join-live:hover {
  background: var(--color-lavender-whisper);
  transform: none;
  box-shadow: var(--shadow-subtle);
}
@media (max-width: 1023px) {
  .my-batches-grid, .detail-layout, .page-hero { display: none; }
}
@media (min-width: 1024px) and (max-width: 1399px) {
  .detail-layout { gap: 32px; }
  .my-batches-grid { column-count: 3; }
}
@media (min-width: 1400px) and (max-width: 1799px) {
  .my-batches-grid { column-count: 4; }
}
@media (min-width: 1800px) {
  .my-batches-grid { column-count: 5; }
}

/* ============================================
   Batch Details Tabs
   ============================================ */
.tabs-section {
  margin-top: 48px;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}
.tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--color-midnight-ink);
  padding-bottom: 16px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 20px;
  border: 1px solid var(--color-midnight-ink);
  background: var(--color-white);
  color: var(--color-steel);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  border-radius: 100px;
  transition: none;
  white-space: nowrap;
  box-shadow: var(--shadow-subtle-3);
}
.tab-btn:hover {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}
.tab-btn.active {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-subtle);
}
.tabs-content {
  min-height: 200px;
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Description Tab */
.description-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--fg);
}
.description-content p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
/* Override injected HTML description styles */
.description-content .description-meta-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.description-content .child-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.description-content .child-container .icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.description-content .child-container .text-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.description-content .sub-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.description-content .main-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.5;
}
.description-content .text {
  font-size: 0.85rem;
  color: var(--muted);
}
.full-description {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.full-description h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.full-description div {
  color: var(--muted);
  line-height: 1.7;
}

/* Subjects Grid */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* Lavender subject card */
.subject-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-lilac-mist);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.subject-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
}

/* Icon wrapper — square with soft purple bg */
.subject-icon-wrap {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: var(--radius-xl);
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-subtle-3);
}
.subject-icon-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* Text area */
.subject-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.subject-name {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subject-chapters {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  font-weight: var(--font-weight-medium);
}

/* ── Header Logo Image ───────────────────────────── */
.header-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ── Announcements Grid ──────────────────────────── */
.ann-grid {
  column-count: 3;
  column-gap: 20px;
  padding-bottom: 60px;
}
@media (min-width: 2000px) {
  .ann-grid { column-count: 4; }
}
@media (max-width: 1399px) {
  .ann-grid { column-count: 2; }
}

/* ── Announcement Card ───────────────────────────── */
.ann-card {
  break-inside: avoid;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  padding: 24px;
  margin-bottom: 20px;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.ann-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
}

/* Card header — author */
.ann-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ann-author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid var(--color-midnight-ink);
}
.ann-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ann-author-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}
.ann-author-time {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Heading */
.ann-card-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Use-case tag */
.ann-usecase-tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  background: var(--color-white);
  border-radius: 100px;
  margin-bottom: 12px;
  border: 1px solid var(--color-midnight-ink);
  box-shadow: none;
}

/* Card body — parsed HTML */
.ann-card-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
  word-break: break-word;
}
.ann-card-body a {
  color: var(--color-midnight-ink);
  text-decoration: underline;
}
.ann-card-body a:hover {
  color: var(--color-midnight-ink);
}

/* Media / attachment */
.ann-card-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.ann-card-media img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 400px;
  border: 1px solid var(--color-midnight-ink);
}

/* Footer — date */
.ann-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ann-card-date {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Skeleton for ann card */
.ann-card.skeleton {
  padding: 24px;
}
.ann-card.skeleton .skel-img {
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 16px;
  animation: shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(110deg,var(--surface) 30%,#ececee 50%,var(--surface) 70%);
  background-size: 200% 100%;
}
.ann-card.skeleton .skel-line {
  height: 14px;
  border-radius: 6px;
  background: var(--surface);
  margin-bottom: 10px;
  animation: shimmer 1.4s ease-in-out infinite;
  background: linear-gradient(110deg,var(--surface) 30%,#ececee 50%,var(--surface) 70%);
  background-size: 200% 100%;
}
.ann-card.skeleton .skel-line.w80 { width: 80%; }
.ann-card.skeleton .skel-line.w60 { width: 60%; }
.ann-card.skeleton .skel-line.w40 { width: 40%; }

/* ── Image Modal ─────────────────────────────────── */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  cursor: pointer;
}
.image-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}
.image-modal-content img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle-2);
}
.image-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}
.image-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

/* Clickable images hint */
.ann-zoomable-img {
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.ann-zoomable-img:hover {
  opacity: 0.85;
}

/* ── Teachers Section ─────────────────────────────── */
.teachers-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.teachers-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--fg);
}
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* Teacher Card */
.teacher-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-lilac-mist);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  cursor: pointer;
  transition: none;
  box-shadow: var(--shadow-subtle);
}
.teacher-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
}
.teacher-card-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.teacher-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.teacher-card-name {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.teacher-card-slogan {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* ── Teacher Modal ───────────────────────────────── */
.teacher-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.teacher-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
}
.teacher-modal-content {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-cards-lg);
  border: 1px solid var(--color-midnight-ink);
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1;
  padding: 40px 32px;
  box-shadow: var(--shadow-subtle-2);
  animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.teacher-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-steel);
  transition: none;
  box-shadow: var(--shadow-subtle-3);
}
.teacher-modal-close:hover {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
}
.teacher-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.teacher-modal-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #E4DFFB;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(100,80,200,0.2);
}
.teacher-modal-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 6px;
}
.teacher-modal-subject {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
}
.teacher-modal-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 24px;
}
.teacher-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.teacher-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.teacher-detail-value {
  font-size: 0.95rem;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.5;
}

/* ── Topics Page ───────────────────────────────────── */
.topics-subheader {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  cursor: pointer;
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  border-radius: 100px;
  transition: none;
  box-shadow: var(--shadow-subtle);
}

.back-button:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-subtle);
}

.subject-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
}

.topics-content {
  padding-bottom: 60px;
}

.topics-wrapper {
  width: 100%;
}

.topics-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Topic Card */
.topic-card {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  padding: 20px 24px;
  border: 1px solid var(--color-midnight-ink);
  transition: none;
  cursor: pointer;
  animation: fadeInUp 0.4s ease backwards;
  box-shadow: var(--shadow-subtle);
}

.topic-card:hover {
  transform: none;
  box-shadow: var(--shadow-subtle-2);
  border-color: var(--color-midnight-ink);
}

.topic-card-left {
  width: 4px;
  height: 40px;
  background: var(--color-lavender-whisper);
  border-radius: 2px;
  margin-right: 20px;
  flex-shrink: 0;
}

.topic-card-content {
  flex: 1;
  min-width: 0;
}

.topic-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  line-height: 1.4;
}

.topic-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.topic-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topic-meta-divider {
  width: 1px;
  height: 12px;
  background: var(--color-graphite);
}

/* ── Loading & Error States ──────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}
.loading-state .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-stone-mist);
  border-top-color: var(--color-lavender-whisper);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-state p {
  font-size: 16px;
  color: var(--color-graphite-veil);
}
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 12px;
  text-align: center;
  color: var(--muted);
}
.error-state svg {
  color: #FF3B30;
  margin-bottom: 8px;
}
.error-state h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
}
.error-state p {
  font-size: 0.9rem;
  color: var(--muted);
}
.error-state .btn-enroll {
  margin-top: 12px;
  padding: 10px 28px;
}
