﻿@import 'generative-ai-light.css';
/**
 * IELTS Cinematic Reading Studio â€” Design System & Styles (v2.1 Cinema Fullscreen Edition)
 * English Mastery Hub
 *
 * Taste-Skill Dial Calibration:
 * - DESIGN_VARIANCE: 7 (Asymmetric glassmorphic balance, high-contrast typography)
 * - MOTION_INTENSITY: 8 (Filmic scene dissolves, camera pushes, 3D flips, chapter scene slates)
 * - VISUAL_DENSITY: 3 (Spacious full-screen cinema canvas for reading text)
 */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Surface Foundations */
  --bg-deep: #080c12;
  --bg-theater: #0c1017;
  --bg-card: rgba(18, 24, 32, 0.78);
  --bg-card-hover: rgba(28, 36, 48, 0.88);
  --bg-overlay: rgba(8, 12, 18, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-active: rgba(255, 255, 255, 0.12);

  /* Borders & Highlights */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.24);
  --border-card: rgba(255, 255, 255, 0.12);

  /* Typography: Native Flawless Vietnamese Subsets */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-display: 'Plus Jakarta Sans', 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Chapter Accent Hues */
  --ch1-color: #38bdf8; /* Electric Cyan */
  --ch2-color: #c084fc; /* Lavender Purple */
  --ch3-color: #4ade80; /* Emerald Mint */
  --ch4-color: #fbbf24; /* Golden Amber */
  --ch5-color: #fb923c; /* Warm Orange */
  --ch6-color: #f87171; /* Coral Crimson */

  /* Global Brand Accent */
  --accent-blue: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
  --radius-card: 20px;
  --radius-btn: 9999px;
  --radius-pill: 9999px;
  --transition-fluid: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100dvh;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric Backdrop & Letterbox Vignettes */
.cinematic-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.backdrop-img {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center 25%;
  filter: blur(32px) brightness(0.2) saturate(1.25);
  transform: scale(1.1);
  transition: opacity 0.8s ease;
}

.backdrop-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(56, 189, 248, 0.08), transparent 60%),
              radial-gradient(circle at 80% 85%, rgba(192, 132, 252, 0.06), transparent 50%),
              linear-gradient(to bottom, rgba(8, 12, 18, 0.72), rgba(8, 12, 18, 0.97));
}

.cinema-letterbox-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}

.cinema-letterbox-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

/* Chapter Transition Scene Slate Overlay */
.chapter-scene-slate {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.chapter-scene-slate.slate-active {
  opacity: 1;
  pointer-events: auto;
}

.slate-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 2.5rem;
  transform: scale(0.92);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-scene-slate.slate-active .slate-content {
  transform: scale(1);
}

.slate-chapter-badge {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--accent-blue);
}

.slate-chapter-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.slate-chapter-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* App Container */
.cinematic-app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Top Glassmorphic Navigation Bar */
.cinematic-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(12, 16, 23, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 0 1 auto;
  min-width: 0;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.nav-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-brand-logo:hover {
  transform: scale(1.04);
  opacity: 0.95;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.brand-logo-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  text-decoration: none;
  transition: var(--transition-fluid);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nav-back:hover {
  color: var(--text-main);
  background: var(--bg-glass-active);
  border-color: var(--border-focus);
  transform: translateX(-2px);
}

.nav-passage-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  min-width: 0;
  overflow: hidden;
}

.passage-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-voice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  letter-spacing: 0.01em;
  transition: var(--transition-fluid);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-voice svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke-width: 2.2;
}

.passage-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-actions::-webkit-scrollbar {
  display: none;
}

.btn-theater-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  cursor: pointer;
  transition: var(--transition-fluid);
  outline: none;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1280px) {
  .nav-actions .btn-theater-action:not(.btn-theater-exam) span {
    display: none;
  }
  .nav-actions .btn-theater-action {
    padding: 0.42rem 0.6rem;
    min-width: 34px;
    justify-content: center;
  }
}

.btn-theater-action:hover {
  color: var(--text-main);
  background: var(--bg-glass-active);
  border-color: var(--border-focus);
}

.btn-theater-action.active {
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.btn-theater-action.btn-theater-exam {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  text-decoration: none;
}

.btn-theater-action.btn-theater-exam:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn-theater-action.btn-audio-active {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
  animation: audioPulse 1.6s infinite ease-in-out;
}

@keyframes audioPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

/* Multi-Stage 6-Chapter Track */
.cinematic-chapter-track {
  width: 100%;
  max-width: 1040px;
  margin: 1.25rem auto 0 auto;
  padding: 0 1.5rem;
}

.chapter-track-segments {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.chapter-segment {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.chapter-segment-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 999px;
  background: currentColor;
  transition: width 0.32s ease;
}

.chapter-segment.completed .chapter-segment-fill {
  width: 100%;
}

.chapter-segment.active {
  box-shadow: 0 0 16px currentColor;
  transform: scaleY(1.4);
}

.chapter-indicator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

.chapter-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chapter-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  box-shadow: 0 0 12px currentColor;
  transition: all 0.3s ease;
}

.chapter-active-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.chapter-progress-pill {
  font-size: 0.8rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

/* Main Theater Workspace (Full-Width Cinema Canvas) */
.cinematic-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 1.25rem auto 2.5rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Slide 0 Hero Overview Card */
.overview-hero-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 4rem 3.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  animation: heroEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.overview-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.overview-title {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  max-width: 820px;
}

.overview-vietnamese {
  font-size: 1.3rem;
  font-weight: 500;
  color: #bae6fd;
  font-style: italic;
  max-width: 760px;
  line-height: 1.5;
}

.overview-stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 0.6rem 0;
  flex-wrap: wrap;
}

.overview-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.overview-stat-pill strong {
  color: var(--text-main);
  font-weight: 700;
}

.btn-start-study {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 2.4rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: #041019;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.38);
  transition: var(--transition-fluid);
}

.btn-start-study:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 45px rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
}

.btn-start-study:active {
  transform: scale(0.98);
}

/* Fullscreen Reading Cinema Stage */
.cinema-reading-screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.cinema-card-theater {
  position: relative;
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 3.25rem 3.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-height: 380px;
  justify-content: center;
}

/* Movie-Scene Filmic Transitions */
.cinema-card-theater.scene-exit {
  transform: scale(0.97) translateY(8px);
  opacity: 0;
  filter: blur(8px);
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.22s ease,
              filter 0.24s ease;
}

.cinema-card-theater.scene-enter {
  animation: filmicSceneEnter 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes filmicSceneEnter {
  0% {
    opacity: 0;
    transform: scale(1.025) translateY(-8px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* ==========================================================================
   CINEMATIC LINE-BY-LINE ILLUSTRATION FRAME (9:16 Left-Side Story Architecture)
   ========================================================================== */

.cinema-card-theater.has-scene-illustration {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 2.75rem;
  align-items: center;
  padding: 2.5rem 3rem;
  min-height: 480px;
}

.scene-photo-frame {
  position: relative;
  width: 100%;
  max-width: 270px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  justify-self: center;
}

.scene-photo-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.scene-photo-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 490px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
  animation: sceneKenBurns 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes sceneKenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.07) translate(-1%, -0.8%);
  }
  100% {
    transform: scale(1.03) translate(0.8%, 0.5%);
  }
}

.scene-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.98));
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.photo-placeholder-icon {
  font-size: 2.4rem;
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.scene-photo-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(8, 12, 18, 0.92) 0%, rgba(8, 12, 18, 0.4) 35%, transparent 65%);
}

.scene-photo-meta-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
  pointer-events: none;
}

.scene-photo-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(8px);
}

.scene-photo-caption {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scene-text-column {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

/* Full-Width Centered Layout for Passages without Scene Illustrations */
.cinema-card-theater:not(.has-scene-illustration) .scene-text-column {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.video-mode-active .cinema-card-theater:not(.has-scene-illustration) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 3.5rem 4rem 7.5rem 4rem !important;
  max-width: 1040px !important;
  margin: 0 auto;
}

.video-mode-active .cinema-card-theater:not(.has-scene-illustration) .scene-text-column {
  align-items: center !important;
  text-align: center !important;
  max-width: 920px !important;
}

.video-mode-active .cinema-card-theater:not(.has-scene-illustration) .active-sentence-hero {
  text-align: center !important;
}

.video-mode-active .cinema-card-theater:not(.has-scene-illustration) .vietnamese-drawer {
  text-align: center !important;
  margin: 0 auto;
}

/* Responsive Stacking on Mobile/Tablet */
@media (max-width: 900px) {
  .cinema-card-theater.has-scene-illustration {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 1.75rem 1.25rem;
  }

  .scene-photo-frame {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* Video Mode: Left 9:16 Photo + Right Main Text Stream */
.video-mode-active .cinema-card-theater.has-scene-illustration {
  display: grid !important;
  grid-template-columns: minmax(240px, 300px) 1fr !important;
  align-items: center !important;
  text-align: left !important;
  gap: 3rem !important;
  padding: 2.5rem 3.5rem 7.5rem 3.5rem !important;
  max-width: 1200px !important;
  min-height: 520px !important;
  margin: 0 auto;
}

.video-mode-active .scene-photo-frame {
  max-width: 280px;
  width: 100%;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  justify-self: center;
}

.video-mode-active .scene-photo-inner {
  aspect-ratio: 9 / 16;
  max-height: 500px;
}

.video-mode-active .scene-text-column {
  align-items: flex-start;
  text-align: left;
  max-width: 100%;
}

.video-mode-active .active-sentence-hero {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem) !important;
  line-height: 1.7 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  text-align: left;
}

.video-mode-active .vietnamese-drawer {
  max-width: 100%;
  text-align: left;
  font-size: 1.15rem;
}

@media (max-width: 900px) {
  .video-mode-active .cinema-card-theater.has-scene-illustration {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem 1.25rem 6.5rem 1.25rem !important;
  }
}

/* Context Sentences (Dimmed Context Flow) */
.context-snippet-prev,
.context-snippet-next {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-dim);
  opacity: 0.32;
  transition: opacity 0.3s ease;
  user-select: none;
}

/* Active Sentence Hero Typography */
.active-sentence-hero {
  font-family: var(--font-body);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.85;
  color: var(--text-main);
  letter-spacing: -0.01em;
  position: relative;
  padding: 0.4rem 0;
  transition: all 0.3s ease;
}

/* Collocation Highlight Badges in the Active Sentence */
.collocation-highlight {
  display: inline;
  padding: 0.18rem 0.5rem;
  margin: 0 0.18rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-bottom: 2.5px solid currentColor;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.collocation-highlight::after {
  content: ' âœ¦';
  font-size: 0.72rem;
  opacity: 0.75;
  vertical-align: super;
}

.collocation-highlight:hover,
.collocation-highlight.pulse-active {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 18px currentColor;
  transform: translateY(-2px);
}

/* Slide-Down Bilingual Vietnamese Drawer */
.vietnamese-drawer {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3.5px solid var(--accent-blue);
  border-radius: 10px;
  padding: 1.3rem 1.6rem;
  margin-top: 0.4rem;
  font-size: 1.18rem;
  line-height: 1.75;
  color: #bfdbfe;
  font-style: italic;
  display: none;
  animation: slideDownVi 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.vietnamese-drawer.visible {
  display: block;
}

@keyframes slideDownVi {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sentence Stage Controls Bar (Cinema Bottom Deck) */
.cinema-bottom-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.6rem;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  gap: 1rem;
}

.deck-left-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sentence-counter-badge {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sentence-counter-badge strong {
  color: var(--accent-blue);
}

/* Active Vocab Trigger Badge Button */
.btn-active-vocab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-pill);
  color: var(--accent-blue);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fluid);
}

.btn-active-vocab-badge:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-blue);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.vocab-badge-sparkle {
  color: #facc15;
}

.sentence-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-nav-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition-fluid);
  outline: none;
}

.btn-nav-step:hover:not(:disabled) {
  background: var(--bg-glass-active);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-nav-step.btn-nav-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #041019;
  border-color: transparent;
  font-weight: 700;
}

.btn-nav-step.btn-nav-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.btn-nav-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Floating Cinema Vocab Popover (Reveals ONLY on Click) */
.vocab-popover-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 12, 18, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  animation: modalFadeIn 0.24s ease;
}

.vocab-popover-overlay.open {
  display: block;
}

.cinema-vocab-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.95);
  z-index: 130;
  width: min(560px, 92vw);
  background: #111722;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 40px rgba(56, 189, 248, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinema-vocab-popover.open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.popover-accent-line {
  height: 4px;
  width: 100%;
  background-color: var(--accent-blue);
  box-shadow: 0 0 14px currentColor;
}

.popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem 1.75rem;
  gap: 1rem;
}

.popover-term-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.popover-term-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.popover-pos-badge {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: lowercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

/* Distinct color coding for parts of speech */
.popover-pos-badge.pos-noun,
.popover-pos-badge.pos-noun-phrase {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 165, 233, 0.35);
}

.popover-pos-badge.pos-verb,
.popover-pos-badge.pos-verb-phrase {
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

.popover-pos-badge.pos-adjective,
.popover-pos-badge.pos-adjective-phrase {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.popover-pos-badge.pos-adverb,
.popover-pos-badge.pos-adverb-phrase {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.35);
}

.popover-pos-badge.pos-prepositional-phrase,
.popover-pos-badge.pos-idiom {
  color: #f472b6;
  background: rgba(236, 72, 153, 0.14);
  border-color: rgba(236, 72, 153, 0.35);
}

.popover-ipa-text {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-blue);
}

.btn-card-audio {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fluid);
  flex-shrink: 0;
}

.btn-card-audio:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
}

.popover-body {
  padding: 0.5rem 1.75rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.popover-section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.popover-en-def {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid rgba(255, 255, 255, 0.25);
}

.popover-vi-desc {
  font-size: 0.94rem;
  line-height: 1.6;
  color: #bfdbfe;
  background: rgba(56, 189, 248, 0.08);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.popover-synonym-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  transition: var(--transition-fluid);
}

.popover-synonym-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.popover-beginner-note {
  font-size: 0.88rem;
  color: #fde047;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.1);
}

.vn-term-highlight {
  position: relative;
  border-radius: 3px;
  padding: 0.05rem 0.25rem;
  background: rgba(255, 255, 255, 0.06);
}

.popover-footer {
  padding: 0.9rem 1.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

.btn-popover-practice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition-fluid);
}

.btn-popover-practice:hover {
  background: rgba(56, 189, 248, 0.22);
  transform: translateY(-1px);
}

/* Modals & Drawers Shared Structure */
.cinematic-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cinematic-modal-overlay.open {
  display: flex;
  animation: modalFadeIn 0.25s ease;
}

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

.cinematic-modal-box {
  background: #111722;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.btn-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fluid);
}

.btn-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* 3D Flashcard Trainer Module */
.flashcard-setup-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.setup-option-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.setup-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setup-chips-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.chip-select-btn {
  padding: 0.5rem 1.1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fluid);
}

.chip-select-btn:hover {
  background: var(--bg-glass-active);
  border-color: var(--border-focus);
}

.chip-select-btn.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 700;
}

/* 3D Flashcard Interactive Player */
.flashcard-player-container {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
}

.flashcard-player-container.active {
  display: flex;
}

.flashcard-stage-wrapper {
  perspective: 1200px;
  width: 100%;
  max-width: 520px;
  height: 310px;
  cursor: pointer;
}

.flashcard-3d-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 18px;
}

.flashcard-3d-card.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  padding: 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-card);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.flashcard-front {
  background: linear-gradient(145deg, #161b22, #0d1117);
}

.flashcard-back {
  background: linear-gradient(145deg, #0e1e2d, #0d141e);
  transform: rotateY(180deg);
}

.card-flip-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Split-Screen IELTS Reading Practice Simulator */
.practice-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: var(--bg-deep);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.practice-screen-overlay.open {
  display: flex;
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  background: rgba(12, 16, 23, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  gap: 1rem;
}

.practice-split-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.practice-left-passage {
  padding: 2.5rem 3rem;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  background: rgba(12, 16, 23, 0.4);
  line-height: 1.8;
  font-size: 1.05rem;
  color: #e2e8f0;
}

.practice-right-quiz {
  padding: 2.5rem 3rem;
  overflow-y: auto;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quiz-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.quiz-question-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-blue);
  font-weight: 700;
}

.quiz-tfng-options {
  display: flex;
  gap: 0.65rem;
}

.quiz-tfng-btn {
  flex: 1;
  padding: 0.55rem 0.8rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fluid);
}

.quiz-tfng-btn:hover {
  background: var(--bg-glass-active);
}

.quiz-tfng-btn.selected {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.quiz-input-text {
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.quiz-input-text:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* List Drawer */
.list-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(440px, 92vw);
  background: #0f141d;
  border-right: 1px solid var(--border-card);
  z-index: 160;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.7);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.list-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(17, 23, 34, 0.95);
  flex-shrink: 0;
}

.drawer-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
  overflow-x: auto;
  max-width: calc(100% - 44px);
  scrollbar-width: none;
}

.drawer-tab-btn {
  padding: 0.45rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fluid);
  white-space: nowrap;
}

.drawer-tab-btn:hover {
  color: var(--text-main);
}

.drawer-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Catalog Search & Category Filter Chips */
.drawer-search-container {
  position: relative;
  width: 100%;
}

.drawer-search-input {
  width: 100%;
  padding: 0.65rem 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fluid);
}

.drawer-search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.drawer-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.drawer-filter-chip {
  padding: 0.28rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fluid);
}

.drawer-filter-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.drawer-filter-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* Catalog List Cards */
.drawer-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.drawer-catalog-card {
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-catalog-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.drawer-catalog-card.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--accent-blue);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.25);
}

.drawer-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.drawer-card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.drawer-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.drawer-card-badge.cat-business { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.drawer-card-badge.cat-science { background: rgba(192, 132, 252, 0.15); color: #c084fc; }
.drawer-card-badge.cat-environment { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.drawer-card-badge.cat-history { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.drawer-card-badge.cat-people { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.drawer-card-badge.cat-psychology { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.drawer-card-vietnamese {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.drawer-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}

.drawer-sentence-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--bg-glass);
  border: 1px solid transparent;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fluid);
}

.drawer-sentence-item:hover {
  background: var(--bg-glass-active);
  border-color: var(--border-subtle);
}

.drawer-sentence-item.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 600;
}

/* Responsive Rules & Mobile Collapse */
@media (max-width: 992px) {
  .cinema-card-theater {
    padding: 2.25rem 2rem;
  }

  .active-sentence-hero {
    font-size: 1.35rem;
    line-height: 1.7;
  }

  .practice-split-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .practice-left-passage {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    max-height: 40vh;
  }
}

@media (max-width: 860px) {
  .cinematic-nav {
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }

  .nav-left {
    gap: 0.45rem;
    min-width: 0;
    flex: 0 1 auto;
  }

  .nav-center {
    flex: 0 0 auto;
  }

  .btn-mode-toggle {
    padding: 0.32rem 0.65rem;
    font-size: 0.72rem;
  }

  .nav-brand-logo .brand-logo-text {
    display: none;
  }

  .nav-brand-logo .brand-logo-icon {
    width: 28px;
    height: 28px;
  }

  .btn-nav-back {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }

  .nav-passage-title {
    display: none;
  }

  .nav-actions {
    gap: 0.35rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 48vw;
    justify-content: flex-end;
  }

  .nav-actions::-webkit-scrollbar {
    display: none;
  }

  /* Sleek compact icon buttons on mobile & tablet */
  .btn-theater-action {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 9px;
    flex-shrink: 0;
  }

  .btn-theater-action span {
    display: none;
  }

  .btn-theater-action svg {
    margin: 0;
  }
}

@media (max-width: 768px) {
  .overview-hero-card {
    padding: 2.5rem 1.5rem;
  }

  .overview-title {
    font-size: 2.2rem;
  }

  .cinema-card-theater {
    padding: 1.75rem 1.35rem;
  }

  .active-sentence-hero {
    font-size: 1.2rem;
    line-height: 1.65;
  }

  .context-snippet-prev,
  .context-snippet-next {
    font-size: 0.95rem;
  }

  .cinema-bottom-deck {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .deck-left-group {
    justify-content: space-between;
  }

  .sentence-nav-buttons {
    width: 100%;
    justify-content: space-between;
  }

  .btn-nav-step {
    flex: 1;
    justify-content: center;
  }

  .list-drawer {
    width: 100%;
    max-width: 340px;
  }

  .drawer-header {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .drawer-tab-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
  }
}

@media (max-width: 480px) {
  .cinematic-nav {
    padding: 0.5rem 0.6rem;
    gap: 0.35rem;
  }

  .btn-nav-back {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
  }

  .btn-nav-back .nav-back-sub {
    display: none;
  }

  .btn-mode-toggle {
    padding: 0.28rem 0.5rem;
    font-size: 0.68rem;
  }

  .nav-actions {
    max-width: 42vw;
  }
}

/* Accessibility: Prefers-Reduced-Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   IN-BROWSER CINEMA VIDEO PLAYER HUD & VIDEO MODE (v2.2)
   ========================================================================== */

/* Video Mode Nav Action Pill */
.btn-theater-video {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22) 0%, rgba(56, 189, 248, 0.22) 100%) !important;
  border-color: rgba(168, 85, 247, 0.45) !important;
  color: #c084fc !important;
  font-weight: 700 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-theater-video:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4) 0%, rgba(56, 189, 248, 0.4) 100%) !important;
  border-color: rgba(168, 85, 247, 0.8) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

.btn-theater-video.active {
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%) !important;
  border-color: #ffffff !important;
  color: #070a12 !important;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
}

/* Hero Card Video Start Button */
.btn-hero-video-start {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #a855f7 0%, #38bdf8 100%);
  color: #070a12;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -5px rgba(168, 85, 247, 0.5);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-hero-video-start:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 40px -5px rgba(168, 85, 247, 0.7);
  color: #000;
}

/* Floating Cinema Video Control HUD */
.cinema-video-hud {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 960px;
  background: rgba(11, 16, 26, 0.9);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(30px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-mode-active .cinema-video-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Auto-hide HUD when mouse is idle during video playback */
.video-mode-active.hud-autohidden .cinema-video-hud {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

/* Scrubber / Progress track on top of HUD */
.hud-top-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  transition: height 0.15s ease;
}

.hud-top-progress-track:hover {
  height: 8px;
}

.hud-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #a855f7 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  border-radius: 0 4px 4px 0;
  transition: width 0.1s linear;
}

/* HUD Controls Row */
.hud-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 12px;
}

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

.hud-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: scale(1.05);
}

.hud-btn-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 100%);
  border: none;
  color: #070a12;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.hud-btn-play:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

.hud-btn-exit:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.hud-btn-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-btn-pill:hover,
.hud-btn-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

.hud-time-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 6px;
}

.hud-time-divider {
  opacity: 0.4;
}

#hudTimeCurrent {
  color: #f1f5f9;
}

.hud-center-chapter-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-chapter-tag {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.hud-sentence-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* ==========================================================================
   VIDEO-MODE ACTIVE THEATER OVERRIDES (Widescreen & Polished Typography)
   ========================================================================== */

/* Widescreen Theater Spanning: expands stage from 1040px to wide cinema canvas */
.video-mode-active .cinematic-main {
  max-width: min(1520px, 95vw) !important;
  width: 100% !important;
  margin: 1rem auto 2rem auto !important;
  padding: 0 1.5rem !important;
}

/* Auto-hide top header and chapter track when mouse is idle during video playback */
.video-mode-active.hud-autohidden .cinematic-header,
.video-mode-active.hud-autohidden .cinematic-chapter-track {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.video-mode-active .cinematic-header,
.video-mode-active .cinematic-chapter-track {
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hide non-video reading controls and contextual clutter */
.video-mode-active .sentence-nav-buttons,
.video-mode-active .sentence-control-bar,
.video-mode-active .context-snippet-prev,
.video-mode-active .context-snippet-next,
.video-mode-active .btn-active-vocab-badge {
  display: none !important;
}

/* Balanced Academic Hero Typography */
.video-mode-active .active-sentence-hero {
  font-size: clamp(1.4rem, 2.1vw, 1.85rem) !important;
  line-height: 1.68 !important;
  letter-spacing: -0.015em !important;
  font-weight: 600 !important;
  text-align: center !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.75);
  padding: 0.5rem 0 !important;
}

.video-mode-active .active-sentence-hero .collocation-highlight {
  padding: 0.18rem 0.65rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}

/* Centered Documentary Subtitle Pill */
.video-mode-active .vietnamese-drawer {
  font-size: clamp(1.05rem, 1.45vw, 1.25rem) !important;
  line-height: 1.65 !important;
  text-align: center !important;
  max-width: 1100px !important;
  margin: 1.25rem auto 0 auto !important;
  color: #94a3b8 !important;
  padding: 0.85rem 1.75rem !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Cinema Theater Card with generous bottom padding for HUD clearance */
.video-mode-active .cinema-card-theater {
  padding: clamp(2.25rem, 3.5vw, 3.25rem) clamp(2rem, 4vw, 4rem) 7.5rem clamp(2rem, 4vw, 4rem) !important;
  min-height: 480px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  border-radius: 24px !important;
  background: rgba(11, 16, 26, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Responsive Adjustments for Mobile HUD */
@media (max-width: 768px) {
  .video-mode-active .cinematic-main {
    padding: 0 0.75rem !important;
  }

  .video-mode-active .cinema-card-theater {
    padding: 1.75rem 1.25rem 6.5rem 1.25rem !important;
    min-height: 380px !important;
  }

  .video-mode-active .active-sentence-hero {
    font-size: 1.25rem !important;
    line-height: 1.55 !important;
  }

  .cinema-video-hud {
    bottom: 12px;
    width: calc(100% - 24px);
  }

  .hud-center-chapter-indicator {
    display: none;
  }

  .hud-time-display {
    font-size: 0.75rem;
  }

  .hud-btn {
    width: 32px;
    height: 32px;
  }

  .hud-btn-play {
    width: 38px;
    height: 38px;
  }

  .hud-btn-pill {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   CONTINUOUS FULL-PASSAGE FLOW MODE (TELEPROMPTER CINEMATIC STREAM)
   ========================================================================== */

/* Top Mode Switcher Pill Group */
.nav-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.btn-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-mode-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-mode-toggle.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(99, 102, 241, 0.35));
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25);
}

/* ==========================================================================
   AUTHENTIC SPLIT 2-COLUMN FULL-PASSAGE FLOW THEATER STAGE
   ========================================================================== */

/* Full-Passage Flow Container */
.passage-flow-container {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 8rem;
  position: relative;
  z-index: 10;
  animation: flowFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Multi-Colored Segmented Chapter Progress Bar */
.flow-chapter-progress-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.flow-chapter-segments {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 14px;
}

.flow-chapter-segment {
  flex: 1;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.flow-chapter-segment:hover {
  filter: brightness(1.25);
  transform: translateY(-1px);
}

.flow-chapter-segment.completed {
  opacity: 0.85;
}

.flow-chapter-segment.active {
  height: 12px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px currentColor, 0 0 4px #ffffff;
  opacity: 1 !important;
}

.flow-chapter-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

/* Centered Thematic Chapter Heading */
.flow-chapter-heading-wrap {
  text-align: center;
  margin: 0.5rem auto 2.25rem;
}

.flow-chapter-title-hero {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
  transition: color 0.35s ease;
}

/* Split 2-Column Theater Stage */
.flow-theater-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 2.25rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

/* Left Column: Paragraph Context Card */
.flow-paragraph-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  line-height: 1.95;
  font-size: 1.15rem;
  color: #94a3b8;
  transition: all 0.3s ease;
  min-height: 220px;
}

/* Paragraph Sentence Elements */
.flow-sentence {
  display: inline;
  cursor: pointer;
  transition: opacity 0.25s ease, color 0.25s ease, filter 0.25s ease;
  border-radius: 4px;
  padding: 2px 0;
}

.flow-sentence.dimmed {
  opacity: 0.28;
  filter: blur(0.15px);
}

.flow-sentence.dimmed:hover {
  opacity: 0.65;
  filter: none;
}

.flow-sentence.active {
  opacity: 1 !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.24rem;
  line-height: 1.85;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  filter: none;
}

/* Collocation Highlight Underlines in Active Sentence */
.flow-colloc-term {
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2.5px solid currentColor;
  padding-bottom: 1px;
  transition: all 0.2s ease;
}

.flow-colloc-term:hover {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 0 10px currentColor;
}

/* Inactive Sentences: Subtle clean context without visual screaming */
.flow-sentence.dimmed .flow-colloc-term {
  color: inherit !important;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.22) !important;
  font-weight: 500 !important;
}

.flow-sentence.dimmed .flow-colloc-term:hover {
  color: #ffffff !important;
  border-bottom-color: rgba(255, 255, 255, 0.6) !important;
}

/* Bilingual Vietnamese Sentence Line */
.flow-sentence-vi-active {
  display: block;
  margin-top: 1rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.6;
  color: #93c5fd;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #38bdf8;
  padding: 0.65rem 0.95rem;
  border-radius: 0 10px 10px 0;
  animation: viFadeIn 0.25s ease;
}

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

/* Right Column: Stacked Vocabulary Breakdown Cards */
.flow-vocab-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.flow-vocab-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1.35rem 1.6rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.flow-vocab-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.7);
}

.flow-vocab-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.flow-vocab-card-term {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.flow-vocab-card-pos {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-style: italic;
  color: #94a3b8;
  font-weight: 500;
}

.flow-vocab-card-def {
  font-size: 0.96rem;
  font-weight: 500;
  color: #f1f5f9;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.flow-vocab-card-vi {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Floating Bottom Narration & Scrubber Dock */
.flow-dock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 680px;
  margin: 1.5rem auto 0;
  padding: 0.65rem 1.1rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.65);
  position: sticky;
  bottom: 1.5rem;
  z-index: 50;
}

.flow-dock-left,
.flow-dock-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flow-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.flow-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.flow-play-btn {
  background: linear-gradient(135deg, #0284c7, #3b82f6);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  font-weight: 700;
}

.flow-play-btn.playing {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.flow-sentence-counter {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin: 0 0.5rem;
  white-space: nowrap;
}

.flow-vi-toggle.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

/* Flow Speed Capsule Selector */
.flow-speed-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 2px 4px;
  gap: 2px;
}

.flow-speed-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.2;
}

.flow-speed-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.flow-speed-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
  font-weight: 700;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.flow-speed-btn:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
}

/* Responsive Overrides */
@media (max-width: 960px) {
  .flow-theater-stage {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .flow-paragraph-card {
    padding: 1.75rem 1.85rem;
    font-size: 1.08rem;
  }
}

@media (max-width: 640px) {
  .flow-dock-bar {
    flex-direction: column;
    border-radius: 20px;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .flow-chapter-title-hero {
    font-size: 1.45rem;
  }

  .flow-chapter-badge {
    display: none;
  }
}

