/* ==========================================================================
   ZeeSigner Academy Design System v2.0
   Modern Masterclass UI with Bootstrap Icons & Ultra-Smooth Mobile UX
   ========================================================================== */

:root {
  --bg: #0B0E14;
  --bg-subtle: #111622;
  --surface: #181F2E;
  --surface-hover: #1F293D;
  --surface-active: #28354F;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 102, 0, 0.45);
  
  --text-main: #F8FAFC;
  --text-body: #94A3B8;
  --text-muted: #64748B;
  
  --brand: #FF6600;
  --brand-hover: #FF7A1A;
  --brand-gradient: linear-gradient(135deg, #FF6600 0%, #FD9E13 100%);
  --brand-glow: rgba(255, 102, 0, 0.25);
  
  --success: #10B981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #F59E0B;
  --info: #0EA5E9;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --font-main: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.academy-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  transition: var(--transition);
}

.nav-container {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--brand-gradient);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Desktop Progress Pill */
.progress-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.progress-track {
  width: 76px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand-gradient);
  width: 0%;
  transition: width 0.3s ease;
}

/* Mobile Progress Badge (Hidden on desktop) */
.progress-badge-mobile {
  display: none;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.text-brand {
  color: var(--brand);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-back:hover {
  color: var(--text-main);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Mobile Horizontal Stage Switcher Bar
   ========================================================================== */
.mobile-stage-bar-wrap {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(14, 18, 27, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  position: sticky;
  top: 57px;
  z-index: 45;
}

.mobile-stage-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  padding: 2px 0;
}

.mobile-stage-bar::-webkit-scrollbar {
  display: none;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.stage-pill:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

.stage-pill.active {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px var(--brand-glow);
}

.stage-pill.completed:not(.active) {
  border-color: rgba(16, 185, 129, 0.45);
  color: #E2E8F0;
}

.pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
}

.stage-pill.active .pill-num {
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.pill-check {
  color: var(--success);
  font-size: 0.85rem;
}

.stage-pill.active .pill-check {
  color: #fff;
}

.btn-open-curriculum {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(255, 102, 0, 0.35);
  background: rgba(255, 102, 0, 0.1);
  color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-open-curriculum:hover {
  background: var(--brand);
  color: #fff;
}

/* Curriculum Drawer Backdrop */
.curriculum-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.curriculum-drawer-backdrop.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
.academy-container {
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: calc(100vh - 65px);
}

/* ==========================================================================
   Sidebar Curriculum (Sticky on Desktop)
   ========================================================================== */
.course-sidebar {
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  overflow: hidden;
  z-index: 30;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.sidebar-close-btn:hover {
  color: #fff;
  background: var(--surface-hover);
}

.course-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.course-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #fff;
}

.course-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  list-style: none;
}

.module-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
  transition: var(--transition);
  background: transparent;
}

.module-item:hover {
  background: var(--surface);
}

.module-item.active {
  background: var(--surface);
  border-color: var(--border-focus);
  box-shadow: 0 4px 16px var(--brand-glow);
}

.module-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: var(--transition);
}

.module-item.completed .module-status {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  font-size: 0.85rem;
}

.module-item.active:not(.completed) .module-status {
  border-color: var(--brand);
  color: var(--brand);
}

.module-info {
  flex: 1;
}

.module-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}

.module-item.active .module-num {
  color: var(--brand);
}

.module-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 6px;
}

.module-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.diff-tag {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.diff-tag.beginner {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.diff-tag.intermediate {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.diff-tag.advanced {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
}

.badge-video {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 102, 0, 0.12);
  color: var(--brand);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==========================================================================
   Main Lesson Viewing Area
   ========================================================================== */
.lesson-content {
  padding: 36px 48px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

/* Top Bar */
.lesson-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lesson-crumb {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-body);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-complete:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-complete.completed {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

/* Header Info */
.lesson-header {
  margin-bottom: 28px;
}

.lesson-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pill.beginner {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-pill.intermediate {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-pill.advanced {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.lesson-duration-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lesson-title {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #fff;
}

.lesson-desc {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ==========================================================================
   Video Player Container
   ========================================================================== */
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Multi-Video Tabs Bar */
.video-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(14, 18, 27, 0.95);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.video-tabs-bar::-webkit-scrollbar {
  display: none;
}

.video-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.video-tab-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.video-tab-btn.active {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px var(--brand-glow);
}

.video-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   Multi-Video Interactive Gallery Shelf
   ========================================================================== */
.video-gallery-shelf {
  background: rgba(11, 14, 20, 0.96);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
}

.gallery-shelf-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.gallery-count {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 102, 0, 0.15);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 102, 0, 0.3);
}

.gallery-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 102, 0, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.gallery-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 16px var(--brand-glow);
  background: rgba(255, 102, 0, 0.06);
}

.gallery-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.gallery-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-thumb {
  transform: scale(1.06);
}

.gallery-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.8rem;
  transition: all 0.2s ease;
}

.gallery-card:hover .gallery-play-icon {
  background: rgba(0, 0, 0, 0.2);
  color: var(--brand);
}

.gallery-card.active .gallery-play-icon {
  color: var(--brand);
  background: rgba(0, 0, 0, 0.25);
}

.gallery-playing-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gallery-part-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  color: #CBD5E1;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.gallery-card-meta {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-card-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin: 0;
}

.gallery-card.active .gallery-card-title {
  color: var(--brand);
}

.gallery-card-status {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.gallery-card.active .gallery-card-status {
  color: #10B981;
  font-weight: 700;
}

@media (max-width: 640px) {
  .gallery-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .gallery-grid::-webkit-scrollbar {
    display: none;
  }
  .gallery-card {
    min-width: 190px;
    max-width: 220px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

/* Video Placeholder / Coming Soon */
.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 102, 0, 0.18) 0%, rgba(17, 22, 34, 0.96) 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.play-pulse-btn {
  width: 68px;
  height: 68px;
  background: var(--brand-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  margin-bottom: 16px;
  box-shadow: 0 0 28px var(--brand-glow);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.play-pulse-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  opacity: 0.45;
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.65; }
  100% { transform: scale(1.4); opacity: 0; }
}

.placeholder-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.placeholder-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.placeholder-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 440px;
}

/* ==========================================================================
   Video Script Drawer (Creator Studio)
   ========================================================================== */
.script-drawer-card {
  background: linear-gradient(180deg, rgba(255, 102, 0, 0.06) 0%, rgba(24, 31, 46, 0.65) 100%);
  border: 1px solid rgba(255, 102, 0, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.script-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.script-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.script-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 10px var(--brand-glow);
}

.script-header-text {
  flex: 1;
}

.script-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.35;
}

.script-tag {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  padding: 2px 7px;
  border-radius: 4px;
}

.script-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.script-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-copy-script {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-copy-script:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-script-chevron {
  background: transparent;
  border: none;
  color: var(--text-body);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.script-drawer-card.open .chevron-icon {
  transform: rotate(180deg);
}

.script-body {
  padding: 0 20px 20px 20px;
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

.script-drawer-card.open .script-body {
  display: block;
}

.script-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.script-block {
  background: rgba(11, 14, 20, 0.65);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.script-timing {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.script-cue {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--info);
  margin-bottom: 6px;
  background: rgba(14, 165, 233, 0.1);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
}

.script-dialogue {
  font-size: 0.92rem;
  color: #E2E8F0;
  line-height: 1.6;
}

/* ==========================================================================
   Step by Step Curriculum Details
   ========================================================================== */
.lesson-steps-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.steps-heading {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.steps-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.steps-list {
  display: flex;
  flex-direction: column;
}

.step-card {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}

.step-card:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: -16px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 12px var(--brand-glow);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.step-text {
  font-size: 0.94rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 12px;
}

.step-callout {
  background: rgba(255, 102, 0, 0.08);
  border-left: 3px solid var(--brand);
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 0.88rem;
  color: #CBD5E1;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.callout-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-body {
  flex: 1;
}

.step-callout.tip {
  background: rgba(16, 185, 129, 0.09);
  border-left-color: var(--success);
}

.step-callout.alert {
  background: rgba(245, 158, 11, 0.09);
  border-left-color: var(--warning);
}

/* Step Video Card Embed */
.step-video-card {
  margin-top: 14px;
  margin-bottom: 12px;
  background: rgba(11, 14, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.step-video-header {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
}

.step-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.step-video-wrap iframe,
.step-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   Bottom Navigation
   ========================================================================== */
.lesson-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-nav.prev {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.btn-nav.prev:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-nav.next {
  background: var(--brand-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.btn-nav.next:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
}

.btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 1000;
  max-width: 90vw;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Breakpoints: Tablet & Mobile
   ========================================================================== */

/* Tablet & Mobile (≤ 960px) */
@media (max-width: 960px) {
  .academy-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  /* Show Mobile Stage Carousel Bar */
  .mobile-stage-bar-wrap {
    display: flex;
  }

  /* Transform Sidebar into Slide-over Drawer */
  .course-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 86%;
    max-width: 380px;
    height: 100vh;
    z-index: 100;
    background: #0E121B;
    box-shadow: 0 0 50px rgba(0,0,0,0.85);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    border-right: 1px solid var(--border-focus);
  }

  .course-sidebar.drawer-open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: inline-flex;
  }

  .lesson-content {
    padding: 24px 20px;
  }

  .lesson-title {
    font-size: 1.75rem;
  }
}

/* Mobile Screens (≤ 640px) */
@media (max-width: 640px) {
  .academy-header {
    padding: 10px 14px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  /* Hide Desktop Progress Pill, Show Mobile Compact Badge */
  #desktopProgressPill {
    display: none;
  }

  .progress-badge-mobile {
    display: inline-flex;
  }

  .btn-back {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .lesson-content {
    padding: 20px 14px;
  }

  .lesson-title {
    font-size: 1.45rem;
    line-height: 1.3;
  }

  .lesson-desc {
    font-size: 0.95rem;
  }

  /* Creator Script Drawer Mobile */
  .script-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .script-actions {
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
  }

  .script-title {
    font-size: 0.92rem;
  }

  /* Steps Mobile */
  .lesson-steps-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .steps-heading {
    font-size: 1.2rem;
  }

  .step-card {
    gap: 12px;
  }

  .step-num {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }

  .step-card:not(:last-child)::after {
    left: 14px;
    top: 34px;
  }

  .step-title {
    font-size: 0.98rem;
  }

  .step-text {
    font-size: 0.88rem;
  }

  /* Bottom Nav Buttons Mobile (Thumb-friendly) */
  .lesson-nav-bar {
    gap: 10px;
  }

  .btn-nav {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  .toast-msg {
    bottom: 16px;
    right: 16px;
    left: 16px;
    justify-content: center;
  }
}

/* Very Small Mobile Screens (≤ 380px) */
@media (max-width: 380px) {
  .brand-title {
    display: none;
  }
  
  .btn-nav {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
}
