/* ============================================
   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;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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);
}

/* Flex utilities */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.mb-4 {
  margin-bottom: var(--spacing-16);
}

/* ============================================
   Mobile Gate - REMOVED for full mobile support
   ============================================ */

/* ============================================
   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: background-color 0.2s ease, transform 0.2s ease;
  border: none;
  box-shadow: none;
}

.header-nav-link:hover {
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
  box-shadow: none;
}

.header-nav-link:active {
  transform: scale(0.98);
}

.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: all 0.2s ease;
}

.hero-cta:hover {
  background: var(--color-lavender-whisper);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle-2);
}

.hero-cta:active {
  transform: translateY(0);
}

/* 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: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.batch-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(-2px);
}

/* 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: all 0.2s ease;
}

.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: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.btn-enroll:active {
  transform: translateY(0);
}

.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: var(--color-stone-mist);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-explore:active {
  transform: translateY(0);
}

/* 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;
}

/* ============================================
   Today's Classes - Modern Card Design
   ============================================ */

.page-hero {
  padding: var(--spacing-40) 0 var(--spacing-24);
}

@media (max-width: 639px) {
  .page-hero {
    padding: var(--spacing-24) 0 var(--spacing-16);
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-midnight-ink);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
  margin-bottom: var(--spacing-16);
}

.back-link:hover {
  background: var(--color-stone-mist);
  transform: translateY(-1px);
}

.page-hero h1 {
  font-family: var(--font-eb-garamond);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-regular);
  color: var(--color-midnight-ink);
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--color-graphite-veil);
  font-size: 16px;
}

/* Live Classes Grid */
.live-classes-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-16);
}

@media (min-width: 640px) {
  .live-classes-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-24);
  }
}

@media (min-width: 1024px) {
  .live-classes-row {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-24);
  }
}

/* Modern Class Card */
.live-class-card {
  background: var(--color-white);
  border-radius: var(--radius-3xl);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-class-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(-4px);
}

.live-class-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-stone-mist);
  overflow: hidden;
}

.live-class-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.live-class-card:hover .live-class-thumb img {
  transform: scale(1.05);
}

/* Status Badges */
.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

@media (max-width: 639px) {
  .live-badge {
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    font-size: 11px;
  }

  .live-class-duration {
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    padding: 3px 6px;
  }
}

.live-badge-live {
  background: #d1fae5;
  color: #059669;
}

.live-badge-upcoming {
  background: #fef3c7;
  color: #d97706;
}

.live-badge-ended {
  background: #e5e7eb;
  color: #4b5563;
}

.live-class-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  backdrop-filter: blur(4px);
}

/* Card Body */
.live-class-body {
  padding: var(--spacing-20);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.live-class-subject {
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-deep-forest-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-class-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-class-tag {
  font-size: 13px;
  color: var(--color-graphite-veil);
  background: var(--color-stone-mist);
  padding: 4px 10px;
  border-radius: var(--radius-smallbadges);
  display: inline-block;
}

.live-class-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--color-graphite-veil);
}

.live-class-type {
  background: var(--color-lavender-whisper);
  padding: 4px 10px;
  border-radius: var(--radius-smallbadges);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
}

/* Countdown Timer */
.live-class-countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.countdown-label {
  font-size: 12px;
  color: var(--color-graphite-veil);
  font-weight: var(--font-weight-medium);
}

.countdown-time {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-deep-forest-teal);
  font-variant-numeric: tabular-nums;
}

/* Action Buttons */
.live-class-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.live-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-buttons);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

/* Mobile responsive adjustments */
@media (max-width: 639px) {
  .live-class-body {
    padding: var(--spacing-16);
  }

  .live-class-title {
    font-size: 16px;
  }

  .live-class-subject {
    font-size: 11px;
  }

  .live-class-meta {
    font-size: 12px;
  }

  .live-action-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .page-hero h1 {
    font-size: 1.75rem;
  }

  .back-link {
    font-size: 13px;
    padding: 6px 12px;
  }

  .live-class-countdown {
    padding: 8px 12px;
  }

  .countdown-time {
    font-size: 13px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .live-class-body {
    padding: 18px;
  }

  .live-class-title {
    font-size: 17px;
  }
}

.live-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.join-live-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.join-live-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.watch-recording-btn {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
}

.watch-recording-btn:hover:not(:disabled) {
  background: var(--color-stone-mist);
  transform: translateY(-1px);
}

.view-pdf-btn,
.download-pdf-btn {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle);
}

.view-pdf-btn:hover:not(:disabled),
.download-pdf-btn:hover:not(:disabled) {
  background: var(--color-stone-mist);
  transform: translateY(-1px);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-64) var(--spacing-24);
  gap: var(--spacing-16);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-stone-mist);
  border-top-color: var(--color-deep-forest-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state p {
  color: var(--color-graphite-veil);
  font-size: 16px;
}

/* Error State */
.error-state {
  text-align: center;
  padding: var(--spacing-64) var(--spacing-24);
  color: var(--color-graphite-veil);
}

.error-state svg {
  color: var(--color-graphite-veil);
  margin-bottom: var(--spacing-16);
}

.error-state h3 {
  font-size: 20px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: 8px;
}

.error-state p {
  margin-bottom: var(--spacing-24);
}

/* Live Classes Header */
.live-classes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-24);
  flex-wrap: wrap;
  gap: var(--spacing-16);
}

.live-classes-header h2 {
  font-family: var(--font-eb-garamond);
  font-size: 32px;
  font-weight: var(--font-weight-regular);
  color: var(--color-midnight-ink);
}

.live-classes-header p {
  color: var(--color-graphite-veil);
  font-size: 14px;
  margin-top: 4px;
}

.daily-schedule-badge {
  background: linear-gradient(135deg, var(--color-lavender-whisper) 0%, #e0c0f0 100%);
  color: var(--color-midnight-ink);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--color-midnight-ink);
}

/* ============================================
   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.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-subtle-2);
}

.stat-card:active {
  transform: translateY(-2px);
}

.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: contain;
  object-position: top center;
}

.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.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-tab:hover {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: var(--shadow-subtle);
  transform: translateY(-1px);
}

.topic-tab:active {
  transform: translateY(0);
}

.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: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
}

.lecture-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle-2);
  border-color: var(--color-midnight-ink);
}

.lecture-card:active {
  transform: translateY(0);
}

.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: contain;
  object-position: center;
  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 Completion Checkbox */
.lecture-complete-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.lecture-complete-checkbox:hover {
  background: var(--color-stone-mist);
}

.lecture-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid var(--color-graphite-veil);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-custom::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.lecture-checkbox-input:checked~.checkbox-custom {
  background-color: #22c55e;
  border-color: #22c55e;
}

.lecture-checkbox-input:checked~.checkbox-custom::after {
  transform: rotate(45deg) scale(1);
}

.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;
}

/* 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: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  box-shadow: var(--shadow-subtle);
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle-2);
  border-color: var(--color-midnight-ink);
}

.note-card:active {
  transform: translateY(0);
}

.note-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.note-card-left {
  flex-shrink: 0;
}

.note-pdf-icon {
  width: 36px;
  height: 36px;
  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: 2px;
}

.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: 32px;
  height: 32px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  color: #6b7280;
  transition: all 0.2s;
}

.note-action-btn:hover {
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
}

/* DPP Quiz Card */
.dpp-quiz-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-midnight-ink);
  overflow: hidden;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  box-shadow: var(--shadow-subtle);
}

.dpp-quiz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle-2);
}

.dpp-quiz-card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 16px 10px;
}

.dpp-quiz-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #6366f1;
}

.dpp-quiz-info {
  flex: 1;
  min-width: 0;
}

.dpp-quiz-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: 6px;
}

.dpp-quiz-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.dpp-quiz-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7280;
}

.dpp-quiz-meta-item svg {
  flex-shrink: 0;
  color: #9ca3af;
}

.dpp-quiz-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  gap: 12px;
}

.dpp-quiz-date {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}

.dpp-quiz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.dpp-quiz-btn:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.dpp-quiz-btn:active {
  transform: translateY(0);
}

.dpp-quiz-btn-resume {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.dpp-quiz-btn-resume:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.dpp-quiz-btn-result {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.dpp-quiz-btn-result:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

@media (max-width: 480px) {
  .dpp-quiz-card-top {
    gap: 10px;
    padding: 14px 14px 8px;
  }
  .dpp-quiz-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
  }
  .dpp-quiz-icon svg {
    width: 18px;
    height: 18px;
  }
  .dpp-quiz-title {
    font-size: 0.85rem;
  }
  .dpp-quiz-meta {
    gap: 8px;
  }
  .dpp-quiz-meta-item {
    font-size: 0.72rem;
  }
  .dpp-quiz-card-bottom {
    padding: 8px 14px 12px;
  }
  .dpp-quiz-btn {
    padding: 6px 14px;
    font-size: 0.78rem;
  }
}

/* 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: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.congrats-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.congrats-toast-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-midnight-ink);
  border-radius: var(--radius-cards);
  padding: 16px 24px;
  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;
  overflow-wrap: break-word;
  max-width: 90vw;
  width: auto;
  line-height: 1.5;
}

@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 (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: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.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;
  }
}

@media (max-width: 767px) {
  .ann-grid {
    column-count: 1;
  }
}

/* ── 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: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.teacher-card-slogan {
  font-size: var(--text-body-sm);
  color: var(--color-steel);
  font-weight: var(--font-weight-medium);
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  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;
}

/* ============================================
   Page Components Styles
   ============================================ */

/* Page Hero */
.page-hero {
  padding: 48px 0 32px;
}

.page-hero h1 {
  font-family: var(--font-eb-garamond);
  font-size: 48px;
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.07em;
  color: var(--color-midnight-ink);
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--color-graphite-veil);
  font-size: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-midnight-ink);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  margin-bottom: 16px;
  transition: none;
}

.back-link:hover {
  color: var(--color-midnight-ink);
}

/* Topic Cards */
.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;
  box-shadow: var(--shadow-subtle);
}

.topic-card:hover {
  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(--color-midnight-ink);
  margin-bottom: 8px;
  line-height: 1.4;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.topic-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--color-graphite-veil);
  flex-wrap: wrap;
}

.topic-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topic-meta-divider {
  width: 1px;
  height: 12px;
  background: var(--color-smoke);
}

/* Topic Tabs */
.topic-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-stone-mist);
  padding-bottom: 16px;
}

.topic-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-buttons);
  font-family: var(--font);
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-graphite-veil);
  cursor: pointer;
  transition: none;
}

.topic-tab.active {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-semibold);
}

.topic-tab:hover {
  background: var(--color-stone-mist);
}

/* Content Cards */
.content-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lecture-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  overflow: hidden;
  transition: none;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

.lecture-card:hover {
  box-shadow: var(--shadow-subtle-2);
}

.lecture-card.completed-lecture {
  border-color: var(--color-deep-forest-teal);
}

.lecture-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-stone-mist);
}

.lecture-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.lecture-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.lecture-complete-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--color-deep-forest-teal);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-smallbadges);
  font-size: 12px;
  font-weight: 600;
}

.lecture-body {
  padding: 16px;
}

.lecture-title {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: 8px;
  line-height: 1.4;
}

.lecture-date {
  font-size: 13px;
  color: var(--color-graphite-veil);
  margin-bottom: 12px;
}

.lecture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lecture-footer-left,
.lecture-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lecture-icon-btn {
  background: transparent;
  border: none;
  color: var(--color-graphite-veil);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: none;
}

.lecture-icon-btn:hover {
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
}

/* Note Cards */

.note-card-inner {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 16px;
}

.note-card-left {
  flex-shrink: 0;
}

.note-pdf-icon {
  width: 36px;
  height: 36px;
  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: 2px;
}

.note-type {
  font-size: 13px;
  color: var(--color-graphite-veil);
  margin-bottom: 4px;
}

.note-date {
  font-size: 0.78rem;
  color: #6b7280;
}

.note-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-smallbadges);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.note-status.live {
  background: #dcfce7;
  color: #166534;
}

.note-status.ended {
  background: var(--color-stone-mist);
  color: var(--color-smoke);
}

.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: 32px;
  height: 32px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  color: #6b7280;
  transition: all 0.2s;
}

.note-action-btn:hover {
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
}

/* Live Class Cards */
.live-classes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.daily-schedule-badge {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  padding: 6px 14px;
  border-radius: var(--radius-badges);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
}

.live-classes-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.live-class-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  overflow: hidden;
  transition: none;
  box-shadow: var(--shadow-subtle);
}

.live-class-card:hover {
  box-shadow: var(--shadow-subtle-2);
}

.live-class-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--color-stone-mist);
}

.live-class-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-smallbadges);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-badge-live {
  background: #dc2626;
  color: white;
}

.live-badge-upcoming {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
}

.live-badge-ended {
  background: var(--color-stone-mist);
  color: var(--color-smoke);
}

.live-class-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.live-class-body {
  padding: 16px;
}

.live-class-subject {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-deep-forest-teal);
  margin-bottom: 8px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.live-class-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  margin-bottom: 8px;
  line-height: 1.3;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.live-class-tag {
  display: inline-block;
  background: var(--color-stone-mist);
  color: var(--color-smoke);
  padding: 2px 8px;
  border-radius: var(--radius-smallbadges);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.live-class-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-graphite-veil);
  margin-bottom: 8px;
}

.live-class-type {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  padding: 2px 8px;
  border-radius: var(--radius-smallbadges);
  font-size: 11px;
  font-weight: 600;
}

.live-class-countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.countdown-label {
  color: var(--color-graphite-veil);
}

.countdown-time {
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
}

.live-class-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  border: 1px solid var(--color-midnight-ink);
  border-radius: var(--radius-buttons);
  font-family: var(--font);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: none;
}

.live-action-btn:hover {
  background: var(--color-lavender-whisper);
}

.live-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* My Batches Grid */
.my-batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.my-batch-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  overflow: hidden;
  transition: none;
  box-shadow: var(--shadow-subtle);
}

.my-batch-card:hover {
  box-shadow: var(--shadow-subtle-2);
}

.btn-continue {
  width: 100%;
  padding: 10px 16px;
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  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;
  margin-top: 12px;
}

.btn-continue:hover {
  background: var(--color-lavender-whisper);
}

.btn-unenroll {
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  color: var(--color-smoke);
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-buttons);
  font-family: var(--font);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: none;
  margin-top: 8px;
}

.btn-unenroll:hover {
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
}

/* Attachments Modal */
.attachments-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-title {
  padding: 20px 24px;
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-midnight-ink);
  border-bottom: 1px solid var(--color-stone-mist);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--color-graphite-veil);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background: var(--color-stone-mist);
}

.attachments-list {
  padding: 16px 24px;
  overflow-y: auto;
  flex: 1;
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-buttons);
  margin-bottom: 8px;
}

.attachment-pdf-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.attachment-info {
  flex: 1;
  min-width: 0;
}

.attachment-name {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: var(--color-midnight-ink);
  margin-bottom: 4px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.attachment-note {
  font-size: 12px;
  color: var(--color-graphite-veil);
}

.attachment-actions {
  display: flex;
  gap: 8px;
}

.attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
  border: none;
  border-radius: var(--radius-smallbadges);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: none;
}

.attachment-btn:hover {
  background: var(--color-graphite-veil);
  color: var(--color-white);
}

/* Load More Button */
.load-more-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 32px auto 0;
  padding: 12px 24px;
  background: var(--color-white);
  color: var(--color-midnight-ink);
  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;
}

.load-more-btn:hover {
  background: var(--color-stone-mist);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}


/* ============================================
   Responsive Design - Mobile First Approach
   ============================================ */

/* Container Responsive Padding */
@media (max-width: 767px) {
  .container {
    padding: 0 var(--spacing-16);
  }
}

/* Header Responsive */
@media (max-width: 767px) {
  .header-inner {
    height: auto;
    padding: 12px var(--spacing-16);
    flex-wrap: wrap;
    gap: var(--spacing-8);
  }

  .header-search {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: var(--spacing-8);
  }

  .header-tagline {
    display: none;
  }

  .logo {
    font-size: 14px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .header-inner {
    padding: 8px var(--spacing-24);
  }

  .header-search {
    max-width: 280px;
  }

  .header-tagline {
    font-size: 13px;
  }
}

/* Hero Section Responsive */
@media (max-width: 767px) {
  #hero {
    padding: 40px 0 48px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-left h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 16px;
  }

  .hero-sub {
    font-size: 16px;
    max-width: 100%;
    margin-bottom: 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hero-cta {
    justify-content: center;
    text-align: center;
  }

  .hero-right {
    order: -1;
  }

  .hero-image {
    max-width: 100%;
  }

  .hero-visual {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-inner {
    gap: 40px;
  }

  .hero-left h1 {
    font-size: clamp(2.5rem, 4vw, 3rem);
  }

  .hero-sub {
    font-size: 16px;
    max-width: 400px;
  }

  .hero-cta-group {
    flex-wrap: wrap;
  }
}

/* Batch Grid Responsive */
@media (max-width: 767px) {
  #batches {
    padding: 48px 0 64px;
  }

  .batch-grid {
    column-count: 1;
    column-gap: 0;
  }

  .batch-card {
    margin-bottom: var(--spacing-16);
  }

  .section-header h2 {
    font-size: 32px;
  }

  .section-sub {
    font-size: 14px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .batch-grid {
    column-count: 2;
  }

  #batches {
    padding: 56px 0 72px;
  }

  .section-header h2 {
    font-size: 40px;
  }
}

/* Stats Grid Responsive */
@media (max-width: 767px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-16);
  }

  #dashboard {
    padding: var(--spacing-32) 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Detail Layout Responsive */
@media (max-width: 767px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-image {
    max-height: 250px;
    object-fit: cover;
  }

  .detail-meta {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-actions {
    flex-direction: column;
    gap: 8px;
  }

  .detail-actions button,
  .detail-actions a {
    width: 100%;
    justify-content: center;
  }

  .tabs-header {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }

  .tab-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
  }

  .tabs-section {
    margin-top: 32px;
    padding: 16px;
  }

  .tab-pane {
    padding: 16px 0;
  }

  .description-content h3 {
    font-size: 18px;
  }

  .teachers-section h3 {
    font-size: 18px;
  }

  .full-description h3 {
    font-size: 18px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail-image {
    max-height: 350px;
  }
}

/* Subjects Grid Responsive */
@media (max-width: 767px) {
  .subjects-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .subjects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Topics List Responsive */
@media (max-width: 767px) {
  .topics-list {
    grid-template-columns: 1fr;
  }

  .topic-card {
    padding: 16px;
  }

  .topic-card-left {
    height: 32px;
    margin-right: 16px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .topics-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Announcements Grid Responsive */
@media (max-width: 767px) {
  .ann-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ann-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Live Classes Row Responsive */
@media (max-width: 767px) {
  .live-classes-row {
    grid-template-columns: 1fr;
  }

  .live-classes-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .live-class-thumb {
    height: 140px;
  }

  .live-class-body {
    padding: 12px;
  }

  .live-class-subject {
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .live-class-title {
    font-size: 16px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .live-class-meta {
    font-size: 12px;
    gap: 8px;
  }

  .live-class-countdown {
    font-size: 12px;
  }

  .live-class-actions {
    gap: 6px;
  }

  .live-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .live-classes-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* My Batches Grid Responsive */
@media (max-width: 767px) {
  .my-batches-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .my-batches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Topic Tabs Responsive */
@media (max-width: 767px) {
  .topic-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .topic-tab {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Content Cards Responsive */
@media (max-width: 767px) {
  .content-card {
    padding: 16px;
  }

  .content-card-title {
    font-size: 16px;
  }

  .content-card-meta {
    font-size: 13px;
  }
}

/* Modal Responsive */
@media (max-width: 767px) {

  .modal-box,
  .teacher-modal-content,
  .image-modal-content {
    width: 90%;
    max-width: none;
    margin: 0 5%;
    max-height: 90vh;
    overflow-y: auto;
  }

  .teacher-modal-avatar {
    width: 80px;
    height: 80px;
  }

  .teacher-modal-name {
    font-size: 1.5rem;
  }
}

/* Footer Responsive */
@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: var(--spacing-24) var(--spacing-16);
  }

  #site-footer {
    padding: var(--spacing-32) 0;
  }
}

/* Page Hero Responsive */
@media (max-width: 767px) {
  .page-hero {
    padding: 32px 0 24px;
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .page-hero p {
    font-size: 14px;
  }

  .back-link {
    font-size: 14px;
  }
}

/* Button Responsive */
@media (max-width: 767px) {

  .btn-enroll,
  .btn-explore,
  .hero-cta {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Search Results Responsive */
@media (max-width: 767px) {
  .batch-id-match {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .batch-id-link-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* Empty State Responsive */
@media (max-width: 767px) {
  .empty-state {
    padding: 48px 16px;
  }

  .empty-state h3 {
    font-size: 18px;
  }

  .empty-state p {
    font-size: 14px;
  }
}

/* Toast Responsive */
@media (max-width: 767px) {
  .enroll-toast {
    bottom: 24px;
    left: 16px;
    right: 16px;
    transform: none;
    width: auto;
    border-radius: var(--radius-buttons);
  }

  .enroll-toast.show {
    transform: translateY(0);
  }
}

/* Video Player Responsive */
@media (max-width: 767px) {
  .secure-player-header {
    padding-left: 1rem;
    padding-right: 1rem;
    height: 56px;
  }

  .header-video-title {
    font-size: 1rem;
  }

  .player-back-btn,
  .header-tool-btn {
    width: 40px;
    height: 40px;
  }

  .player-back-btn svg,
  .header-tool-btn svg {
    width: 24px;
    height: 24px;
  }

  .center-play-btn {
    width: 72px;
    height: 72px;
  }

  .center-play-btn svg {
    width: 56px;
    height: 56px;
  }

  .control-action-btn {
    width: 40px;
    height: 40px;
  }

  .control-action-btn svg {
    width: 24px;
    height: 24px;
  }

  .controls-time-row,
  .controls-buttons-row {
    padding: 0 1rem;
  }

  .controls-time-display {
    font-size: 0.8rem;
  }
}

/* Teachers Grid Responsive */
@media (max-width: 767px) {
  .teachers-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .teachers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Attachments List Responsive */
@media (max-width: 767px) {
  .attachment-item {
    padding: 12px;
  }

  .attachment-name {
    font-size: 14px;
  }

  .attachment-meta {
    font-size: 12px;
  }
}

/* Congratulations Toast Responsive */
@media (max-width: 767px) {
  .congrats-toast {
    left: 16px;
    right: 16px;
    bottom: 24px;
    width: auto;
    transform: translateY(100px);
  }

  .congrats-toast.show {
    transform: translateY(0);
  }

  .congrats-toast-inner {
    padding: 14px 18px;
    font-size: 14px;
    gap: 10px;
    border-radius: var(--radius-buttons);
  }

  .congrats-toast-inner svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
  }

  #congrats-text {
    flex: 1;
    min-width: 0;
  }
}

/* General Typography Responsive */
@media (max-width: 767px) {
  :root {
    --text-display: clamp(2.5rem, 10vw, 4rem);
    --text-display-xl: clamp(3rem, 12vw, 6rem);
    --text-heading-lg: clamp(2rem, 6vw, 3rem);
    --text-heading: clamp(1.5rem, 5vw, 2rem);
  }
}

/* Touch-friendly targets for mobile */
@media (max-width: 767px) {

  button,
  a,
  .dashboard-btn {
    touch-action: manipulation;
  }

  .dashboard-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .batch-card,
  .topic-card,
  .content-card {
    min-height: 44px;
  }

  .batch-card,
  .topic-card,
  .content-card {
    min-height: auto;
  }
}

/* ============================================
   Auth & Profile Pages
   ============================================ */
.auth-page {
  background-color: var(--color-stone-mist);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.auth-card {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: var(--text-heading-sm);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--color-smoke);
  font-size: var(--text-body);
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: var(--font-weight-medium);
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--radius-md);
  font-family: inherit;
}

.auth-btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast) ease;
}

.submit-btn {
  background-color: var(--color-midnight-ink);
  color: var(--color-white);
  margin-top: 1rem;
}

.submit-btn:hover:not(:disabled) {
  background-color: var(--color-charcoal);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #eee;
  z-index: 1;
}

.auth-divider span {
  background: var(--color-white);
  padding: 0 1rem;
  color: var(--color-graphite-veil);
  font-size: var(--text-caption);
  position: relative;
  z-index: 2;
}

.google-btn {
  background-color: var(--color-white);
  border: 1px solid #ddd;
  color: var(--color-charcoal);
}

.google-btn:hover {
  background-color: #f9f9f9;
}

.google-btn img {
  width: 20px;
  height: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: var(--text-caption);
}

.auth-footer a {
  color: var(--color-midnight-ink);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
}

.auth-error-msg {
  background-color: #ffebee;
  color: #c62828;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: var(--text-caption);
  text-align: center;
}

/* Profile Page */
.profile-page {
  background-color: var(--color-stone-mist);
}

.profile-container {
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.profile-header-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 4px solid var(--color-stone-mist);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h2 {
  font-size: var(--text-heading);
  margin-bottom: 0.5rem;
}

.profile-info p {
  color: var(--color-smoke);
  font-size: var(--text-body);
  margin-bottom: 1.5rem;
}

.logout-btn {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background-color: #fee2e2;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.profile-stat-card {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.profile-stat-card h3 {
  color: var(--color-smoke);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.profile-stat-card p {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-midnight-ink);
}

.dashboard-btn {
  background: var(--color-midnight-ink);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-medium);
}

.dashboard-btn:hover {
  background: var(--color-charcoal);
}

/* ============================================
   Today's Schedule Modern UI
   ============================================ */

.date-navigator {
  background: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--radius-buttons);
  border: 1px solid var(--color-stone-mist);
  box-shadow: var(--shadow-subtle-3);
}

.subject-filters-scroll::-webkit-scrollbar {
  display: none;
}

.ui-pill {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: var(--radius-badges);
  background: var(--color-stone-mist);
  color: var(--color-midnight-ink);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ui-pill:hover {
  background: var(--color-graphite-veil);
  color: var(--color-white);
}

.ui-pill.active {
  background: var(--color-midnight-ink);
  color: var(--color-white);
  box-shadow: var(--shadow-subtle);
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .schedule-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ui-card {
  background: var(--color-white);
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-cards);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle-3);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ui-card:hover {
  box-shadow: var(--shadow-subtle-2);
  transform: translateY(-2px);
}

.ui-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-smallbadges);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ui-badge.live {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.ui-badge.pending {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

.ui-badge.completed {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.ui-badge.ended {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.ui-badge.subject {
  background: var(--color-stone-mist);
  color: var(--color-smoke);
  border: 1px solid transparent;
}

.ui-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-midnight-ink);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ui-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-graphite-veil);
  margin-bottom: 6px;
}

.ui-card-meta svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.ui-card-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-buttons);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.ui-button.primary {
  background: var(--color-deep-forest-teal);
  color: var(--color-white);
}

.ui-button.primary:hover {
  background: var(--color-midnight-ink);
}

.ui-button.secondary {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  border-color: var(--color-stone-mist);
}

.ui-button.secondary:hover {
  background: var(--color-stone-mist);
}

.ui-button.danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.ui-button.danger:hover {
  background: #fecaca;
}

.ui-button.icon-only {
  padding: 8px;
  background: transparent;
  color: var(--color-midnight-ink);
}

.ui-button.icon-only:hover {
  background: var(--color-stone-mist);
}

.ui-button.full {
  width: 100%;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
}

.state-container svg {
  color: var(--color-graphite-veil);
  margin-bottom: 16px;
}

.state-container h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--color-midnight-ink);
}

.state-container p {
  color: var(--color-smoke);
}

.mt-4 {
  margin-top: 16px;
}

@media (max-width: 767px) {
  .icon-only-mobile .profile-text {
    display: none;
  }

  .icon-only-mobile {
    padding: 8px !important;
    border-radius: 50%;
  }

  .icon-only-mobile .profile-icon {
    margin-right: 0 !important;
  }
}

/* ============================================
   Study Tools Styles
   ============================================ */

.study-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.study-tab {
  background: var(--color-white);
  border: 1px solid var(--color-stone-mist);
  padding: 10px 20px;
  border-radius: var(--radius-buttons);
  cursor: pointer;
  font-family: var(--font-figtree);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}

.study-tab.active {
  background: var(--color-midnight-ink);
  color: var(--color-white);
  border-color: var(--color-midnight-ink);
}

.study-tab-content {
  display: none;
  background: var(--color-white);
  border-radius: var(--radius-cards);
  padding: 30px;
  border: 1px solid var(--color-stone-mist);
  min-height: 400px;
}

.study-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* To-Do */
.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.todo-input-group {
  display: flex;
  gap: 10px;
}
.todo-input-group input {
  padding: 10px;
  border: 1px solid var(--color-stone-mist);
  border-radius: var(--radius-buttons);
  font-family: var(--font-figtree);
  min-width: 250px;
}
.todo-list {
  list-style: none;
  padding: 0;
}
.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--color-stone-mist);
}
.todo-item.completed span {
  text-decoration: line-through;
  color: var(--color-graphite-veil);
}
.todo-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.delete-todo-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 20px;
  cursor: pointer;
}

/* Pomodoro */
.pomodoro-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pomodoro-timer {
  font-size: 80px;
  font-family: var(--font-figtree);
  font-weight: 700;
  color: var(--color-midnight-ink);
  margin: 40px 0;
}
.pomodoro-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}
.pomodoro-modes {
  display: flex;
  gap: 10px;
}
.pomo-mode {
  background: transparent;
  border: 1px solid var(--color-stone-mist);
  padding: 8px 16px;
  border-radius: var(--radius-buttons);
  cursor: pointer;
}
.pomo-mode.active {
  background: var(--color-stone-mist);
  font-weight: 600;
}
.noise-btn {
  background: var(--color-white);
  border: 1px solid var(--color-stone-mist);
  padding: 8px 16px;
  border-radius: var(--radius-buttons);
  cursor: pointer;
  transition: 0.2s;
}
.noise-btn.active {
  background: var(--color-deep-forest-teal);
  color: white;
}
.pomodoro-stats {
  margin-top: 30px;
  color: var(--color-graphite-veil);
}

/* Notes */
.notes-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  height: 500px;
}
.notes-sidebar {
  border-right: 1px solid var(--color-stone-mist);
  padding-right: 20px;
  overflow-y: auto;
}
.notes-list {
  list-style: none;
  padding: 0;
}
.note-list-item {
  padding: 10px;
  cursor: pointer;
  border-radius: var(--radius-lg);
  margin-bottom: 5px;
}
.note-list-item:hover {
  background: var(--color-stone-mist);
}
.note-list-item.active {
  background: var(--color-lavender-whisper);
  font-weight: 600;
}
.notes-editor {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.note-title-input {
  font-size: 24px;
  font-weight: 600;
  border: none;
  outline: none;
  font-family: var(--font-figtree);
}
.note-content-input {
  flex-grow: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-figtree);
  font-size: 16px;
  line-height: 1.5;
}
.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Flashcards */
.flashcards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.flashcard-creation {
  background: var(--color-stone-mist);
  padding: 20px;
  border-radius: var(--radius-cards);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flashcard-creation input, .flashcard-creation textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: var(--radius-buttons);
  font-family: var(--font-figtree);
}
.flashcard-creation textarea {
  resize: vertical;
  min-height: 80px;
}
.hidden { display: none !important; }
.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.flashcard {
  perspective: 1000px;
  height: 200px;
  cursor: pointer;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}
.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  background: var(--color-white);
}
.flashcard-back {
  transform: rotateY(180deg);
  background: var(--color-cream-paper);
}
.fc-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-graphite-veil);
}

@media (max-width: 768px) {
  /* Study Tabs */
  .study-tabs {
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }
  .study-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .study-tab-content {
    padding: 20px 15px;
    min-height: auto;
  }

  /* To-Do List */
  .todo-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .todo-input-group {
    width: 100%;
    flex-direction: column;
  }
  .todo-input-group input {
    width: 100%;
    min-width: unset;
  }
  .todo-input-group button {
    width: 100%;
  }

  /* Pomodoro */
  .pomodoro-timer {
    font-size: 60px;
    margin: 20px 0;
  }
  .pomodoro-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  .pomodoro-modes {
    flex-wrap: wrap;
    justify-content: center;
  }
  .ambient-noise-controls > div {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Notes */
  .notes-container {
    grid-template-columns: 1fr;
    grid-template-rows: 200px 1fr;
    height: 600px;
  }
  .notes-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-stone-mist);
    padding-right: 0;
    padding-bottom: 15px;
  }
  .note-actions {
    flex-wrap: wrap;
  }
  .note-actions button {
    flex: 1;
  }

  /* Flashcards */
  .flashcards-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .flashcards-header button {
    width: 100%;
  }
  .flashcard-creation {
    padding: 15px;
  }
  .flashcard-creation > div {
    flex-direction: column;
  }
  .flashcard-creation button {
    width: 100%;
  }
}

/* ============================================
   Utility and Animation Classes
   ============================================ */

.hidden {
  display: none !important;
}

/* Premium Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 2s infinite;
}

/* PWA Install Button Styles */
.pwa-install-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff !important;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out forwards;
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Make sure header buttons wrap nicely on smaller mobile screens */
@media (max-width: 480px) {
  #header-auth-actions {
    gap: 6px !important;
  }
  .dashboard-btn {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }
}

/* ============================================
   Tests Tab Styles
   ============================================ */
.tests-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}
@media (min-width: 600px) {
  .tests-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.tests-subtabs {
  display: flex;
  background: var(--color-stone-mist);
  border-radius: var(--radius-buttons);
  padding: 4px;
}

.test-subtab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: calc(var(--radius-buttons) - 4px);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-smoke);
  cursor: pointer;
  transition: all 0.2s ease;
}

.test-subtab-btn.active {
  background: var(--color-white);
  color: var(--color-midnight-ink);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tests-category-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
@media (min-width: 600px) {
  .tests-category-container {
    justify-content: flex-end;
  }
}

.category-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--color-stone-mist);
  background: var(--color-white);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-smoke);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-btn.active {
  background: var(--color-midnight-ink);
  color: var(--color-white);
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.category-btn:hover:not(.active) {
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
}

.tests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .tests-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.test-card {
  background: var(--color-white);
  border-radius: var(--radius-cards);
  border: 1px solid var(--color-stone-mist);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-subtle-3);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.test-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
  border-color: var(--color-deep-forest-teal);
}

.test-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.test-type-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--color-lavender-whisper);
  color: var(--color-midnight-ink);
  border-radius: var(--radius-smallbadges);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.test-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-midnight-ink);
  margin-bottom: 4px;
}

.test-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-smoke);
}

.test-actions {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--color-stone-mist);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-syllabus {
  background: transparent;
  border: 1px solid var(--color-deep-forest-teal);
  border-radius: var(--radius-buttons);
  color: var(--color-deep-forest-teal);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 16px;
  text-align: center;
  width: 100%;
  transition: all 0.2s;
}

.btn-syllabus:hover {
  background: var(--color-deep-forest-teal);
  color: var(--color-white);
}

.test-status-btn {
  padding: 10px 16px;
  border-radius: var(--radius-buttons);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  font-family: inherit;
  white-space: normal;
  width: 100%;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.test-status-btn.start {
  background: linear-gradient(135deg, var(--color-deep-forest-teal) 0%, #057a6b 100%);
  color: var(--color-white);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(3, 79, 70, 0.2);
}

.test-status-btn.start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(3, 79, 70, 0.3);
}

.test-status-btn.missed {
  background: #ffe5e5;
  color: #d32f2f;
  cursor: pointer;
}

.test-status-btn.missed:hover {
  background: #ffcccc;
}

.test-status-btn.disabled {
  background: var(--color-stone-mist);
  color: var(--color-smoke);
  cursor: not-allowed;
}

/* ============================================
   Site Footer Styling
   ============================================ */
body.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.landing-page #hero {
  flex: 1;
}

#site-footer {
  width: 100%;
  background: var(--color-warm-parchment, #fffdf8);
  border-top: 1px solid var(--color-stone-mist, #e5e5dc);
  padding: 28px 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.footer-logo {
  font-family: var(--font-eb-garamond, 'EB Garamond', serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-midnight-ink, #1f2022);
}

.footer-copy {
  font-size: 13.5px;
  color: var(--color-smoke, #60605b);
}

.footer-designed {
  font-size: 12px;
  color: var(--color-graphite-veil, #878782);
}

.footer-links {
  margin-top: 10px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--color-smoke, #60605b);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-deep-forest-teal, #034f46);
}

.footer-disclaimer {
  font-size: 11.5px;
  color: var(--color-graphite-veil, #878782);
  margin-top: 10px;
  margin-bottom: 0;
  max-width: 650px;
  line-height: 1.45;
}