/* ==========================================================
   Brainysis - Know Your Mind | Psychology IQ Assessment System
   Modern Clean UI/UX Design System
   ========================================================== */

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

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* 8 Theme Colors */
  --deep-indigo: #0B1F3B;
  --royal-blue: #2563EB;
  --electric-cyan: #00E5FF;
  --neon-mint: #2EE6A6;
  --dark-slate: #0F172A;
  --slate-gray: #475569;
  --light-gray: #E2E8F0;
  --pure-white: #FFFFFF;

  /* UI Tokens Mapped to Theme Colors */
  --bg-main: #F8FAFC;
  --bg-card: var(--pure-white);
  --bg-sidebar: var(--dark-slate);
  --text-main: var(--dark-slate);
  --text-muted: var(--slate-gray);
  --text-light: #94A3B8;

  --primary: var(--royal-blue);
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-glow: rgba(37, 99, 235, 0.25);

  --accent-cyan: var(--electric-cyan);
  --accent-cyan-glow: rgba(0, 229, 255, 0.35);
  --accent-gradient: linear-gradient(135deg, var(--deep-indigo) 0%, var(--royal-blue) 60%, var(--electric-cyan) 100%);
  --accent-button-gradient: linear-gradient(135deg, var(--royal-blue) 0%, #1D4ED8 100%);

  --success: var(--neon-mint);
  --success-dark: #059669;
  --success-light: #ECFDF5;
  --warning: #F59E0B;
  --danger: #EF4444;
  --danger-light: #FEF2F2;

  --border-color: var(--light-gray);
  --border-active: var(--royal-blue);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(11, 31, 59, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(11, 31, 59, 0.08);
  --shadow-lg: 0 12px 32px -4px rgba(11, 31, 59, 0.12);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark-slate);
  font-weight: 700;
  line-height: 1.3;
}

/* Background Accents */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob-1 {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}
.blob-2 {
  position: absolute;
  bottom: -15%;
  right: -5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

/* Header & Navbar */
.app-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 0;
  box-shadow: 0 2px 10px rgba(11, 31, 59, 0.03);
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.brand-logo-hero {
  max-height: 85px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 1.25rem auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(11, 31, 59, 0.1));
}
.logo-text,
.logo-sub,
.app-header .logo-text,
.app-header .logo-sub {
  display: none !important;
}
.brand-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--deep-indigo);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

/* User Pill & Info */
.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F1F5F9;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-slate);
  border: 1px solid var(--border-color);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--royal-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Welcome Page Hero Card */
.hero-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 3.5rem 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 680px;
  margin: 2rem auto;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--accent-gradient);
}
.hero-icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem auto;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}
.hero-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Form Controls */
.form-group {
  text-align: left;
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #334155;
}
.form-control {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: var(--text-main);
  transition: all 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}
.btn-block {
  width: 100%;
}
.btn-success {
  background: var(--success);
  color: white;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Feature Badge List */
.feature-list {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem 0;
  flex-wrap: wrap;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* ==========================================================
   Test Page Layout (Sticky Navigator & Question Stream)
   ========================================================== */

.test-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: stretch;
  position: relative;
}

/* Sticky Progress Header in Test */
.test-sticky-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 72px;
  z-index: 70;
  transition: all 0.25s ease;
}
.sticky-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.sticky-bar-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-box {
  flex: 1;
  min-width: 220px;
}
.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.progress-track {
  height: 8px;
  background: var(--light-gray);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Horizontal Quick Question Strip (Tablet & Mobile) */
.horizontal-nav-strip {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 2px 2px 2px;
  margin-top: 8px;
  border-top: 1px solid var(--light-gray);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.horizontal-nav-strip::-webkit-scrollbar {
  height: 4px;
}
.horizontal-nav-strip::-webkit-scrollbar-thumb {
  background: var(--light-gray);
  border-radius: 999px;
}
.nav-btn-mini {
  min-width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Question Cards */
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.question-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}
.question-card.answered {
  border-color: #cbd5e1;
  background: #ffffff;
}
.question-card:hover {
  border-color: #94a3b8;
  box-shadow: var(--shadow-md);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.q-num-badge {
  background: #0f172a;
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 4px 12px;
  border-radius: 999px;
}
.q-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Question Diagram / Image Box */
.q-image-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}
.q-image-box img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 1rem;
}
.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.option-label:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}
.option-input {
  display: none;
}
.option-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.option-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #334155;
}

/* Checked State */
.option-label.selected,
.option-label:has(.option-input:checked) {
  background: #EFF6FF !important;
  border-color: var(--royal-blue) !important;
  box-shadow: 0 0 0 2px var(--primary-glow) !important;
  transform: translateY(-1px);
}
.option-label.selected .option-circle,
.option-label:has(.option-input:checked) .option-circle {
  background: var(--royal-blue) !important;
  border-color: var(--royal-blue) !important;
  color: #FFFFFF !important;
}
.option-label.selected .option-text,
.option-label:has(.option-input:checked) .option-text {
  color: var(--deep-indigo) !important;
  font-weight: 700 !important;
}

/* ==========================================================
   Sticky & Floating Sidebar Navigator (Desktop)
   ========================================================== */

.desktop-sidebar-col {
  position: relative;
  height: 100%;
}

.test-sidebar.floating-sidebar,
.test-sidebar {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 165px !important;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 185px);
  display: flex;
  flex-direction: column;
}
.test-sidebar.floating-sidebar:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px -4px rgba(11, 31, 59, 0.16);
}

.sidebar-title {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-sub {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.nav-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 1rem;
  flex: 1;
}
.nav-grid::-webkit-scrollbar {
  width: 5px;
}
.nav-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.nav-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.nav-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}
.nav-btn.answered {
  background: #dbeafe;
  border-color: var(--royal-blue);
  color: #1d4ed8;
  font-weight: 800;
}
.nav-btn.active {
  box-shadow: 0 0 0 2px var(--dark-slate);
}

/* ==========================================================
   Mobile & Tablet Floating Navigation & Drawer
   ========================================================== */

.mobile-floating-bar {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  background: rgba(11, 31, 59, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(11, 31, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  gap: 8px;
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUpFade {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.fab-btn {
  background: transparent;
  border: none;
  color: white;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.fab-btn:active {
  transform: scale(0.97);
}
.fab-btn.fab-submit {
  background: var(--royal-blue);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}
.fab-counter {
  background: rgba(0, 229, 255, 0.25);
  color: var(--electric-cyan);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-drawer {
  background: white;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.mobile-drawer-overlay.active .mobile-drawer {
  transform: translateY(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.drawer-close-btn {
  background: #f1f5f9;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-slate);
  transition: background 0.2s;
}
.drawer-close-btn:hover {
  background: #e2e8f0;
}
.drawer-nav-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  overflow-y: auto;
  padding: 4px;
  max-height: 50vh;
}

/* ==========================================================
   Skeleton Loading Animation (Shimmer Effect)
   ========================================================== */

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 18px;
  margin-bottom: 10px;
  width: 100%;
}
.skeleton-text.short {
  width: 60%;
}
.skeleton-title {
  height: 28px;
  width: 40%;
  margin-bottom: 15px;
}
.skeleton-img {
  height: 120px;
  width: 100%;
  margin: 12px 0;
  border-radius: var(--radius-md);
}
.skeleton-option {
  height: 48px;
  width: 100%;
  border-radius: var(--radius-md);
}

/* ==========================================================
   Fullscreen Processing Modal / Overlay
   ========================================================== */

.processing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.processing-overlay.active {
  opacity: 1;
  visibility: visible;
}
.processing-modal {
  background: white;
  padding: 3rem 2.5rem;
  border-radius: var(--radius-xl);
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.spinner-ring {
  width: 64px;
  height: 64px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.processing-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.processing-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================
   Result Page Styling
   ========================================================== */

.result-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.result-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.iq-score-circle {
  width: 170px;
  height: 170px;
  margin: 1.5rem auto;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
  position: relative;
}
.iq-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}
.iq-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  opacity: 0.9;
}

/* Badges */
.badge-category {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gold { background: #fef3c7; color: #92400e; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.stat-card {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
}
.stat-val {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
}
.stat-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Breakdown Table */
.table-responsive {
  overflow-x: auto;
  margin-top: 2rem;
}
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.custom-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.custom-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  color: #1e293b;
}
.custom-table tr:last-child td {
  border-bottom: none;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.status-ok {
  background: #dcfce7;
  color: #15803d;
}
.status-wrong {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==========================================================
   Responsive Viewport Adaptations (Desktop, Tablet, Mobile)
   ========================================================== */

/* Tablet & Mobile Screens (<= 992px) */
@media (max-width: 992px) {
  .test-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .desktop-sidebar-col {
    display: none !important;
  }
  .mobile-floating-bar {
    display: flex !important;
  }
  .mobile-nav-btn {
    display: inline-flex !important;
  }
  .horizontal-nav-strip {
    display: flex !important;
  }
  .test-sticky-bar {
    top: 64px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 1.25rem 0.875rem 5.5rem 0.875rem;
  }
  .hero-card {
    padding: 2rem 1.25rem;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .sticky-bar-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .sticky-bar-stats {
    justify-content: space-between;
  }
  .drawer-nav-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Large Desktop Screens (>= 993px) */
@media (min-width: 993px) {
  .mobile-nav-btn {
    display: none !important;
  }
  .horizontal-nav-strip {
    display: none !important;
  }
  .mobile-floating-bar {
    display: none !important;
  }
}

/* ==========================================================
   Modern SVG UI Icons
   ========================================================== */
.ui-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.spinner-icon {
  animation: spinIcon 0.9s linear infinite;
}
@keyframes spinIcon {
  to { transform: rotate(360deg); }
}
