/* ==========================================================================
   BrightPath - Master Design System & Responsive Stylesheet
   Theme Modes: Junior (Ages 8-12) & Scholar (Ages 13+) | Light & Dark Modes
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Core Brand Tokens */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --secondary: #F59E0B;
  --secondary-hover: #D97706;
  --secondary-light: #FEF3C7;
  --success: #10B981;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --info: #06B6D4;

  /* Surfaces & Neutral Tokens */
  --bg-app: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --border-color: #E2E8F0;
  --border-focus: #4F46E5;
  
  /* Text Tokens */
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  
  /* Geometric Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.25);

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Layout Dimensions */
  --header-height: 68px;
  --sidebar-width: 250px;
  --bottom-nav-height: 64px;
}

/* ==========================================================================
   Dark Mode Surface Overrides
   ========================================================================== */
body.dark-mode {
  --bg-app: #0B0F19;
  --bg-card: #151D2F;
  --bg-sidebar: #111827;
  --border-color: #243048;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --primary-light: #1E1B4B;
  --secondary-light: #362206;
  --success-light: #064E3B;
  --danger-light: #450A0A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

/* ==========================================================================
   Junior Mode (Playful & Tactile for Kids 8-12)
   ========================================================================== */
body.theme-junior {
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-heading: 'Plus Jakarta Sans', cursive, sans-serif;
  letter-spacing: 0.01em;
}

body.theme-junior .badge,
body.theme-junior .btn,
body.theme-junior .card {
  box-shadow: 0 4px 0 rgba(0,0,0,0.06);
}

/* ==========================================================================
   Base CSS Resets & Typography
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  text-decoration: underline;
}

/* Focus Visibility for WCAG 2.1 AA */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Modern Sleek Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 9999px;
  border: 2px solid var(--bg-app);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}

/* Modern Design Accents & Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
}
body.dark-mode .glass-panel {
  background: rgba(21, 29, 47, 0.85);
  border-color: rgba(36, 48, 72, 0.8);
}

.glow-hover {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.glow-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.15), 0 8px 10px -6px rgba(79, 70, 229, 0.1);
}

/* Pulse animation for live indicators */
@keyframes pulseSubtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.05); }
}
.live-pulse {
  animation: pulseSubtle 2.5s infinite ease-in-out;
}

/* ==========================================================================
   App Layout Grid
   ========================================================================== */
#appHeader {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  backdrop-filter: blur(8px);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}
.brand-wrap:hover {
  transform: translateY(-1px);
}
.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 58px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.22));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.dark-mode .brand-logo-img {
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 6px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}
.brand-wrap:hover .brand-logo-img,
.sidebar-brand-card:hover .brand-logo-img {
  transform: scale(1.08) rotate(-2deg);
}
.sidebar-brand-card:hover {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.16) !important;
  transform: translateY(-2px);
}

.header-center-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.header-nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.header-nav-link:hover,
.header-nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pill-streak, .pill-xp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-full);
  cursor: default;
}
.pill-streak {
  background: var(--secondary-light);
  color: #B45309;
}
.pill-xp {
  background: var(--primary-light);
  color: var(--primary);
}

.user-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--primary-light);
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: transform 0.15s ease;
}
.user-avatar-badge:hover {
  transform: scale(1.08);
}

/* App Main Container with Desktop Sidebar */
.app-layout-body {
  display: flex;
  flex: 1;
  width: 100%;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.sidebar-link:hover {
  background: var(--bg-app);
  color: var(--text-main);
  text-decoration: none;
}
.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary);
}
.sidebar-icon {
  font-size: 1.25rem;
}

.app-main-content {
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Mobile Bottom Navigation (Hidden on desktop) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 50;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  gap: 0.2rem;
  font-weight: 600;
}
.mobile-nav-item.active {
  color: var(--primary);
}
.mobile-nav-item span:first-child {
  font-size: 1.3rem;
}

/* ==========================================================================
   Reusable UI Components
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  user-select: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--secondary);
  color: #111827;
}
.btn-secondary:hover {
  background: var(--secondary-hover);
  color: #FFFFFF;
}
.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-ghost:hover {
  background: var(--border-color);
}
.btn-large {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}
.btn-full {
  width: 100%;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-shadow {
  box-shadow: var(--shadow-sm);
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}
.badge-indigo { background: var(--primary-light); color: var(--primary); }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-amber { background: var(--secondary-light); color: #B45309; }

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ==========================================================================
   Landing Page Styles
   ========================================================================== */
.hero-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
  padding: 3rem 0;
}
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: 3.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}
.hero-title span {
  color: var(--primary);
  background: linear-gradient(135deg, #4F46E5 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-cta-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.hero-sandbox-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Persona Switcher Tabs */
.persona-tabs-wrap {
  margin: 3.5rem 0 2rem;
  text-align: center;
}
.persona-tabs-nav {
  display: inline-flex;
  background: var(--border-color);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  gap: 0.35rem;
  margin-bottom: 2rem;
}
.persona-tab-btn {
  border: none;
  background: transparent;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.persona-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.trust-icon {
  font-size: 2rem;
  background: var(--bg-card);
  padding: 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */
.dashboard-resume-banner {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #4338CA 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.resume-banner-text h2 {
  color: #FFFFFF;
  font-size: 1.85rem;
  margin-bottom: 0.4rem;
}
.resume-banner-text p {
  color: #E0E7FF;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.resume-banner-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.progress-bar-shell {
  width: 240px;
  height: 10px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
}
.stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.stat-meta h4 {
  font-size: 1.6rem;
  line-height: 1.1;
}
.stat-meta span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Activity Heatmap Grid */
.heatmap-container {
  margin-bottom: 2rem;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  gap: 5px;
  padding: 1rem 0;
  overflow-x: auto;
}
.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #E2E8F0;
  transition: transform 0.15s ease;
}
body.dark-mode .heatmap-cell { background: #1E293B; }
.heatmap-cell.active-1 { background: #A7F3D0; }
.heatmap-cell.active-2 { background: #34D399; }
.heatmap-cell.active-3 { background: #10B981; }
.heatmap-cell.active-4 { background: #059669; }
.heatmap-cell:hover { transform: scale(1.3); cursor: pointer; }

/* Course & Subject Cards Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.course-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.course-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.course-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--bg-app);
}
.course-meta-row {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Lesson Player Styles
   ========================================================================== */
.lesson-player-container {
  max-width: 820px;
  margin: 0 auto;
}
.lesson-header-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.lesson-content-card {
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.lesson-article-body h1 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}
.lesson-article-body h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
}
.lesson-article-body h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}
.lesson-article-body p {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

/* Code Highlight Block */
.code-block-wrap {
  position: relative;
  background: #0F172A;
  color: #E2E8F0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  overflow-x: auto;
}
.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}
.copy-code-btn:hover { background: rgba(255,255,255,0.25); }

/* Responsive YouTube Video Wrapper */
.video-responsive-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  background: #000000;
}
.video-responsive-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Callout Box */
.lesson-callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  margin: 1.5rem 0;
}
.lesson-callout.warning {
  border-left-color: var(--secondary);
  background: var(--secondary-light);
}

/* Key Takeaways Card */
.takeaways-card {
  background: var(--bg-app);
  border: 1.5px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}
.takeaways-card ul {
  padding-left: 1.5rem;
  margin-top: 0.75rem;
}
.takeaways-card li {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Sticky Lesson Navigation Bar */
.lesson-sticky-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Quiz Engine Styles
   ========================================================================== */
.quiz-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.quiz-header {
  margin-bottom: 1.5rem;
}
.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.quiz-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.quiz-prompt-box {
  margin-bottom: 1.75rem;
}
.quiz-prompt-text {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}
.quiz-hint-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Quiz Option Buttons */
.quiz-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.option-key-pill {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}
.option-label-text {
  flex: 1;
}
.quiz-option-btn.option-selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.quiz-option-btn.option-correct {
  border-color: var(--success);
  background: var(--success-light);
  color: #065F46;
}
.quiz-option-btn.option-wrong {
  border-color: var(--danger);
  background: var(--danger-light);
  color: #991B1B;
}

/* Feedback Drawer */
.quiz-feedback-drawer {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  animation: slideUp 0.25s ease forwards;
}
.feedback-correct {
  background: var(--success-light);
  border-left: 4px solid var(--success);
}
.feedback-wrong {
  background: var(--danger-light);
  border-left: 4px solid var(--danger);
}
.feedback-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}
.feedback-explanation {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Results Dial */
.score-dial-wrap {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}
.score-circle {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 8px solid;
}
.score-passed {
  border-color: var(--success);
  color: var(--success);
}
.score-retry {
  border-color: var(--secondary);
  color: #B45309;
}
.score-number {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-heading);
}
.score-subtext {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.result-actions-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Breakdown Accordion */
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}
.breakdown-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.breakdown-item.item-correct { border-left: 4px solid var(--success); }
.breakdown-item.item-wrong { border-left: 4px solid var(--danger); }
.breakdown-expl {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Confetti Overlay */
.confetti-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ==========================================================================
   Achievements & Badge Grid
   ========================================================================== */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.badge-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
}
.badge-card.badge-locked {
  opacity: 0.5;
  filter: grayscale(1);
}
.badge-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--bg-app);
  border: 2px solid var(--border-color);
}

/* Certificate Preview Container */
.certificate-preview-box {
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Admin Studio Form
   ========================================================================== */
.admin-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Utility Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Breakpoints & 2-Line Mobile Header
   ========================================================================== */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  /* Two-line responsive mobile header: Line 1 = Brand & Action pills, Line 2 = Scrollable nav pills */
  #appHeader {
    height: auto !important;
    min-height: 102px !important;
    padding: 0.55rem 0.85rem 0.35rem 0.85rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.35rem 0 !important;
  }

  .brand-wrap {
    order: 1 !important;
    font-size: 1.15rem !important;
    gap: 0.45rem !important;
    flex: 0 0 auto !important;
  }

  .header-actions {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex: 0 0 auto !important;
  }

  .header-actions .pill-streak,
  .header-actions .pill-xp {
    padding: 0.22rem 0.5rem !important;
    font-size: 0.78rem !important;
    gap: 0.2rem !important;
  }

  .header-actions .btn {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.8rem !important;
  }

  .user-avatar-badge {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.05rem !important;
  }

  /* Line 2: Full-width touch-scrollable navigation pills */
  .header-center-nav {
    order: 3 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 0.4rem !important;
    padding: 0.45rem 0 0.2rem 0 !important;
    margin-top: 0.25rem !important;
    border-top: 1px solid var(--border-color) !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .header-center-nav::-webkit-scrollbar {
    display: none !important;
  }

  .header-nav-link {
    flex-shrink: 0 !important;
    font-size: 0.82rem !important;
    padding: 0.32rem 0.75rem !important;
    border-radius: 9999px !important;
    background: var(--bg-app) !important;
    border: 1px solid var(--border-color) !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
  }

  .header-nav-link:hover,
  .header-nav-link.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
  }

  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .app-sidebar {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
  .app-main-content {
    padding: 1.25rem 0.85rem 5.5rem 0.85rem !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 480px) {
  #appHeader {
    padding: 0.45rem 0.5rem 0.3rem 0.5rem !important;
    min-height: 96px !important;
  }
  .brand-wrap {
    font-size: 1.02rem !important;
  }
  .brand-wrap .badge {
    font-size: 0.58rem !important;
    padding: 1px 5px !important;
  }
  .header-actions {
    gap: 0.2rem !important;
  }
  .header-actions .btn-ghost {
    padding: 0.22rem 0.4rem !important;
    font-size: 0.74rem !important;
  }
  .header-actions .pill-streak,
  .header-actions .pill-xp {
    font-size: 0.72rem !important;
    padding: 0.18rem 0.38rem !important;
  }
  .mobile-bottom-nav {
    padding: 0 0.2rem !important;
    height: 58px !important;
  }
  .mobile-nav-item {
    font-size: 0.68rem !important;
    gap: 0.1rem !important;
  }
  .mobile-nav-item span:first-child {
    font-size: 1.15rem !important;
  }
}

/* PYQ Exam & Subject Filters & Cards */
.pyq-exam-pill, .pyq-subj-pill {
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}
.pyq-exam-pill.active, .pyq-subj-pill.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
}
.pyq-item-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pyq-item-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ==========================================================================
   Google Sign-In Components & Modal Styles
   ========================================================================== */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #FFFFFF;
  color: #3C4043;
  border: 1.5px solid #DADCE0;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  font-family: 'Roboto', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(60,64,67,0.08);
  width: 100%;
  user-select: none;
}
.btn-google:hover {
  background: #F8F9FA;
  border-color: #D2E3FC;
  box-shadow: 0 2px 6px rgba(60,64,67,0.15);
  transform: translateY(-1px);
}
body.dark-mode .btn-google {
  background: #1F2937;
  color: #F9FAFB;
  border-color: #374151;
}
body.dark-mode .btn-google:hover {
  background: #374151;
}

.google-auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.google-auth-divider::before,
.google-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.google-auth-divider:not(:empty)::before {
  margin-right: .75em;
}
.google-auth-divider:not(:empty)::after {
  margin-left: .75em;
}

.google-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.google-modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.04);
}
body.dark-mode .google-modal-card {
  background: #1E293B;
  color: #F8FAFC;
}
.google-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.google-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #9CA3AF;
  cursor: pointer;
  line-height: 1;
}
.google-modal-close:hover {
  color: #111827;
}
.google-modal-body {
  padding: 1.5rem;
}
.google-account-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}
.google-account-btn:hover {
  border-color: #4285F4;
  background: var(--bg-app);
  transform: translateY(-1px);
}
.google-avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EEF2FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.google-clientid-toggle {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}
.google-clientid-toggle:hover {
  color: var(--primary);
}

@keyframes googleSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}
.google-spinner {
  animation: googleSpin 1.2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Subject Switcher & Grace Period Lock Styles
   ========================================================================== */
.dashboard-subject-switcher-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.subject-switcher-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.subject-switcher-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.subject-switcher-chip:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.subject-switcher-chip.active {
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  font-weight: 700;
}

.chip-active-dot {
  font-size: 0.75rem;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  margin-left: 0.25rem;
  letter-spacing: 0.5px;
}

.grace-period-banner {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 1.5px solid #C7D2FE;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

body.dark-mode .grace-period-banner {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  border-color: #4338CA;
  color: #E0E7FF;
}

/* Mandatory Profile Modal Lock */
.mandatory-profile-container {
  max-width: 680px;
  margin: 2rem auto;
}

.mandatory-profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-glow);
  border: 2px solid var(--primary);
}

.mandatory-badge-lock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: #FEE2E2;
  color: #DC2626;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

body.dark-mode .mandatory-badge-lock {
  background: #7F1D1D;
  color: #FCA5A5;
}

/* =========================================================================
   2-STEP VERIFICATION (2FA) & SECURITY TOASTS
   ========================================================================= */
.pin-box {
  width: 46px;
  height: 52px;
  text-align: center;
  font-family: monospace;
  font-size: 1.6rem;
  font-weight: 800;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: all 0.15s ease;
}

.pin-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

.security-toast-card {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 420px;
  width: calc(100% - 40px);
  background: #ffffff;
  border: 1.5px solid #c7d2fe;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 35px -10px rgba(67, 56, 202, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  z-index: 10000;
  transform: translateY(-30px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.security-toast-card.visible {
  transform: translateY(0);
  opacity: 1;
}

body.dark-mode .security-toast-card {
  background: #1e1b4b;
  border-color: #4338ca;
  color: #f8fafc;
}

/* =========================================================================
   24/7 MULTIMODAL AI TUTOR ("SPARKY")
   ========================================================================= */
.tutor-fab {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 1000003 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.75rem 1.35rem !important;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%) !important;
  color: #ffffff !important;
  border-radius: var(--radius-full) !important;
  border: 2px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.25) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}

.tutor-fab:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.65), 0 0 0 3px rgba(255, 255, 255, 0.4) !important;
}

.tutor-fab-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.tutor-fab-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tutor-fab-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: #10B981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: tutorPulse 2s infinite;
}

@keyframes tutorPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tutor Drawer Window */
.tutor-drawer {
  position: fixed;
  bottom: 85px;
  right: 24px;
  width: 490px;
  max-width: calc(100vw - 32px);
  height: 660px;
  max-height: calc(100vh - 105px);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 22px;
  box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 1000005;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutor-drawer.open {
  transform: translateY(0) scale(1) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  z-index: 1000005 !important;
}

.sidebar-tutor-bottom-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.6) !important;
}

.sidebar-tutor-bottom-btn:active {
  transform: translateY(0);
}

.tutor-engine-scroll {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 2px 0;
  flex: 1;
  min-width: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch;
}

.tutor-engine-scroll::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Header */
.tutor-header {
  padding: 0.9rem 1.15rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tutor-avatar-icon {
  font-size: 1.6rem;
  line-height: 1;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

.tutor-head-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tutor-head-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Multi-Model Switcher Bar */
.tutor-model-bar {
  padding: 0.45rem 0.85rem;
  background: #0b0f19;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: nowrap;
  overflow: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.tutor-model-bar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.tutor-model-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tutor-model-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.tutor-model-pill.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #ffffff !important;
  border-color: #a5b4fc !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* Pro Generators Bar */
.tutor-pro-bar {
  padding: 0.5rem 0.85rem;
  background: linear-gradient(90deg, rgba(30, 27, 75, 0.95), rgba(49, 46, 129, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch;
}

.tutor-pro-bar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.tutor-pro-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tutor-pro-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Chips Bar */
.tutor-chips-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0.85rem;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch;
}

.tutor-chips-bar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.tutor-chip {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tutor-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Messages Feed */
.tutor-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tutor-msg {
  max-width: 88%;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

.tutor-msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.tutor-msg-bot {
  align-self: flex-start;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.tutor-inline-code {
  font-family: monospace;
  font-size: 0.82rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.tutor-msg-user .tutor-inline-code {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tutor-code-block {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 0.75rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.82rem;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.tutor-answer-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #86efac;
}

body.dark-mode .tutor-answer-badge {
  background: #064e3b;
  color: #a7f3d0;
  border-color: #059669;
}

.tutor-bullet {
  margin-left: 0.5rem;
  margin-top: 0.25rem;
}

/* Attachment Bar */
.tutor-attachment-bar {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.dark-mode .tutor-attachment-bar {
  background: #1e293b;
}

/* Dropzone Overlay */
.tutor-drop-overlay {
  position: absolute;
  top: 60px;
  bottom: 75px;
  left: 0;
  right: 0;
  background: rgba(79, 70, 229, 0.92);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 3px dashed #ffffff;
}

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

/* Input Footer */
.tutor-footer {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.tutor-attach-btn {
  font-size: 1.25rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-app);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tutor-attach-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.tutor-input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--bg-app);
  color: var(--text-main);
  resize: none;
  outline: none;
  height: 42px;
  min-height: 42px;
  max-height: 90px;
  line-height: 1.4;
  overflow-y: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  transition: border-color 0.15s ease;
}

.tutor-input::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.tutor-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.tutor-send-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}

.tutor-send-btn:hover {
  transform: scale(1.05);
  background: var(--primary-hover);
}

.tutor-dot-pulse {
  width: 8px;
  height: 8px;
  background: #4F46E5;
  border-radius: 50%;
  animation: tutorPulse 1s infinite alternate;
}

/* Tutor Welcome Screen & Action Tiles */
.tutor-welcome-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0.25rem;
}

.tutor-welcome-hero {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.12));
  border: 1.5px solid rgba(79, 70, 229, 0.25);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tutor-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.tutor-action-tile {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 0.85rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.tutor-action-tile:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.18);
  background: var(--primary-light);
}

.tutor-action-tile-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.tutor-action-tile-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-main);
}

.tutor-action-tile-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

@media (max-width: 600px) {
  .tutor-drawer {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 80px;
    height: 520px;
  }
  .tutor-fab {
    bottom: 74px;
    right: 16px;
    padding: 0.65rem 1rem;
  }
}

/* =========================================================================
   APP-FEEL, PWA INSTALL, NCERT & OLYMPIAD UI ENHANCEMENTS
   ========================================================================= */
.badge-emerald {
  background: rgba(5, 150, 105, 0.15);
  color: #059669;
  font-weight: 700;
}

body.dark-mode .badge-emerald {
  background: rgba(5, 150, 105, 0.3);
  color: #6EE7B7;
}

.pulse-glow {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

/* Touch Active States for Native App Feel */
button:active, 
.btn:active, 
.card-hover:active, 
.sidebar-link:active, 
.mobile-nav-item:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s ease !important;
}

/* NCERT & Harvard Chapter Lists */
.ncert-class-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ncert-class-card:hover {
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.12);
}

.ncert-filter-pill {
  border-radius: 9999px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

/* PWA App Install Button */
.app-install-btn {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35) !important;
  transition: all 0.2s ease !important;
}

.app-install-btn:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5) !important;
}

/* =========================================================================
   BRIGHTPATH PRO: 3-PAGE STUDY GUIDES, MOCK PAPERS & DAILY DPPS
   ========================================================================= */

/* 3-Page Notes Cards */
.pro-page-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.pro-page-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.pro-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pro-page-badge.page-1 {
  background: rgba(79, 70, 229, 0.12);
  color: #4338CA;
  border: 1px solid rgba(79, 70, 229, 0.3);
}
.pro-page-badge.page-2 {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.pro-page-badge.page-3 {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Mock Papers Subjective Hub */
.mock-paper-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}
.mock-paper-card:hover {
  box-shadow: var(--shadow-lg);
}
.mock-question-box {
  background: rgba(79, 70, 229, 0.03);
  border: 1.5px solid rgba(79, 70, 229, 0.18);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
}
.answer-scratchpad {
  width: 100%;
  min-height: 120px;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  margin-top: 0.75rem;
  transition: border-color 0.2s ease;
}
.answer-scratchpad:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.marking-step-card {
  background: #ffffff;
  border-left: 4px solid #10B981;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
body.dark-mode .marking-step-card {
  background: #1E293B;
}
.model-answer-box {
  background: #0F172A;
  color: #F8FAFC;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid #334155;
  margin-top: 0.75rem;
}

/* Daily Practice Problems (DPP) Hub */
.dpp-day-pill {
  border-radius: 9999px !important;
  padding: 0.5rem 1.15rem !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease !important;
  border: 1.5px solid var(--border-color) !important;
}
.dpp-day-pill.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35) !important;
}
.dpp-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #FEF3C7;
  color: #92400E;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-weight: 800;
  font-family: var(--font-mono);
  border: 1.5px solid #F59E0B;
}
.dpp-question-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.dpp-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1.15rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 0.65rem;
  transition: all 0.15s ease;
}
.dpp-option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateX(4px);
}
.dpp-option-btn.selected-correct {
  border-color: #10B981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #065F46 !important;
  font-weight: 700;
}
.dpp-option-btn.selected-incorrect {
  border-color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #991B1B !important;
  font-weight: 700;
}
.dpp-explanation-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
}
.dpp-hint-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: #92400E;
}

/* ==========================================================================
   High-Performance Rendering & Zero-Lag DOM Optimization
   Uses content-visibility: auto to skip offscreen layout calculations
   ========================================================================== */
.ncert-class-card,
.pro-page-card,
.mock-paper-card,
.olympiad-track-card,
.dpp-day-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 380px;
}

.header-nav-link {
  white-space: nowrap !important;
}

.ncert-filter-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0.42rem 0.95rem;
  cursor: pointer;
}

.ncert-filter-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ncert-filter-pill.active {
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
}

/* 2FA PIN Boxes & Google Sign-In Modal */
.google-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 999999;
}

.google-modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card, #ffffff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.pin-box {
  width: 44px;
  height: 52px;
  font-size: 1.6rem;
  text-align: center;
  border: 2px solid var(--border-color, #cbd5e1);
  border-radius: 10px;
  font-family: monospace;
  font-weight: 800;
  background: var(--bg-app, #f8fafc);
  color: var(--text-main, #1e293b);
  transition: all 0.15s ease;
  outline: none;
}

.pin-box:focus {
  border-color: #4F46E5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  transform: translateY(-2px);
}

/* Google Security Toast Alert */
.security-toast-card {
  position: fixed;
  top: 24px;
  right: 24px;
  max-width: 400px;
  background: #ffffff;
  color: #1e1b4b;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(79, 70, 229, 0.2);
  z-index: 1000000;
  border-left: 5px solid #4F46E5;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.security-toast-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* First-Time Welcome Modal */
.first-time-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000001;
}

.first-time-modal-card {
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card, #ffffff);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  position: relative;
  border: 1.5px solid var(--border-color, #e2e8f0);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================================
   {AI LEARNING}

.ai-cockpit-canvas {
  width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: visible !important;
  box-sizing: border-box;
}

/* Cockpit Header */
.ai-cockpit-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  border-radius: 18px;
  padding: 1.25rem 1.6rem;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(30, 27, 75, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ai-cockpit-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

/* Cockpit Toolbar */
.ai-cockpit-toolbar {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.ai-select {
  background: var(--bg-surface, #f8fafc);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.ai-select:focus {
  border-color: var(--primary);
}

/* Mode Tabs */
.ai-cockpit-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ai-cockpit-tabs::-webkit-scrollbar {
  display: none;
}

.ai-tab-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ai-tab-btn:hover {
  border-color: rgba(79, 70, 229, 0.4);
  color: var(--text-main);
}

.ai-tab-btn.active {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

@keyframes wavePulse {
  0% { height: 6px; }
  50% { height: 28px; }
  100% { height: 14px; }
}

/* Notes View Card */
.ai-notes-content-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  line-height: 1.6;
}

.notes-h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4338ca;
  margin: 1.25rem 0 0.5rem 0;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.notes-p {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.85rem;
}

.notes-highlight-box {
  background: rgba(79, 70, 229, 0.08);
  border-left: 4px solid #4f46e5;
  padding: 0.85rem 1.15rem;
  border-radius: 4px;
  font-size: 0.92rem;
  margin: 0.85rem 0;
}

.notes-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.notes-table th,
.notes-table td {
  border: 1px solid var(--border-color);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.notes-table th {
  background: var(--bg-surface, #f8fafc);
  color: var(--text-main);
  font-weight: 700;
}

.notes-ul {
  padding-left: 1.4rem;
  font-size: 0.92rem;
}

.notes-ul li {
  margin-bottom: 0.5rem;
}

.notes-mnemonic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.notes-mnemonic-card {
  background: rgba(124, 58, 237, 0.06);
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.88rem;
}

/* Exam Paper Card */
.ai-exam-content-card {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  font-family: 'Cambria', 'Georgia', serif;
}

.exam-section-card {
  margin-bottom: 2rem;
}

.exam-sec-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  background: #f1f5f9;
  padding: 0.5rem 0.85rem;
  border-left: 4px solid #0ea5e9;
  margin-bottom: 1rem;
}

.exam-q-box {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #e2e8f0;
}

.exam-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.4rem;
  margin: 0.6rem 0 0 1rem;
  font-size: 0.92rem;
}

.exam-marking-scheme {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: #166534;
  margin-top: 0.65rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* CBT Mock Simulator Card */
.ai-mock-header-card {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 16px;
  padding: 1.25rem 1.6rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.ai-mock-q-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.ai-mock-opt-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-surface, #f8fafc);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.ai-mock-opt-label:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.3);
}

/* =========================================================================
   FOUR-DIRECTIONAL (UP, DOWN, LEFT, RIGHT) SCROLLING & SLEEK SCROLLBARS
   ========================================================================= */
.ai-cockpit-canvas,
.ai-notes-view,
.ai-notes-content-card,
.ai-exam-content-card{
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #6366f1 rgba(15, 23, 42, 0.1);
}

/* Custom modern scrollbars across AI Learning */
.ai-cockpit-canvas::-webkit-scrollbar,
.ai-notes-content-card::-webkit-scrollbar,
.ai-exam-content-card::-webkit-scrollbar{
  width: 7px;
  height: 7px;
}
.ai-cockpit-canvas::-webkit-scrollbar-track,
.ai-notes-content-card::-webkit-scrollbar-track,
.ai-exam-content-card::-webkit-scrollbar-track{
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
}
.ai-cockpit-canvas::-webkit-scrollbar-thumb,
.ai-notes-content-card::-webkit-scrollbar-thumb,
.ai-exam-content-card::-webkit-scrollbar-thumb{
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 999px;
}
.ai-cockpit-canvas::-webkit-scrollbar-thumb:hover,
.ai-notes-content-card::-webkit-scrollbar-thumb:hover,
.ai-exam-content-card::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(135deg, #6366f1, #9333ea);
}

/* =========================================================================
   LINGOPATH DUOLINGO-STYLE INTERACTIVE IMMERSION
   ========================================================================= */
@keyframes bpPop {
  0% { transform: scale(0.92); opacity: 0; }
  60% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.lingo-unit-node {
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  border-bottom-width: 8px !important;
}

.lingo-unit-node:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(1.08);
}

.lingo-unit-node:active:not(:disabled) {
  transform: translateY(3px) scale(0.97);
  border-bottom-width: 3px !important;
}

.sentence-chip {
  background: var(--bg-card, #ffffff);
  border: 2px solid var(--border-color, #e2e8f0);
  border-bottom: 4px solid var(--border-color, #cbd5e1);
  border-radius: 9999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main, #0f172a);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sentence-chip:hover {
  transform: translateY(-2px);
  border-color: #4F46E5;
  background: rgba(79, 70, 229, 0.05);
}

.sentence-chip:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}




