/* ==========================================================================
   ANNA UNIVERSITY COMPUTER ARCHITECTURE & ORGANIZATION (CAO)
   ULTIMATE MASTER STUDY PLATFORM - DESIGN SYSTEM & STYLESHEET
   Supports: Dark Theme, Light Theme, Glassmorphism, Responsive (Mobile/Desktop),
   Interactive Lab Workbenches, Exam Mode, Study Tools, Print Layout.
   ========================================================================== */

:root {
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  /* Color Palette - Dark Mode Default */
  --bg-base: #0a0d14;
  --bg-surface: #0f1420;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 52, 0.85);
  --bg-glass: rgba(15, 20, 32, 0.7);
  --bg-glass-input: rgba(10, 13, 20, 0.6);
  --bg-subtle: rgba(255, 255, 255, 0.03);

  --border: rgba(99, 102, 241, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-main: #f1f5f9;
  --text-dim: #cbd5e1;
  --text-muted: #8492a6;
  --text-inverse: #0a0d14;

  /* Engineering Accents */
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.2);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.2);

  /* Module Theme Colors */
  --mod-1-color: #06b6d4; /* Cyan */
  --mod-2-color: #6366f1; /* Indigo */
  --mod-3-color: #10b981; /* Emerald */
  --mod-4-color: #f59e0b; /* Amber */
  --mod-5-color: #8b5cf6; /* Violet */

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);

  /* Dimensions & Spacing */
  --header-height: 64px;
  --sidebar-width: 290px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-input: rgba(241, 245, 249, 0.8);
  --bg-subtle: rgba(0, 0, 0, 0.02);

  --border: rgba(99, 102, 241, 0.16);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);

  --text-main: #0f172a;
  --text-dim: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 16px rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scroll progress */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo), var(--accent-violet));
  z-index: 1000;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Top App Header */
#top-bar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 2px 10px var(--accent-cyan-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--accent-indigo);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-indigo), #4f46e5);
  box-shadow: 0 2px 8px var(--accent-indigo-glow);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-trigger-btn:hover {
  border-color: var(--accent-indigo);
  color: var(--text-main);
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-dim);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--border-subtle);
  color: var(--text-main);
  border-color: var(--border);
}

/* Mobile Drawer Hamburger */
.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   App Layout
   ========================================================================== */
#app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  position: relative;
}

/* Sidebar Navigation */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem 0.85rem;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  scrollbar-width: thin;
}

#sidebar::-webkit-scrollbar {
  width: 5px;
}
#sidebar::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 10px;
}

.sidebar-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1.2rem 0.6rem 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-link:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
  transform: translateX(2px);
}

.sidebar-link.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-left: 3px solid var(--accent-indigo);
  font-weight: 600;
}

.badge-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}
.badge-sim { background: rgba(6, 182, 212, 0.18); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-exam { background: rgba(245, 158, 11, 0.18); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-quiz { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }

/* Main Content Area */
#main-content {
  flex: 1;
  max-width: 100%;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  background-color: var(--bg-base);
}

.view-section {
  display: none;
}
.view-section.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Hero & Dashboard
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 780px;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-main);
}
.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), #4f46e5);
  border: 1px solid var(--accent-indigo);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--accent-indigo-glow);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

/* Module Grid */
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 1.25rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.module-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color, var(--accent-indigo));
}

.mod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.mod-num-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--card-color, var(--accent-cyan));
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: 4px;
}

.mod-hours {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mod-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.mod-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.mod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mod-link-action {
  font-weight: 600;
  color: var(--card-color, var(--accent-indigo));
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Lesson Reader Styles (Academic Rigor & Visual Elegance)
   ========================================================================== */
.lesson-container {
  max-width: 980px;
  margin: 0 auto;
}

.lesson-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.lesson-breadcrumbs a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.lesson-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.lesson-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.lesson-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lesson-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pedagogical Callout Boxes */
.pedagogy-box {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  border-left: 4px solid;
}

.box-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Formal Definition */
.def-box {
  background: rgba(6, 182, 212, 0.06);
  border-left-color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-left-width: 4px;
}
.def-box .box-label { color: var(--accent-cyan); }
.def-box p { font-size: 0.98rem; font-weight: 500; color: var(--text-main); }

/* Simple English Explanation */
.simple-box {
  background: rgba(99, 102, 241, 0.06);
  border-left-color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-left-width: 4px;
}
.simple-box .box-label { color: var(--accent-indigo); }

/* Prerequisite Box */
.prereq-box {
  background: rgba(245, 158, 11, 0.06);
  border-left-color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-left-width: 4px;
}
.prereq-box .box-label { color: var(--accent-amber); }

/* Common Mistakes / Pitfalls */
.pitfall-box {
  background: rgba(244, 63, 94, 0.06);
  border-left-color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.18);
  border-left-width: 4px;
}
.pitfall-box .box-label { color: var(--accent-rose); }

/* Step-by-step working principle list */
.step-list {
  list-style: none;
  counter-reset: step-counter;
  margin: 1.25rem 0;
}

.step-item {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.1rem;
}

.step-item::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--accent-indigo);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

/* Worked Numerical Solutions Box */
.num-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-sm);
}

.num-header {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-amber);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.num-section {
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
}

.num-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.num-calc-step {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin: 4px 0;
}

.num-result {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* Diagram Cards */
.diagram-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.diagram-header {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diagram-svg-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.diagram-svg-wrap svg {
  max-width: 100%;
  height: auto;
}

.diagram-caption {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: left;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* Examination Answer Blocks (2M, 8M, 16M) */
.exam-answer-accordion {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.exam-accordion-header {
  background: var(--bg-surface);
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.exam-accordion-header:hover {
  background: var(--bg-card-hover);
}

.exam-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.exam-tag-2m { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.exam-tag-8m { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.exam-tag-16m { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.exam-accordion-body {
  padding: 1.5rem;
  display: none;
}
.exam-accordion-body.open {
  display: block;
}

/* Lesson Navigation Footer */
.lesson-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  margin-top: 3rem;
}

/* ==========================================================================
   Interactive Simulators Lab Workbenches
   ========================================================================== */
.sim-workbench {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
}

.sim-header {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sim-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.sim-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.sim-controls-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.sim-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

.sim-btn-run {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  border: none;
  color: #fff;
}
.sim-btn-run:hover {
  box-shadow: 0 0 12px var(--accent-emerald-glow);
}

.sim-body-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 480px;
}

.sim-config-panel {
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sim-config-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: block;
}

.sim-input, .sim-select {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.sim-input:focus, .sim-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.sim-visual-workspace {
  padding: 1.5rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
}

.sim-log-panel {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  max-height: 180px;
  overflow-y: auto;
}

.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.sim-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-cyan);
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.sim-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-dim);
}

/* ==========================================================================
   Examination Hall & Question Bank
   ========================================================================== */
.exam-vault-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.5rem;
  align-items: center;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--border);
  color: var(--text-main);
}

.filter-chip.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent-indigo);
  color: #fff;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.question-card:hover {
  border-color: var(--border);
}

.question-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
}

.question-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.answer-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.question-answer-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
  display: none;
}
.question-answer-box.open {
  display: block;
}

/* Examination Mode Active Window */
.exam-active-timer-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exam-timer-display {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-rose);
}

/* ==========================================================================
   Study Tools: Pomodoro, Flashcards, Planner
   ========================================================================== */
.pomodoro-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 450px;
  margin: 2rem auto;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.timer-circle-wrap {
  width: 200px;
  height: 200px;
  margin: 1.5rem auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-time {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Flashcards 3D Container */
.flashcard-scene {
  width: 100%;
  max-width: 540px;
  height: 320px;
  margin: 2rem auto;
  perspective: 1000px;
}

.flashcard {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.flashcard.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}

.flashcard-back {
  transform: rotateY(180deg);
  background: var(--bg-surface);
  border-color: var(--accent-indigo);
}

/* ==========================================================================
   Modals & Command Palette
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal-overlay.open {
  display: flex;
}

.cmd-palette-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 640px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.cmd-input-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.cmd-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}

.cmd-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.cmd-item {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  transition: var(--transition);
}

.cmd-item:hover, .cmd-item.selected {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-main);
}

/* ==========================================================================
   Mobile Bottom Navigation & Responsiveness
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  gap: 3px;
  flex: 1;
  height: 100%;
}

.bottom-nav-item.active {
  color: var(--accent-cyan);
}

.bottom-nav-icon {
  font-size: 18px;
}

@media (max-width: 992px) {
  #sidebar {
    display: none;
  }
  #sidebar.mobile-open {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-height) - 60px);
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .mobile-menu-btn {
    display: flex;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  #main-content {
    padding: 1.25rem 1rem 5rem;
  }
  .nav-tabs {
    display: none;
  }
  .sim-body-grid {
    grid-template-columns: 1fr;
  }
  .sim-config-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

/* ==========================================================================
   Print Optimization (@media print)
   ========================================================================== */
@media print {
  #top-bar, #sidebar, .mobile-bottom-nav, .sim-workbench, .btn-primary, .btn-secondary, .exam-active-timer-bar, .modal-overlay {
    display: none !important;
  }
  body, #main-content {
    background: #fff !important;
    color: #000 !important;
    padding: 0 !important;
  }
  .lesson-container {
    max-width: 100% !important;
  }
  .pedagogy-box, .num-box, .diagram-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   Update Notification Popup Modal (First-time visitor) - Mobile Perfect
   ========================================================================== */
.update-popup-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 660px;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(14, 165, 233, 0.3);
  padding: 26px;
  margin: auto;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  touch-action: pan-y;
}

.update-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.update-popup-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 9999px;
  padding: 4px 12px;
}

.update-popup-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all var(--transition-fast);
  touch-action: manipulation;
  margin-right: -8px;
}
.update-popup-close-btn:hover,
.update-popup-close-btn:active {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.update-popup-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.update-popup-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.update-features-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.update-feature-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  align-items: flex-start;
  transition: border-color var(--transition-fast);
}
.update-feature-card:hover {
  border-color: var(--accent-cyan);
}

.update-feature-icon {
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
}

.update-feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.update-feature-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.48;
}

.update-popup-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.update-popup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.update-popup-actions button {
  min-height: 44px;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  cursor: pointer;
}

.update-popup-dismiss-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  align-self: center;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  transition: color var(--transition-fast);
  touch-action: manipulation;
}
.update-popup-dismiss-link:hover,
.update-popup-dismiss-link:active {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-start;
  }

  .update-popup-box {
    padding: 18px 14px;
    border-radius: var(--radius-lg);
    max-height: calc(100vh - 1rem);
    margin: auto 0;
  }

  .update-popup-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .update-popup-title {
    font-size: 1.15rem;
    margin-bottom: 6px;
  }

  .update-popup-desc {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }

  .update-features-grid {
    gap: 10px;
    margin-bottom: 16px;
  }

  .update-feature-card {
    padding: 10px;
    gap: 10px;
  }

  .update-feature-icon {
    font-size: 18px;
    padding: 5px;
  }

  .update-feature-title {
    font-size: 0.88rem;
  }

  .update-feature-text {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .update-popup-actions {
    flex-direction: column;
    gap: 8px;
  }

  .update-popup-actions button {
    width: 100%;
    min-height: 48px;
    font-size: 0.92rem;
  }

  .update-popup-dismiss-link {
    font-size: 0.82rem;
  }
}

/* Extra small mobile (320px - 360px) & Landscape Mobile */
@media (max-width: 380px), (max-height: 520px) {
  .update-popup-box {
    padding: 14px 10px;
  }
  .update-popup-title {
    font-size: 1.05rem;
  }
  .update-popup-desc {
    display: none; /* Hide subtitle in ultra-compact landscape mode to keep action buttons in view immediately */
  }
}


/* ==========================================================================
   PERSONAL TUTOR EXPERIENCE: 7-STEP LEARNING ENGINE & INTERACTIVE CHECKPOINTS
   ========================================================================== */

.tutor-stepper-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  position: sticky;
  top: 70px;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
}

.tutor-stepper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.tutor-stepper-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tutor-mode-pills {
  display: flex;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  gap: 4px;
}

.tutor-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tutor-mode-btn.active {
  background: var(--accent-cyan);
  color: #030712;
  font-weight: 700;
}

.tutor-step-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.tutor-step-pill {
  flex: 1;
  min-width: 120px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tutor-step-pill:hover {
  border-color: var(--accent-cyan);
  color: var(--text-main);
  transform: translateY(-1px);
}

.tutor-step-pill.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.tutor-step-pill.completed {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.tutor-progress-line {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.tutor-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  transition: width 0.3s ease;
}

/* Personal Tutor Voice Banner */
.tutor-voice-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-left: 5px solid var(--accent-indigo);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 24px;
}

.tutor-voice-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-indigo);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.tutor-voice-text {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-main);
}

/* Everyday Analogy Box */
.analogy-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(234, 88, 12, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
}

.analogy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.analogy-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.analogy-story {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.analogy-connection {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-amber);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Simulator Bridge Callout */
.sim-bridge-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid var(--accent-emerald);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sim-bridge-info h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.sim-bridge-info p {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 0;
}

.sim-bridge-btn {
  background: var(--accent-emerald);
  color: #030712;
  border: none;
  font-weight: 800;
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sim-bridge-btn:hover {
  background: #34d399;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Interactive Checkpoint Cards */
.checkpoint-container {
  margin: 28px 0;
}

.checkpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.checkpoint-level-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.checkpoint-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 16px;
}

.checkpoint-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkpoint-opt-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.checkpoint-opt-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  color: var(--text-main);
  background: rgba(6, 182, 212, 0.05);
}

.checkpoint-opt-btn.opt-correct {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--accent-emerald) !important;
  color: #34d399 !important;
  font-weight: 600;
}

.checkpoint-opt-btn.opt-wrong {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--accent-rose) !important;
  color: #f87171 !important;
}

.checkpoint-feedback {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

.checkpoint-feedback.feedback-correct {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--accent-emerald);
  color: var(--text-main);
}

.checkpoint-feedback.feedback-wrong {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--accent-rose);
  color: var(--text-main);
}

/* Bottom Step Navigation */
.tutor-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.tutor-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tutor-nav-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.tutor-nav-btn.primary {
  background: var(--accent-cyan);
  color: #030712;
  border-color: var(--accent-cyan);
}

.tutor-nav-btn.primary:hover {
  background: #22d3ee;
  transform: translateX(2px);
}
