/* ============================================
   CBT MASTER — Design System
   Dark Glassmorphism + Vibrant Accents
   ============================================ */

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

/* ===== Aura Design Tokens (HSL Based) ===== */
:root {
  /* Core Palette */
  --aura-bg: #020617;
  --aura-surface: #0f172a;
  --aura-glass: hsla(222, 47%, 11%, 0.7);
  --aura-glass-bright: hsla(222, 47%, 15%, 0.4);
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-secondary: #1e293b;
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.05);

  /* Accents */
  --accent-blue: #38bdf8;
  --accent-blue-glow: rgba(56, 189, 248, 0.4);
  --accent-purple: #818cf8;
  --accent-purple-glow: rgba(129, 140, 248, 0.4);
  --accent-emerald: #34d399;
  --accent-emerald-glow: rgba(52, 211, 153, 0.4);
  --accent-red: #fb7185;
  --accent-red-glow: rgba(251, 113, 133, 0.4);
  --accent-amber: #fbbf24;
  --accent-amber-glow: rgba(251, 191, 36, 0.4);
  --accent-pink: #ec4899;
  --accent-pink-glow: rgba(236, 72, 153, 0.4);
  --accent-teal: #2dd4bf;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #38bdf8, #818cf8);
  --gradient-success: linear-gradient(135deg, #34d399, #2dd4bf);
  --gradient-danger: linear-gradient(135deg, #fb7185, #ef4444);
  --gradient-accent: linear-gradient(135deg, #818cf8, #ec4899);
  --gradient-warm: linear-gradient(135deg, #fbbf24, #f97316);

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --text-muted: #475569;

  /* Borders & Depth */
  --aura-border: hsla(0, 0%, 100%, 0.08);
  --aura-border-bright: hsla(0, 0%, 100%, 0.15);
  --aura-inner-glow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.05);
  --border-color: hsla(0, 0%, 100%, 0.08);

  /* Radii & Transitions */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  /* Elite Exam Tokens */
  --elite-q-gradient: linear-gradient(135deg, var(--accent-blue) 0%, #f8fafc 50%, var(--accent-purple) 100%);
  --elite-opt-glow: 0 0 15px rgba(56, 189, 248, 0.2);
  --elite-glow-green: radial-gradient(circle at center, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  --elite-glow-amber: radial-gradient(circle at center, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
  --elite-glow-red: radial-gradient(circle at center, rgba(239, 68, 68, 0.12) 0%, transparent 70%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-premium: 0 0 0 1px var(--aura-border), 0 20px 40px -10px rgba(0, 0, 0, 0.5);

  /* V66 Physics (Default Values) */
  --glass-blur: 16px;
  --glass-opacity: 0.7;
  --nebula-speed: 25s;
  --custom-accent: #38bdf8;

  /* V67 Radiant Physics */
  --glow-power: 0.5;
  --text-glow: 0 0 calc(8px * var(--glow-power)) var(--accent-blue-glow);
  --section-glow: 0 0 calc(20px * var(--glow-power)) var(--accent-blue-glow);
}

/* ===== Solar Gold (Radiant Amber Light) ===== */
[data-theme="solar-gold"] {
  --aura-bg: #fffbf0;
  --aura-surface: #fffefb;
  --bg-primary: #fff9e6;
  --accent-blue: #f59e0b;
  --accent-purple: #fbbf24;
  --text-primary: #78350f;
  --text-secondary: #92400e;
  --aura-glass: rgba(255, 255, 255, 0.85);
  --aura-border: rgba(245, 158, 11, 0.15);
  --accent-blue-glow: rgba(245, 158, 11, 0.3);
}

/* ===== Sky Breeze (Radiant Cyan Light) ===== */
[data-theme="sky-breeze"] {
  --aura-bg: #f0f9ff;
  --aura-surface: #fdfefe;
  --bg-primary: #e0f2fe;
  --accent-blue: #0ea5e9;
  --accent-purple: #22d3ee;
  --text-primary: #0369a1;
  --text-secondary: #075985;
  --aura-glass: rgba(255, 255, 255, 0.85);
  --aura-border: rgba(14, 165, 233, 0.15);
  --accent-blue-glow: rgba(14, 165, 233, 0.3);
}

/* ===== Lavender Mist (Radiant Purple Light) ===== */
[data-theme="lavender-mist"] {
  --aura-bg: #fdf4ff;
  --aura-surface: #fffaff;
  --bg-primary: #f5d0fe;
  --accent-blue: #d946ef;
  --accent-purple: #f0abfc;
  --text-primary: #701a75;
  --text-secondary: #86198f;
  --aura-glass: rgba(255, 255, 255, 0.85);
  --aura-border: rgba(217, 70, 239, 0.15);
  --accent-blue-glow: rgba(217, 70, 239, 0.3);
}

/* ===== Mint Fresh (Radiant Emerald Light) ===== */
[data-theme="mint-fresh"] {
  --aura-bg: #f0fdf4;
  --aura-surface: #fdfffe;
  --bg-primary: #dcfce7;
  --accent-blue: #10b981;
  --accent-purple: #34d399;
  --text-primary: #064e3b;
  --text-secondary: #065f46;
  --aura-glass: rgba(255, 255, 255, 0.85);
  --aura-border: rgba(16, 185, 129, 0.15);
  --accent-blue-glow: rgba(16, 185, 129, 0.3);
}

/* ===== Custom Theme (V66) ===== */
[data-theme="custom"] {
  --aura-bg: #020617;
  --aura-surface: #0f172a;
  --accent-blue: var(--custom-accent);
  --accent-purple: var(--custom-accent);
  --accent-blue-glow: color-mix(in srgb, var(--custom-accent) 40%, transparent);
  --gradient-primary: linear-gradient(135deg, var(--custom-accent), #818cf8);
}

/* ===== Premium Global Animations ===== */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mesh-flow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes light-sweep {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ===== Elite Pro Max Modals (V29) ===== */
.modal-v29 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  width: 450px;
  padding: 30px !important;
  backdrop-filter: blur(30px) saturate(180%);
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 20px;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Light Theme ===== */
/* ===== Midnight Rose (Deep Purple/Pink Vibrance) ===== */
[data-theme="midnight-rose"] {
  --aura-bg: #0f071a;
  --aura-surface: #1a0b2e;
  --accent-blue: #f472b6;
  --accent-purple: #c084fc;
  --accent-blue-glow: rgba(244, 114, 182, 0.4);
  --gradient-primary: linear-gradient(135deg, #f472b6, #c084fc);
  --shadow-premium: 0 0 25px rgba(192, 132, 252, 0.3);
}

/* ===== Emerald Depths (Rich Green/Teal) ===== */
[data-theme="emerald-depths"] {
  --aura-bg: #020f0a;
  --aura-surface: #062016;
  --accent-blue: #34d399;
  --accent-purple: #2dd4bf;
  --accent-blue-glow: rgba(52, 211, 153, 0.4);
  --gradient-primary: linear-gradient(135deg, #34d399, #2dd4bf);
}

/* ===== Oceanic (Power Blue/Deep Sea) ===== */
[data-theme="oceanic"] {
  --aura-bg: #020c1b;
  --aura-surface: #031e3d;
  --accent-blue: #38bdf8;
  --accent-purple: #0ea5e9;
  --accent-blue-glow: rgba(56, 189, 248, 0.4);
}

/* ===== Cyberpunk (Electric Neon) ===== */
[data-theme="cyberpunk"] {
  --aura-bg: #0c001a;
  --aura-surface: #14002e;
  --accent-blue: #facc15;
  --accent-purple: #e879f9;
  --accent-blue-glow: rgba(250, 204, 21, 0.4);
  --gradient-primary: linear-gradient(135deg, #facc15, #e879f9);
  --text-primary: #fff;
}

/* ===== Light Theme (Pearl White) ===== */
[data-theme="light"] {
  --aura-bg: #f8fafc;
  --aura-surface: #ffffff;
  --aura-glass: rgba(255, 255, 255, 0.82);
  --aura-glass-bright: rgba(255, 255, 255, 0.95);
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(0, 0, 0, 0.04);
  --bg-glass-hover: rgba(0, 0, 0, 0.08);
  --bg-input: rgba(0, 0, 0, 0.05);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --border-color: rgba(0, 0, 0, 0.08);
  --aura-border: rgba(0, 0, 0, 0.06);
  --aura-border-bright: rgba(0, 0, 0, 0.12);
  --aura-inner-glow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --shadow-premium: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 15px 35px -5px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 20% 30%, hsla(217, 80%, 70%, 0.12), transparent 45%),
    radial-gradient(ellipse at 80% 70%, hsla(250, 80%, 70%, 0.1), transparent 45%),
    radial-gradient(ellipse at 50% 50%, hsla(180, 70%, 70%, 0.06), transparent 50%);
  filter: blur(120px);
}

/* ===== Print Styles ===== */
@media print {

  .navbar,
  #main-navbar,
  .chatbot-toggle,
  .chatbot-window,
  .btn,
  button,
  .toast-container,
  .section-header .actions {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .app-container {
    padding: 0 !important;
  }

  .main-content {
    padding: 10px !important;
  }

  .glass-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  .stat-card {
    background: #f5f5f5 !important;
  }

  * {
    color: #000 !important;
  }
}

/* ===== Elite Exam Experience (V82) ===== */
.ambient-glow-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transition: background 2s ease;
  background: var(--elite-glow-green);
}

.progress-pulse-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald-glow);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.elite-question-text {
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--elite-q-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  line-height: 1.4;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
}

.elite-option-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.elite-option-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-blue);
  box-shadow: var(--elite-opt-glow);
  transform: translateX(8px);
}

.elite-option-item.selected {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px var(--accent-blue-glow);
}

.elite-option-label {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--accent-blue);
}

.elite-option-item.selected .elite-option-label {
  background: var(--accent-blue);
  color: #000;
}


/* Elite Focus Mode (V83) */
body.focus-mode .palette-panel,
body.focus-mode .test-header>div:not(:last-child),
body.focus-mode .question-panel>div:first-child>button {
  display: none !important;
}

body.focus-mode .test-body {
  justify-content: center !important;
  padding-top: 5vh;
}

body.focus-mode .question-panel {
  max-width: 900px !important;
  width: 100% !important;
  background: rgba(15, 23, 42, 0.4) !important;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.3) !important;
}

@keyframes elite-pulse {
  0% {
    box-shadow: 0 0 10px var(--accent-blue-glow);
    border-color: var(--accent-blue);
  }

  50% {
    box-shadow: 0 0 25px var(--accent-blue-glow);
    border-color: var(--accent-purple);
  }

  100% {
    box-shadow: 0 0 10px var(--accent-blue-glow);
    border-color: var(--accent-blue);
  }
}

.palette-btn.current {
  animation: elite-pulse 2s infinite ease-in-out !important;
  transform: scale(1.1);
  z-index: 2;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--aura-bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Nebula Aura Background — Multi-layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 25%, hsla(217, 91%, 60%, 0.18), transparent 45%),
    radial-gradient(ellipse at 85% 75%, hsla(250, 91%, 60%, 0.15), transparent 45%),
    radial-gradient(ellipse at 50% 10%, hsla(330, 80%, 55%, 0.08), transparent 40%),
    radial-gradient(ellipse at 70% 40%, hsla(180, 91%, 60%, 0.06), transparent 45%),
    radial-gradient(ellipse at 30% 80%, hsla(280, 80%, 50%, 0.08), transparent 40%);
  filter: blur(100px);
  z-index: -1;
  animation: mesh-flow 25s ease infinite;
  background-size: 200% 200%;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-blue-hover);
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ===== Layout ===== */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Navbar Premium ===== */
.navbar {
  background: var(--nav-bg, rgba(2, 6, 23, 0.82));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--nav-border, rgba(255, 255, 255, 0.06));
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--nav-shadow, 0 4px 24px rgba(0, 0, 0, 0.25));
  transition: background 0.4s, box-shadow 0.4s;
}

.navbar-brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Scrollable nav links container */
.nav-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0px, black 12px, black calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0px, black 12px, black calc(100% - 12px), transparent 100%);
}

.nav-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.navbar-nav {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  width: max-content;
}

.navbar-nav li {
  flex-shrink: 0;
}

.navbar-nav a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
  text-decoration: none;
}

.navbar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
  transform: translateY(-1px);
}

.navbar-nav a.active {
  color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.1);
  font-weight: 600;
}

.navbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

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

.navbar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--aura-border);
  color: var(--text-primary);
  font-size: 1.2rem;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.2s;
  align-items: center;
  justify-content: center;
}

.navbar-toggle:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-blue);
}

/* ===== Light Theme Navbar ===== */
[data-theme="light"] .navbar {
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: rgba(0, 0, 0, 0.06);
  --nav-shadow: 0 1px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .navbar-nav a:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .navbar-nav a.active {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}

[data-theme="light"] .navbar-toggle {
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .navbar-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ===== Aura Glass Card ===== */
.glass-card {
  background: color-mix(in srgb, var(--aura-glass) calc(var(--glass-opacity) * 100%), transparent);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--aura-inner-glow), 0 8px 32px 0 rgba(0, 0, 0, 0.3), var(--section-glow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: none;
  pointer-events: none;
}

.glass-card:hover::before {
  animation: shimmer 0.8s ease forwards;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--aura-border-bright);
  box-shadow: var(--aura-inner-glow), var(--shadow-premium), 0 0 20px var(--accent-blue-glow);
  background: var(--aura-glass-bright);
}

.glass-card-sm {
  padding: 16px;
  border-radius: var(--radius-md);
}

.glass-card-lg {
  padding: 32px;
  border-radius: var(--radius-xl);
}

/* ===== Premium Buttons Aura ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
  transform: scale(10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
  pointer-events: none;
}

.btn:active::after {
  transform: scale(0);
  opacity: 0.2;
  transition: 0s;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 10px 20px -5px var(--accent-blue-glow);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px var(--accent-blue-glow), 0 0 15px var(--accent-blue);
  filter: brightness(1.15);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 10px 20px -5px var(--accent-emerald-glow);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px var(--accent-emerald-glow), 0 0 15px var(--accent-emerald);
  filter: brightness(1.15);
}

.btn-success:active {
  transform: scale(0.97);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 10px 20px -5px var(--accent-red-glow);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px var(--accent-red-glow), 0 0 15px var(--accent-red);
  filter: brightness(1.15);
}

.btn-danger:active {
  transform: scale(0.97);
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 10px 20px -5px var(--accent-purple-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px var(--accent-purple-glow), 0 0 15px var(--accent-purple);
  filter: brightness(1.15);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--aura-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--aura-border-bright);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.back-to-dashboard {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 100;
  text-decoration: none !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  backdrop-filter: blur(10px);
}

.back-to-dashboard:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary) !important;
  border-color: var(--accent-blue);
  transform: translateX(-4px);
}

/* ===== V13 Elite Premium Buttons ===== */
.btn-elite-sync {
  background: linear-gradient(135deg, #1d4ed8, #4338ca);
  color: white;
  border: 1px solid rgba(129, 140, 248, 0.5);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.btn-elite-sync:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.02);
  color: #fff;
}

.btn-elite-repair {
  background: linear-gradient(135deg, #047857, #065f46);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.3);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
  font-weight: 700;
}

.btn-elite-repair:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

.btn-elite-scan {
  background: linear-gradient(135deg, #be123c, #9f1239);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.3);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.2);
  font-weight: 700;
}

.btn-elite-scan:hover {
  background: linear-gradient(135deg, #e11d48, #be123c);
  box-shadow: 0 0 20px rgba(225, 29, 72, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== V13 Hacker Terminal UI ===== */
.hacker-terminal {
  background: #0a0a0a !important;
  border: 1px solid #10b981 !important;
  border-radius: 8px;
  padding: 15px !important;
  height: 200px !important;
  overflow-y: auto;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 0.8rem !important;
  color: #34d399 !important;
  display: flex !important;
  flex-direction: column;
  gap: 8px !important;
  box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.1), 0 0 15px rgba(16, 185, 129, 0.2) !important;
  position: relative;
}

.hacker-terminal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px);
  pointer-events: none;
  z-index: 10;
}

.terminal-line {
  display: flex;
  flex-direction: column;
  border-left: 2px solid #10b981;
  padding-left: 10px;
  background: rgba(16, 185, 129, 0.05);
  padding-top: 5px;
  padding-bottom: 5px;
  border-radius: 0 4px 4px 0;
  animation: fade-in-up 0.3s ease-out forwards;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(16, 185, 129, 0.3);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.terminal-header .qid {
  color: #fbbf24;
  font-weight: bold;
}

.terminal-header .changes {
  color: #fff;
  font-weight: bold;
  text-shadow: 0 0 5px #10b981;
}

.terminal-text {
  color: #94a3b8;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulse-neon {
  0% {
    text-shadow: 0 0 5px #38bdf8;
  }

  50% {
    text-shadow: 0 0 20px #38bdf8, 0 0 30px #818cf8;
    color: #fff;
  }

  100% {
    text-shadow: 0 0 5px #38bdf8;
  }
}

.neon-counter {
  animation: pulse-neon 2s infinite;
  font-weight: 800;
  color: #38bdf8;
}

/* ===== Form Controls ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

/* ===== Aura Form Controls ===== */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1), var(--aura-inner-glow);
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

/* ===== Stats Cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--aura-glass);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--aura-border-bright);
  box-shadow: var(--shadow-md), 0 0 15px rgba(56, 189, 248, 0.08);
}

.stat-card:hover::before {
  opacity: 1;
}

/* Dynamic stat-card gradient accents */
.stat-card:nth-child(1)::before {
  background: var(--gradient-primary);
}

.stat-card:nth-child(2)::before {
  background: var(--gradient-success);
}

.stat-card:nth-child(3)::before {
  background: var(--gradient-warm);
}

.stat-card:nth-child(4)::before {
  background: var(--gradient-accent);
}

.stat-card:nth-child(5)::before {
  background: var(--gradient-danger);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-icon.blue {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
}

.stat-icon.emerald {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-emerald);
}

.stat-icon.amber {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent-amber);
}

.stat-icon.red {
  background: rgba(251, 113, 133, 0.12);
  color: var(--accent-red);
}

.stat-icon.purple {
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent-purple);
}

.stat-info h3 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Table ===== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: rgba(255, 255, 255, 0.03);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-glass);
  color: var(--text-primary);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--aura-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--aura-border);
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.4;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--accent-red);
  color: white;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--aura-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-lg {
  max-width: 800px;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 280px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.toast.success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.error {
  border-left: 4px solid var(--accent-red);
}

.toast.warning {
  border-left: 4px solid var(--accent-amber);
}

.toast.info {
  border-left: 4px solid var(--accent-blue);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== Section Header ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: var(--text-glow);
}

.section-header h1 span {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  align-items: center;
}

.filter-bar .form-input,
.filter-bar .form-select {
  max-width: 200px;
  padding: 8px 12px;
  font-size: 0.825rem;
}

.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.pagination button {
  padding: 8px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.pagination button.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 8px;
}

/* ===== Test Engine ===== */
.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.test-timer {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent-emerald);
  min-width: 80px;
  text-align: center;
}

.test-timer.warning {
  color: var(--accent-amber);
}

.test-timer.danger {
  color: var(--accent-red);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ===== Navbar Action Buttons (V91) ===== */
.nav-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--aura-border);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0;
  margin-right: 8px;
  box-shadow: 0 0 0 rgba(56, 189, 248, 0);
  backdrop-filter: blur(4px);
}

.nav-action-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-blue);
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 0 15px var(--accent-blue-glow);
  filter: brightness(1.2);
}

.nav-action-btn:active {
  transform: scale(0.9);
}

.section-tabs {
  display: flex;
  gap: 4px;
}

.section-tab {
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.section-tab.active,
.section-tab:hover {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
}

.test-body {
  display: flex;
  gap: 24px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.question-panel {
  flex: 1;
}

.question-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 12px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 24px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  padding: 16px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
  margin-bottom: 12px;
}

.option-item:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-blue);
  transform: translateX(8px);
}

.option-item.selected {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-blue-glow);
}

.option-item.correct {
  background: rgba(52, 211, 153, 0.15);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 15px var(--accent-emerald-glow);
}

.option-item.wrong {
  background: rgba(251, 113, 133, 0.15);
  border-color: var(--accent-red);
  box-shadow: 0 0 15px var(--accent-red-glow);
}

.option-label {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.option-item.selected .option-label {
  background: var(--accent-blue);
  color: white;
}

/* Question Palette */
.palette-panel {
  width: 260px;
  flex-shrink: 0;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.palette-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.palette-btn:hover {
  transform: scale(1.1);
}

.palette-btn.answered {
  background: rgba(16, 185, 129, 0.3);
  border-color: var(--accent-emerald);
  color: white;
}

.palette-btn.not-answered {
  background: rgba(239, 68, 68, 0.3);
  border-color: var(--accent-red);
  color: white;
}

.palette-btn.marked {
  background: rgba(139, 92, 246, 0.3);
  border-color: var(--accent-purple);
  color: white;
}

.palette-btn.answered-marked {
  background: rgba(139, 92, 246, 0.5);
  border-color: var(--accent-purple);
  color: white;
}

.palette-btn.current {
  box-shadow: 0 0 0 2px var(--accent-blue);
}

.palette-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.palette-legend span::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}

.legend-answered::before {
  background: rgba(16, 185, 129, 0.5);
}

.legend-not-answered::before {
  background: rgba(239, 68, 68, 0.5);
}

.legend-not-visited::before {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
}

.legend-marked::before {
  background: rgba(139, 92, 246, 0.5);
}

.question-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ===== Login Page ===== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 440px;
  animation: scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo h1 {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: mesh-flow 4s ease infinite;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.db-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.db-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

.db-dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald-glow);
}

.db-dot.offline {
  background: var(--accent-red);
}

.db-dot.checking {
  background: var(--accent-amber);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ===== Quick Actions Grid ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.quick-action-card {
  background: var(--aura-glass);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

.quick-action-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: all 0.3s ease;
}

.quick-action-card:hover {
  transform: translateY(-4px);
  border-color: var(--aura-border-bright);
  box-shadow: var(--shadow-md), 0 0 20px rgba(56, 189, 248, 0.06);
}

.quick-action-card:hover::after {
  opacity: 1;
  left: 10%;
  right: 10%;
}

.quick-action-card .icon {
  font-size: 2rem;
  margin-bottom: 8px;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-action-card:hover .icon {
  transform: scale(1.2);
}

.quick-action-card .title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.quick-action-card:hover .title {
  color: var(--text-primary);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.875rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===== Progress Bar ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-emerald));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ===== Dashboard Layout Utilities ===== */
.dash-row {
  margin-top: 12px;
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.dash-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.dashcard {
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.dashcard-compact {
  padding: 14px;
}

.dashcard-title {
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.dashcard-body {
  flex: 1;
  min-height: 0;
}

.dashcard-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.dashcard-fixed {
  height: 240px;
}

.dashcard-tall {
  height: 260px;
}

/* Staggered entrance animation */
.stagger-in>* {
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger-in>*:nth-child(1) {
  animation-delay: 0s;
}

.stagger-in>*:nth-child(2) {
  animation-delay: 0.06s;
}

.stagger-in>*:nth-child(3) {
  animation-delay: 0.12s;
}

.stagger-in>*:nth-child(4) {
  animation-delay: 0.18s;
}

.stagger-in>*:nth-child(5) {
  animation-delay: 0.24s;
}

.stagger-in>*:nth-child(6) {
  animation-delay: 0.3s;
}

.stagger-in>*:nth-child(7) {
  animation-delay: 0.36s;
}

.stagger-in>*:nth-child(8) {
  animation-delay: 0.42s;
}

@media (max-width: 768px) {

  .dash-grid-2,
  .dash-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===== Activity Dashboard — Heatmap ===== */
:root {
  --heatmap-0: rgba(255, 255, 255, 0.04);
  --heatmap-1: rgba(52, 211, 153, 0.2);
  --heatmap-2: rgba(52, 211, 153, 0.4);
  --heatmap-3: rgba(52, 211, 153, 0.65);
  --heatmap-4: rgba(52, 211, 153, 0.9);
}

.heatmap-wrapper {
  overflow-x: auto;
  padding-bottom: 4px;
}

.heatmap-grid {
  position: relative;
  min-width: 750px;
}

.heatmap-months {
  position: relative;
  height: 18px;
  margin-left: 32px;
  margin-bottom: 4px;
}

.heatmap-months span {
  position: absolute;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.heatmap-days {
  position: absolute;
  left: 0;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 28px;
}

.heatmap-days span {
  height: 13px;
  font-size: 0.6rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.heatmap-cells {
  display: grid;
  grid-template-rows: repeat(7, 13px);
  grid-auto-flow: column;
  grid-auto-columns: 13px;
  gap: 2px;
  margin-left: 32px;
}

.heatmap-cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--heatmap-0);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}

.heatmap-cell:hover {
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.3);
  z-index: 5;
}

.heatmap-cell.empty {
  background: transparent;
}

.heatmap-cell.level-0 {
  background: var(--heatmap-0);
}

.heatmap-cell.level-1 {
  background: var(--heatmap-1);
}

.heatmap-cell.level-2 {
  background: var(--heatmap-2);
}

.heatmap-cell.level-3 {
  background: var(--heatmap-3);
}

.heatmap-cell.level-4 {
  background: var(--heatmap-4);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  justify-content: flex-end;
}

.heatmap-legend .heatmap-cell {
  width: 12px;
  height: 12px;
}

/* ===== Activity Timeline ===== */
.activity-timeline {
  position: relative;
  padding-left: 20px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple), transparent);
  border-radius: 2px;
}

.timeline-event {
  position: relative;
  padding: 6px 0 6px 16px;
  transition: background 0.2s ease;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}

.timeline-event:hover {
  background: rgba(255, 255, 255, 0.02);
}

.timeline-dot {
  position: absolute;
  left: -16px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--aura-bg);
  box-shadow: 0 0 0 2px currentColor;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-icon {
  font-size: 1rem;
}

.timeline-header strong {
  font-size: 0.85rem;
}

.timeline-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  font-weight: 600;
}

.timeline-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.timeline-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===== Insight Cards ===== */
.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--aura-border);
  margin-bottom: 8px;
  transition: var(--transition-fast);
}

.insight-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--aura-border-bright);
}

.insight-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.insight-body strong {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 4px;
}

.insight-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ===== Performance DNA ===== */
.dna-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.dna-metric {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dna-circle {
  position: relative;
  width: 64px;
  height: 64px;
}

.dna-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dna-circle circle:last-child {
  transition: stroke-dasharray 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dna-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  font-weight: 700;
}

.dna-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== Focus Score Gauge ===== */
.focus-gauge-layout {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.focus-gauge-ring {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.focus-gauge-ring svg {
  transform: rotate(-90deg);
}

.focus-gauge-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 800;
}

.focus-gauge-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.focus-gauge-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.focus-stat-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.focus-stat-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.focus-stat-lbl {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.focus-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--aura-border);
}

.focus-mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 38px;
  padding-top: 4px;
  border-top: 1px solid var(--aura-border);
}

.focus-mini-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  height: 100%;
}

.focus-mini-bar {
  width: 100%;
  max-width: 16px;
  border-radius: 2px;
  transition: height 0.5s ease;
}

.focus-mini-label {
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* ===== Daily Goal Progress ===== */
.goal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.goal-count {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.goal-completed {
  font-size: 1.4rem;
  font-weight: 800;
}

.goal-separator {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.goal-target {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.goal-status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

.goal-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.goal-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.goal-remaining {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.goal-week-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 38px;
  padding-top: 4px;
  border-top: 1px solid var(--aura-border);
}

.goal-week-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  height: 100%;
}

.goal-week-bar {
  width: 100%;
  max-width: 20px;
  border-radius: 2px;
  transition: height 0.5s ease;
}

.goal-week-label {
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* ===== Smart Study Planner ===== */
.planner-goal-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.planner-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.planner-input-group label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.planner-input-group input {
  padding: 6px 10px;
  font-size: 0.85rem;
  text-align: center;
  max-width: 120px;
}

.planner-stats-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.planner-stat-chip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.planner-stat-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.planner-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.planner-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.planner-progress-label {
  display: flex;
  justify-content: space-between;
  width: 140px;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.planner-progress-row .goal-progress-track {
  flex: 1;
}

.planner-pct {
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

.planner-projection {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

@media (max-width: 600px) {
  .planner-goal-inputs {
    grid-template-columns: 1fr;
  }

  .planner-progress-label {
    width: 100px;
    font-size: 0.7rem;
  }

  .planner-projection {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Report Download Buttons ===== */
.report-download-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.report-download-group .btn {
  font-size: 0.75rem;
  padding: 6px 12px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .report-download-group {
    width: 100%;
    justify-content: center;
  }

  .report-download-group .btn {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
}

/* ===== Chapter Breakdown ===== */
.chapter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--aura-border);
}

.chapter-row:last-child {
  border-bottom: none;
}

.chapter-info {
  flex: 1;
  min-width: 0;
}

.chapter-info strong {
  font-size: 0.88rem;
  display: block;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chapter-bar-wrap {
  width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.chapter-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
  .chapter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .chapter-bar-wrap {
    width: 100%;
  }

  .heatmap-cells {
    gap: 1px;
  }

  .heatmap-cell {
    width: 9px;
    height: 9px;
  }

  .dna-grid {
    gap: 16px;
  }

  .dna-circle {
    width: 64px;
    height: 64px;
  }
}

/* ===== Week Comparison Cards ===== */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.comparison-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--aura-border);
  text-align: center;
  transition: var(--transition-fast);
}

.comparison-card:hover {
  border-color: var(--aura-border-bright);
  background: rgba(255, 255, 255, 0.04);
}

.comp-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.comp-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comp-values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.comp-number {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
}

.comp-period {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.comp-arrow {
  font-size: 1.2rem;
  font-weight: 800;
}

.comp-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 6px;
}

/* ===== Tip Cards ===== */
.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--aura-border);
  margin-bottom: 10px;
  transition: var(--transition-fast);
}

.tip-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--aura-border-bright);
}

.tip-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.tip-body {
  flex: 1;
}

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

.tip-header strong {
  font-size: 0.85rem;
}

.tip-priority {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tip-body p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ===== Notification Alerts ===== */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  animation: fade-in-up 0.4s ease both;
}

.notification-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
}

.notification-info {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-blue);
}

.notification-urgent {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
  animation: fade-in-up 0.4s ease both, glow-pulse 2s infinite;
}

@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
  }

  50% {
    box-shadow: 0 0 12px 4px rgba(239, 68, 68, 0.15);
  }
}

.notif-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notif-text {
  flex: 1;
  line-height: 1.4;
}

/* ===== Spaced Repetition Stats ===== */
.sr-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  gap: 8px;
}

.sr-stat {
  flex: 1;
}

.sr-number {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.sr-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Study Planner ===== */
.planner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planner-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--aura-border);
  transition: var(--transition-fast);
}

.planner-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--aura-border-bright);
}

.planner-priority {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.planner-info {
  flex: 1;
  min-width: 0;
}

.planner-info strong {
  font-size: 0.85rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planner-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr 1fr;
  }

  .comp-number {
    font-size: 0.95rem;
  }

  .sr-number {
    font-size: 1.2rem;
  }
}

/* ===== Loader ===== */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.4), rgba(129, 140, 248, 0.4));
}

/* ===== Selection ===== */
::selection {
  background: rgba(56, 189, 248, 0.25);
  color: var(--text-primary);
}

/* ===== Result Score Card ===== */
.result-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.filter-correct {
  cursor: pointer;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.filter-correct.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 12px;
    height: 56px;
  }

  .nav-scroll-wrapper {
    display: none;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 0;
  }

  .navbar-nav a {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 8px;
  }

  .navbar-nav a.active::after {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  /* Mobile drawer panel */
  .nav-mobile-drawer {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--nav-bg, rgba(2, 6, 23, 0.95));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--nav-border, rgba(255, 255, 255, 0.06));
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s;
    z-index: 999;
  }

  .nav-mobile-drawer.open {
    display: block;
    max-height: 500px;
    padding: 12px;
  }

  .nav-mobile-drawer .navbar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 100%;
  }

  .nav-mobile-drawer .navbar-nav a.active {
    background: rgba(56, 189, 248, 0.12);
    border-left: 3px solid var(--accent-blue);
    padding-left: 11px;
  }

  .navbar-user {
    gap: 4px;
  }

  .navbar-user #user-email {
    display: none;
  }

  .main-content {
    padding: 16px;
  }

  .test-body {
    flex-direction: column;
  }

  .palette-panel {
    width: 100%;
  }

  .section-header h1 {
    font-size: 1.3rem;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar .form-input,
  .filter-bar .form-select {
    max-width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Flashcards 3D Effect ===== */
.flashcard {
  perspective: 1000px;
  width: 100%;
  max-width: 500px;
  height: 350px;
  margin: 0 auto;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  padding: 40px;
  background: var(--aura-glass);
  border: 1px solid var(--aura-border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-premium);
}

.flashcard-back {
  transform: rotateY(180deg);
  background: var(--aura-surface);
  border-color: var(--accent-blue);
}

.flashcard-front p,
.flashcard-back p {
  margin: 0;
}

.flashcard-front {
  z-index: 2;
}

/* AI Study Planner */
.planner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planner-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.planner-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--aura-border-bright);
}

.planner-priority {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.planner-info {
  flex: 1;
}

.planner-info strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0px;
}

.planner-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Smart Notifications */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.notification-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

.notification-info {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}

.notification-urgent {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  animation: pulse-border 2s infinite;
}

.notif-icon {
  font-size: 1.2rem;
}

.notif-text {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
}

@keyframes pulse-border {
  0% {
    border-color: rgba(239, 68, 68, 0.2);
  }

  50% {
    border-color: rgba(239, 68, 68, 0.6);
  }

  100% {
    border-color: rgba(239, 68, 68, 0.2);
  }
}

/* ============================================
   PHASE 1-3 ENHANCEMENTS
   ============================================ */

/* ===== Skeleton Loading ===== */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-glass) 25%, var(--bg-glass-hover) 37%, var(--bg-glass) 63%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-card {
  height: 80px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.skeleton-text {
  height: 12px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text.sm {
  width: 40%;
}

.skeleton-text.md {
  width: 70%;
}

.skeleton-text.lg {
  width: 90%;
}

.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

/* ===== Scroll to Top ===== */
#scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 998;
  pointer-events: none;
}

#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 28px rgba(56, 189, 248, 0.45);
}

/* ===== Premium Empty State ===== */
.empty-state-premium {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
}

.empty-state-premium .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state-premium .empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-premium .empty-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ===== Page Entry Animation ===== */
.main-content {
  animation: page-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Notification Bell ===== */
.notif-bell-wrapper {
  position: relative;
}

.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.notif-bell-btn:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: 40px;
  right: -8px;
  width: 280px;
  background: var(--aura-surface);
  border: 1px solid var(--aura-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.notif-dropdown.open {
  display: block;
}

.notif-dropdown-header {
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid var(--aura-border);
  color: var(--text-primary);
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--aura-border);
  transition: background 0.15s;
}

.notif-item:hover {
  background: var(--bg-glass-hover);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item .notif-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

[data-theme="light"] .notif-dropdown {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== App Footer ===== */
.app-footer {
  text-align: center;
  padding: 20px;
  margin-top: 32px;
  border-top: 1px solid var(--aura-border);
  color: var(--text-dim);
  font-size: 0.72rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.app-footer a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: opacity 0.2s;
}

.app-footer a:hover {
  opacity: 0.8;
}

/* ===== Welcome Greeting ===== */
.welcome-greeting {
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(129, 140, 248, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: page-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.welcome-greeting .greeting-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.welcome-greeting .greeting-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.welcome-emoji {
  font-size: 2.5rem;
}

/* ===== Share Buttons ===== */
.share-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--aura-border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-btn:hover {
  background: var(--bg-glass-hover);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.share-btn.whatsapp {
  border-color: #25D366;
  color: #25D366;
}

.share-btn.whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
}

.share-btn.twitter {
  border-color: #1DA1F2;
  color: #1DA1F2;
}

.share-btn.twitter:hover {
  background: rgba(29, 161, 242, 0.1);
}

.share-btn.copy {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.share-btn.copy:hover {
  background: rgba(129, 140, 248, 0.1);
}

/* ===== Practice Page Premium UI ===== */
.practice-hero {
  padding: 32px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
  border-radius: var(--radius-lg);
  border: 1px solid var(--aura-border-bright);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.practice-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-blue-glow) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.mode-card {
  background: var(--bg-glass);
  border: 1px solid var(--aura-border);
  padding: 24px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.mode-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-blue);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.mode-card.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px var(--accent-blue-glow);
}

.mode-card .icon {
  font-size: 2rem;
}

.mode-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.mode-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

.count-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--aura-border);
  margin-left: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.count-badge-wrapper strong {
  color: var(--accent-blue);
}

.practice-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #scroll-top-btn {
    bottom: 80px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .welcome-greeting {
    flex-direction: column;
    text-align: center;
  }

  .notif-dropdown {
    right: -60px;
    width: 260px;
  }
}

/* ===== Skeleton Loading (V27) ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-glass-hover) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite linear;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  width: 100%;
  height: 200px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-text.sm {
  width: 30%;
}

.skeleton-text.md {
  width: 60%;
}

.skeleton-text.lg {
  width: 90%;
}

.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

@keyframes skeleton-pulse {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ===== Network Status ===== */
#network-status {
  padding: 4px 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  border: 1px solid var(--aura-border);
}

/* ===== Spinners & Loaders ===== */
.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spinner-rotate 0.6s linear infinite;
  display: inline-block;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Elite Maintenance Buttons ===== */
.btn-elite-dedup:hover {
  background: rgba(168, 85, 247, 0.1) !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.btn-elite-bridge:hover {
  background: rgba(245, 158, 11, 0.1) !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.btn-elite-shield:hover {
  background: rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* ===== V37: Semantic Search & Confidence UI ===== */
.semantic-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s ease;
  user-select: none;
}

.semantic-toggle.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.semantic-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.confidence-meter {
  height: 4px;
  width: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.confidence-fill {
  height: 100%;
  transition: width 0.5s ease-out;
}

.conf-high {
  background: #10b981;
}

/* Emerald */
.conf-med {
  background: #f59e0b;
}

/* Amber */
.conf-low {
  background: #ef4444;
}

/* Red */
/* ===== V38: Magic Wand UI ===== */
.magic-fix-btn {
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.magic-fix-btn:hover {
  opacity: 1;
  background: rgba(168, 85, 247, 0.1);
  transform: scale(1.2);
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
}

.magic-fix-btn.loading {
  animation: magic-spin 1s infinite linear;
  pointer-events: none;
}

@keyframes magic-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ===== V68 Infinity Engine Enhancements ===== */

/* Focus Mode */
body.focus-mode #main-navbar,
body.focus-mode .navbar,
body.focus-mode .chatbot-toggle,
body.focus-mode .chatbot-container,
body.focus-mode .nav-mobile-drawer,
body.focus-mode footer,
body.focus-mode header,
body.focus-mode .section-header .actions,
body.focus-mode .filter-bar,
body.focus-mode .stats-grid,
body.focus-mode .pagination {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body.focus-mode .app-container,
body.focus-mode .main-content {
  margin: 0 auto !important;
  max-width: 900px !important;
  padding-top: 40px !important;
}

body.focus-mode .glass-card {
  box-shadow: 0 0 60px var(--accent-blue-glow);
  animation: focus-breathe 5s ease-in-out infinite;
  border: 1px solid var(--accent-blue);
}

@keyframes focus-breathe {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px var(--accent-blue-glow);
  }

  50% {
    transform: scale(1.01);
    box-shadow: 0 0 80px var(--accent-blue-glow);
  }
}

/* Focus Mode Styles Kept */
@keyframes focus-breathe {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px var(--accent-blue-glow);
  }

  50% {
    transform: scale(1.01);
    box-shadow: 0 0 80px var(--accent-blue-glow);
  }
}

/* Premium Polish */
.stagger-delayed {
  animation-delay: 0.4s !important;
}

.pulse-living {
  position: relative;
}

.pulse-living::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 20px var(--accent-amber-glow);
  animation: pulse-ring 2s infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.5;
  }
}

/* --- HIGH VISIBILITY TEXT FIX --- */
.elite-question-text {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.4;
  color: var(--text-primary) !important;
  /* Force high contrast primary text */
  background: none !important;
  -webkit-text-fill-color: initial !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.elite-option-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary) !important;
}

/* Light Mode Overrides for Maximum Readability */
[data-theme="light"] .elite-question-text,
[data-theme="solar-gold"] .elite-question-text {
  color: #0f172a !important;
  /* Very dark deep slate blue */
  text-shadow: none !important;
}

[data-theme="light"] .elite-option-item,
[data-theme="solar-gold"] .elite-option-item {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  color: #1e293b !important;
}

[data-theme="light"] .elite-option-item.selected,
[data-theme="solar-gold"] .elite-option-item.selected {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
  /* Bold blue */
}

[data-theme="light"] .palette-btn,
[data-theme="solar-gold"] .palette-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.question-actions {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 992px) {
  .test-body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }

  .palette-panel {
    width: 100%;
    order: -1;
  }

  .test-wrapper {
    overflow-y: auto;
    height: auto;
  }
}

/* ===== Floating Tool Containers (V92) ===== */
.floating-tool-container {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 300px;
  background: var(--aura-surface);
  border: 1px solid var(--aura-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  backdrop-filter: blur(20px);
  animation: slideRight 0.3s ease;
}

.tool-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--aura-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.tool-header button {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Calculator Styles */
.calc-display {
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  text-align: right;
  font-family: 'Inter', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
  word-break: break-all;
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--aura-border);
}

.calc-buttons button {
  padding: 16px;
  background: var(--aura-surface);
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.calc-buttons button:hover {
  background: var(--bg-glass-hover);
}

.calc-buttons button:active {
  transform: scale(0.95);
}

/* Scratchpad Styles */
#scratchpad-area {
  width: 100%;
  height: 250px;
  background: transparent;
  border: none;
  padding: 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  resize: none;
  line-height: 1.6;
}

#scratchpad-area:focus {
  outline: none;
}

/* Live Stats Bar Enhancements */
.live-stats-bar div {
  transition: transform 0.3s ease;
}

.live-stats-bar div:hover {
  transform: translateY(-2px);
}

/* Floating Focus Exit (V92) */
.focus-exit-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.75rem;
  box-shadow: 0 4px 15px var(--accent-red-glow);
  z-index: 10001;
  display: none;
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

body.focus-mode .focus-exit-btn {
  display: block;
}

@keyframes slideRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}