/* Modern CSS Design System for Math Grade 3 Unit 1 Presentation */
:root {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  /* Place Value Theme Colors */
  --th-color: #6366f1; /* Thousand - Purple */
  --th-glow: rgba(99, 102, 241, 0.4);
  --hu-color: #10b981; /* Hundred - Emerald */
  --hu-glow: rgba(16, 185, 129, 0.4);
  --te-color: #f59e0b; /* Ten - Amber */
  --te-glow: rgba(245, 158, 11, 0.4);
  --on-color: #ef4444; /* One - Coral */
  --on-glow: rgba(239, 68, 68, 0.4);
  --gold-color: #fbbf24;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-drag: none;
}

body {
  font-family: 'Noto Sans TC', 'Fredoka', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* App Header */
.app-header {
  height: 64px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px var(--th-glow);
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-info-badge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--th-color);
  color: #c7d2fe;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slide-indicator {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  margin-right: 4px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #1e293b;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 800px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-sm { max-width: 420px; }
.modal-lg { max-width: 960px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.close-btn:hover { color: #fff; }

.modal-body { overflow-y: auto; }

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.toc-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.toc-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  border-color: var(--th-color);
}

.toc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.toc-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.toc-info p { font-size: 0.8rem; color: var(--text-muted); }
.toc-tag { font-size: 0.75rem; font-weight: 700; color: var(--gold-color); }

/* Forms & Inputs */
.student-form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.custom-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.custom-input:focus {
  border-color: var(--th-color);
  box-shadow: 0 0 10px var(--th-glow);
}

/* Teacher Dashboard Statistics & Table */
.teacher-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-num {
  font-family: 'Fredoka', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-color);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: rgba(15, 23, 42, 0.6);
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.records-table th {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  font-weight: 700;
  color: #a5b4fc;
  border-bottom: 1px solid var(--card-border);
}

.records-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.records-table tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}

.loading-td {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

/* Main Slides Viewport */
.slides-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.slide-page {
  position: absolute;
  inset: 24px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow-y: auto;
}

.slide-page.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.slide-header {
  margin-bottom: 20px;
}

.slide-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-top: 6px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 4px;
}

/* Slide Content Layouts */
.slide-content {
  flex: 1;
  display: flex;
  gap: 20px;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.flex-col {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.w-full { width: 100%; }
.mt-2 { margin-top: 16px; }

/* Cards & Glassmorphism */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-purple { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid var(--th-color); }
.badge-emerald { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid var(--hu-color); }
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid var(--te-color); }
.badge-coral { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid var(--on-color); }
.badge-blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid #3b82f6; }
.badge-gold { background: rgba(251, 191, 36, 0.2); color: #fde047; border: 1px solid var(--gold-color); }

/* Buttons */
.btn {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn:active { transform: translateY(0); }

.btn-purple { background: var(--th-color); color: #fff; box-shadow: 0 4px 14px var(--th-glow); }
.btn-emerald { background: var(--hu-color); color: #fff; box-shadow: 0 4px 14px var(--hu-glow); }
.btn-amber { background: var(--te-color); color: #fff; box-shadow: 0 4px 14px var(--te-glow); }
.btn-coral { background: var(--on-color); color: #fff; box-shadow: 0 4px 14px var(--on-glow); }
.btn-outline { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--card-border); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; border-radius: 14px; }

.btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* Custom Sliders */
.custom-slider {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  outline: none;
  appearance: none;
  cursor: pointer;
  margin: 12px 0;
}

.custom-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #6366f1;
  border: 3px solid #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
  cursor: pointer;
  transition: transform 0.1s;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.highlight-num {
  color: #38bdf8;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}

/* Slide 1: Base-10 Blocks Visualization Zone */
.block-visual-zone {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 260px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--card-border);
}

.block-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.col-title {
  width: 100%;
  text-align: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.bg-th { background: rgba(99, 102, 241, 0.3); color: #c7d2fe; border: 1px solid var(--th-color); }
.bg-hu { background: rgba(16, 185, 129, 0.3); color: #a7f3d0; border: 1px solid var(--hu-color); }
.bg-te { background: rgba(245, 158, 11, 0.3); color: #fde68a; border: 1px solid var(--te-color); }
.bg-on { background: rgba(239, 68, 68, 0.3); color: #fecaca; border: 1px solid var(--on-color); }

.block-container {
  flex: 1;
  width: 100%;
  display: flex;
  flex-wrap: wrap-reverse;
  align-content: flex-start;
  gap: 4px;
  padding: 6px;
  overflow-y: auto;
}

/* Vector Base-10 Block Renderings */
.cube-1000 {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  border: 2px solid #c7d2fe;
  border-radius: 6px;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
}

.flat-100 {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #34d399, #059669);
  border: 2px solid #a7f3d0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
}

.rod-10 {
  width: 14px;
  height: 42px;
  background: linear-gradient(180deg, #fbbf24, #d97706);
  border: 1px solid #fde68a;
  border-radius: 3px;
}

.unit-1 {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #f87171, #dc2626);
  border: 1px solid #fecaca;
  border-radius: 2px;
}

/* Place Value Board Table */
.pv-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.pv-cell {
  padding: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.05);
}

.pv-cell.th { color: #a5b4fc; }
.pv-cell.hu { color: #6ee7b7; }
.pv-cell.te { color: #fcd34d; }
.pv-cell.on { color: #fca5a5; }

.pv-val {
  padding: 10px;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.8);
}

.pv-val.th { color: #818cf8; }
.pv-val.hu { color: #34d399; }
.pv-val.te { color: #fbbf24; }
.pv-val.on { color: #f87171; }

.scenario-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--th-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
}

.scenario-head {
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 6px;
}

.scenario-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Slide 2: Money Drag and Drop */
.money-target-banner {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--hu-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.target-price { font-size: 1.1rem; font-weight: 700; }
.money-dnd-area {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  height: 250px;
}

.wallet-source-panel {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.panel-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}

.money-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.money-draggable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: grab;
  padding: 6px;
  transition: var(--transition);
}

.money-draggable:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.drag-hint { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; }

/* Banknote & Coin Graphics */
.bill {
  width: 60px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.bill-1000 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); border: 1px solid #93c5fd; }
.bill-100 { background: linear-gradient(135deg, #991b1b, #ef4444); border: 1px solid #fca5a5; }

.coin {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.coin-10 {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, #fde047 0%, #ca8a04 100%);
  border: 2px solid #fef08a;
  color: #713f12;
  font-size: 0.75rem;
}

.coin-1 {
  width: 26px;
  height: 26px;
  background: radial-gradient(circle, #f1f5f9 0%, #64748b 100%);
  border: 2px solid #ffffff;
  color: #0f172a;
  font-size: 0.7rem;
}

.drop-tray-panel {
  background: rgba(15, 23, 42, 0.7);
  border: 2px dashed #10b981;
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.drop-tray-panel.drag-over {
  background: rgba(16, 185, 129, 0.15);
  border-color: #34d399;
}

.tray-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  font-size: 1.2rem;
}

.tray-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 2;
  width: 100%;
}

.tray-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.spotlight-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

.spotlight-header { font-weight: 700; color: var(--gold-color); margin-bottom: 10px; }
.digit-compare-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0; }
.digit-card { padding: 10px 16px; border-radius: var(--radius-sm); text-align: center; }
.digit-vs { font-size: 1.5rem; font-weight: 900; color: #ef4444; }
.spotlight-tip { font-size: 0.82rem; color: var(--text-muted); text-align: center; }

/* Slide 3: Mountain Heights Chart Visualizer */
.mountain-chart-zone {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 250px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  border: 1px solid var(--card-border);
}

.mountain-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20%;
  height: 100%;
  justify-content: flex-end;
}

.mountain-height-tag {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
}

.mountain-bar-fill {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
  font-size: 1.2rem;
  color: #fff;
  transition: height 0.8s ease-in-out;
}

.mountain-name { font-size: 0.9rem; font-weight: 700; margin-top: 8px; }

.digit-compare-inspector {
  margin-top: 14px;
  background: rgba(15, 23, 42, 0.6);
  padding: 12px;
  border-radius: var(--radius-md);
}

.inspector-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 8px; }
.inspector-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.inspector-result-box {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #38bdf8;
}

/* Card Game Drag and Drop */
.card-game-zone {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
}

.digit-cards-source {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.num-card {
  width: 50px;
  height: 64px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border: 2px solid #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #713f12;
  cursor: grab;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.num-card:hover { transform: translateY(-4px) scale(1.08); }

.card-slots-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.slot-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slot-label { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.slot-dropzone {
  width: 56px;
  height: 70px;
  border: 2px dashed #6366f1;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-game-status {
  text-align: center;
  font-size: 1.1rem;
  margin: 10px 0;
}

/* Slide 4: Number Line & Animal Jump Canvas */
.numberline-stage-wrapper {
  position: relative;
  height: 200px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  overflow: hidden;
  margin-bottom: 14px;
}

#nl-svg-canvas {
  width: 100%;
  height: 100%;
}

.animal-sprite-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.animal-avatar {
  position: absolute;
  bottom: 60px;
  left: 100px;
  font-size: 2.2rem;
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.nl-controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.5);
  padding: 12px;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.custom-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  outline: none;
}

.custom-select option { background: #1e293b; color: #fff; }

.jump-equation-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--te-color);
  padding: 14px 20px;
  border-radius: var(--radius-md);
}

.eq-icon { font-size: 2rem; color: var(--te-color); }
.eq-title { font-weight: 700; font-size: 1.05rem; }
.eq-formula { font-family: 'Fredoka', sans-serif; font-size: 1.8rem; font-weight: 900; color: var(--gold-color); }

/* Slide 5: Quiz Assessment */
.quiz-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}

.q-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #10b981);
  transition: width 0.3s;
}

.quiz-question {
  display: none;
}

.quiz-question.active {
  display: block;
}

.q-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.q-num { font-size: 0.85rem; color: var(--text-muted); }
.q-text { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; line-height: 1.5; }

.q-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-opt-btn:hover { background: rgba(99, 102, 241, 0.2); border-color: var(--th-color); }
.quiz-opt-btn.correct { background: rgba(16, 185, 129, 0.3); border-color: var(--hu-color); }
.quiz-opt-btn.wrong { background: rgba(239, 68, 68, 0.3); border-color: var(--on-color); }

.quiz-feedback-box {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.quiz-feedback-box.correct-bg { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid var(--hu-color); }
.quiz-feedback-box.wrong-bg { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid var(--on-color); }

.hidden { display: none !important; }

.scoreboard-box { text-align: center; margin-bottom: 18px; }
.star-rating { font-size: 2.2rem; color: #fbbf24; margin-bottom: 8px; }
.star-inactive { color: rgba(255, 255, 255, 0.15); }
.upload-status-tag { font-size: 0.78rem; color: #38bdf8; margin-top: 6px; }

.badge-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.badge-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-item.unlocked { background: rgba(251, 191, 36, 0.2); border-color: var(--gold-color); color: #fde047; }
.badge-item.locked { opacity: 0.4; }

/* Slide 6: Summary Hero */
.summary-hero-card {
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 36px;
}

.hero-trophy { font-size: 4rem; color: var(--gold-color); margin-bottom: 12px; animation: bounce 2s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.summary-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.sum-box {
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: left;
  border: 1px solid var(--card-border);
}

.sum-box i { font-size: 1.5rem; margin-bottom: 8px; }

/* App Footer Nav */
.app-footer {
  height: 70px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-dots { display: flex; gap: 10px; }
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: #6366f1;
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--th-glow);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
  .slides-viewport { padding: 12px; }
  .slide-page { inset: 12px; }
  .teacher-stats-grid { grid-template-columns: 1fr; }
}
