/* ===========================================================================
   AnatomyQuest Design System
   Global styles for layout, typography, components, and responsive behavior.
   =========================================================================== */

:root {
  /* Brand Palette */
  --aq-gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #0ea5e9 100%);
  --aq-gradient-secondary: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(13, 148, 136, 0.1) 45%, rgba(56, 189, 248, 0.08) 100%);
  --aq-surface: rgba(255, 255, 255, 0.92);
  --aq-surface-muted: rgba(248, 250, 252, 0.78);
  --aq-surface-dark: rgba(17, 24, 39, 0.78);
  --aq-text: #0f172a;
  --aq-text-muted: rgba(15, 23, 42, 0.65);
  --aq-primary: #4338ca;
  --aq-primary-dark: #312e81;
  --aq-primary-light: #eef2ff;
  --aq-accent: #0ea5e9;
  --aq-positive: #10b981;
  --aq-warning: #f59e0b;
  --aq-danger: #ef4444;
  --aq-border: rgba(148, 163, 184, 0.24);
  --aq-border-strong: rgba(99, 102, 241, 0.22);

  /* Typography */
  --aq-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --aq-font-xs: 0.75rem;
  --aq-font-sm: 0.875rem;
  --aq-font-base: 1rem;
  --aq-font-lg: 1.125rem;
  --aq-font-xl: 1.25rem;
  --aq-font-2xl: 1.5rem;
  --aq-font-3xl: 1.875rem;
  --aq-font-4xl: 2.25rem;

  /* Spacing */
  --aq-space-1: 0.25rem;
  --aq-space-2: 0.5rem;
  --aq-space-3: 0.75rem;
  --aq-space-4: 1rem;
  --aq-space-5: 1.25rem;
  --aq-space-6: 1.5rem;
  --aq-space-8: 2rem;
  --aq-space-10: 2.5rem;
  --aq-space-12: 3rem;

  /* Radii & Shadow */
  --aq-radius-sm: 0.5rem;
  --aq-radius-md: 0.9rem;
  --aq-radius-lg: 1.5rem;
  --aq-radius-xl: 2rem;
  --aq-shadow-sm: 0 12px 30px -20px rgba(15, 23, 42, 0.35);
  --aq-shadow-lg: 0 35px 70px -45px rgba(15, 23, 42, 0.55);

  /* Transitions */
  --aq-transition-fast: 0.2s ease;
  --aq-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--aq-font-family);
  color: var(--aq-text);
  background: var(--aq-gradient-secondary);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: -60% -30%;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.22), transparent 60%),
              radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.15), transparent 65%),
              radial-gradient(circle at 50% 90%, rgba(45, 212, 191, 0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

body.dark-mode {
  color: #f8fafc;
  background: radial-gradient(circle at 20% 15%, rgba(99, 102, 241, 0.25), transparent 60%),
              radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.2), transparent 60%),
              #020617;
}

body.dark-mode::before {
  background: radial-gradient(circle at 25% 20%, rgba(129, 140, 248, 0.22), transparent 60%),
              radial-gradient(circle at 80% 5%, rgba(14, 165, 233, 0.25), transparent 65%),
              radial-gradient(circle at 45% 90%, rgba(59, 130, 246, 0.18), transparent 75%);
}

a {
  color: var(--aq-primary);
  text-decoration: none;
  transition: color var(--aq-transition-fast);
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--aq-text);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #e2e8f0;
}

.lead {
  font-size: var(--aq-font-lg);
  color: var(--aq-text-muted);
}

.text-muted {
  color: var(--aq-text-muted) !important;
}

body.dark-mode .text-muted {
  color: rgba(226, 232, 240, 0.7) !important;
}

/* ---------------------------------------------------------------------------
   Utility helpers
   --------------------------------------------------------------------------- */

.section-bleed {
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.35);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.35);
}

.gradient-text {
  background: var(--aq-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: var(--aq-shadow-sm);
}

.hover-lift {
  transition: transform var(--aq-transition-fast), box-shadow var(--aq-transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--aq-shadow-lg);
}

.badge-soft-primary,
.badge-soft-neutral,
.badge-soft-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-soft-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #4338ca;
}

.badge-soft-neutral {
  background: rgba(148, 163, 184, 0.18);
  color: rgba(30, 41, 59, 0.8);
}

.badge-soft-success {
  background: rgba(16, 185, 129, 0.18);
  color: #0f766e;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.modern-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-size: var(--aq-font-base);
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform var(--aq-transition-fast), box-shadow var(--aq-transition-fast), background var(--aq-transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 48px;
}

.modern-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.modern-btn:hover::before {
  transform: translateX(100%);
}

.modern-btn:hover {
  transform: translateY(-3px);
}

.modern-btn-primary {
  background: var(--aq-gradient-primary);
  color: white;
  box-shadow: 0 20px 35px -20px rgba(99, 102, 241, 0.6);
}

.modern-btn-primary:hover {
  box-shadow: 0 28px 50px -25px rgba(99, 102, 241, 0.7);
}

.modern-btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--aq-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.modern-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
}

body.dark-mode .modern-btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.4);
}

body.dark-mode .modern-btn-secondary:hover {
  background: rgba(59, 70, 101, 0.92);
}

.modern-btn-light {
  background: white;
  color: var(--aq-text);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.modern-btn-light:hover {
  background: #f8fafc;
}

body.dark-mode .modern-btn-light {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border-color: rgba(99, 102, 241, 0.35);
}

body.dark-mode .modern-btn-light:hover {
  background: rgba(45, 55, 72, 0.9);
}

.modern-btn[disabled],
.modern-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Theme toggle (persistent)
   --------------------------------------------------------------------------- */

.theme-shell .theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 25px 45px -30px rgba(15, 23, 42, 0.55);
  transition: transform var(--aq-transition-fast), box-shadow var(--aq-transition-fast);
  z-index: 999;
}

.theme-shell .theme-toggle:hover {
  transform: translateY(-4px) scale(1.05);
}

body.dark-mode .theme-shell .theme-toggle {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(99, 102, 241, 0.3);
  color: #cbd5f5;
}

/* ---------------------------------------------------------------------------
   Navbar
   --------------------------------------------------------------------------- */

.modern-navbar {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--aq-border);
  padding: 0.9rem 0 !important;
  box-shadow: 0 20px 45px -35px rgba(15, 23, 42, 0.4);
  transition: background var(--aq-transition-fast), box-shadow var(--aq-transition-fast);
}

body.dark-mode .modern-navbar {
  background: rgba(15, 23, 42, 0.78) !important;
  border-bottom-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 25px 50px -35px rgba(2, 6, 23, 0.85);
}

.modern-navbar .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.modern-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--aq-primary);
  transition: transform var(--aq-transition-fast);
}

.modern-brand:hover {
  transform: translateY(-2px);
}

.modern-brand .brand-icon {
  font-size: 1.6rem;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.25rem;
  box-shadow:
    0 2px 8px rgba(245, 158, 11, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.2);
  animation: beta-pulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  vertical-align: super;
  top: -0.4rem;
}

.beta-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: beta-shine 3s ease-in-out infinite;
}

@keyframes beta-pulse {
  0%, 100% {
    box-shadow:
      0 2px 8px rgba(245, 158, 11, 0.4),
      0 0 0 2px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 2px 12px rgba(245, 158, 11, 0.6),
      0 0 0 2px rgba(255, 255, 255, 0.3);
  }
}

@keyframes beta-shine {
  0% {
    left: -100%;
  }
  20%, 100% {
    left: 100%;
  }
}

.dark-mode .beta-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow:
    0 2px 8px rgba(251, 191, 36, 0.5),
    0 0 0 2px rgba(255, 255, 255, 0.1);
}

.dark-mode .beta-badge::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.modern-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--aq-text-muted);
  font-weight: 600;
  transition: background var(--aq-transition-fast), color var(--aq-transition-fast);
}

.modern-nav-link:hover,
.modern-nav-link:focus {
  background: rgba(99, 102, 241, 0.12);
  color: var(--aq-primary);
}

body.dark-mode .modern-nav-link {
  color: rgba(226, 232, 240, 0.7);
}

body.dark-mode .modern-nav-link:hover,
body.dark-mode .modern-nav-link:focus {
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}

.modern-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--aq-primary);
  font-weight: 600;
}

.modern-profile-badge .profile-stat {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 0.65rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.85rem;
  color: var(--aq-primary);
}

.modern-dropdown {
  border-radius: 1rem;
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--aq-shadow-sm);
}

.dropdown-menu {
  display: none;
}

.dropdown-menu.show {
  display: block;
}


.modern-dropdown-item {
  border-radius: 0.75rem;
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  color: var(--aq-text-muted);
}

.modern-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--aq-primary);
}

.modern-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
}

.premium-badge {
  background: rgba(250, 204, 21, 0.12);
  color: #b45309;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.upgrade-badge {
  background: rgba(99, 102, 241, 0.12);
  color: var(--aq-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ---------------------------------------------------------------------------
   Alerts & feedback
   --------------------------------------------------------------------------- */

.modern-alert {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid transparent;
  box-shadow: 0 20px 40px -35px rgba(15, 23, 42, 0.4);
}

.modern-alert-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #0f766e;
}

.modern-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #b91c1c;
}

/* ---------------------------------------------------------------------------
   Page layout wrappers
   --------------------------------------------------------------------------- */

.page-main {
  position: relative;
  margin-top: clamp(90px, 12vw, 120px);
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
}

.page-main__background {
  position: absolute;
  inset: clamp(1.5rem, 5vw, 3rem);
  background: var(--aq-surface-muted);
  border-radius: var(--aq-radius-xl);
  border: 1px solid var(--aq-border);
  box-shadow: var(--aq-shadow-lg);
  z-index: -1;
}

body.dark-mode .page-main__background {
  background: var(--aq-surface-dark);
  border-color: rgba(99, 102, 241, 0.25);
}

.page-container.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4rem);
}

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}

.flash-stack:empty {
  display: none;
}

/* ---------------------------------------------------------------------------
   Cards & containers
   --------------------------------------------------------------------------- */

.modern-card,
.card-enhanced,
.subscription-feature,
.landing-feature,
.workflow-card,
.experience-panel,
.subscription-plan-card,
.comparison-card,
.impact-card,
.hero-preview {
  background: var(--aq-surface);
  border-radius: var(--aq-radius-lg);
  border: 1px solid var(--aq-border);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--aq-shadow-sm);
}

.impact-card {
  display: grid;
  gap: 1.5rem;
}

.impact-card .stat-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #4338ca;
}

.impact-card .stat-label {
  color: rgba(15, 23, 42, 0.6);
  max-width: 280px;
}

body.dark-mode .modern-card,
body.dark-mode .card-enhanced,
body.dark-mode .subscription-feature,
body.dark-mode .landing-feature,
body.dark-mode .workflow-card,
body.dark-mode .experience-panel,
body.dark-mode .subscription-plan-card,
body.dark-mode .comparison-card,
body.dark-mode .impact-card,
body.dark-mode .hero-preview {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(99, 102, 241, 0.2);
  color: #e2e8f0;
}

body.dark-mode .subscription-feature p,
body.dark-mode .landing-feature p,
body.dark-mode .workflow-card p,
body.dark-mode .experience-panel p,
body.dark-mode .comparison-card ul,
body.dark-mode .impact-card .stat-label,
body.dark-mode .plan-caption,
body.dark-mode .plan-features,
body.dark-mode .plan-features li span {
  color: rgba(203, 213, 225, 0.78);
}

body.dark-mode .impact-card .stat-value {
  color: #c7d2fe;
}

body.dark-mode .experience-header {
  color: rgba(129, 140, 248, 0.85);
}

.progress-thin {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
}

.progress-thin .progress-bar {
  background: var(--aq-gradient-primary);
  border-radius: 999px;
}

/* ---------------------------------------------------------------------------
   Landing & marketing sections (home page)
   --------------------------------------------------------------------------- */

.landing-hero,
.landing-section,
.landing-section--alt,
.landing-cta,
.subscription-hero,
.subscription-section,
.subscription-section--alt,
.subscription-cta-final,
.plan-comparison {
  border-radius: var(--aq-radius-xl);
  padding: clamp(2.75rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
}

.landing-section--alt,
.subscription-section--alt {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

body.dark-mode .landing-section,
body.dark-mode .subscription-section {
  background: rgba(15, 23, 42, 0.45);
}

body.dark-mode .landing-section--alt,
body.dark-mode .subscription-section--alt {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(99, 102, 241, 0.28);
}

.landing-hero,
.subscription-hero {
  background: var(--aq-gradient-secondary);
}

body.dark-mode .landing-hero,
body.dark-mode .subscription-hero {
  background: linear-gradient(135deg, rgba(45, 55, 72, 0.75) 0%, rgba(17, 24, 39, 0.7) 50%, rgba(30, 41, 59, 0.65) 100%);
}

.landing-hero__container,
.subscription-hero__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}

.landing-eyebrow,
.subscription-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--aq-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.landing-hero__cta,
.subscription-hero__content .landing-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.landing-hero__trust,
.subscription-hero__content .landing-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.landing-hero__trust .trust-badge,
.subscription-hero__content .trust-badge {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  color: var(--aq-text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

body.dark-mode .landing-hero__trust .trust-badge,
body.dark-mode .subscription-hero__content .trust-badge {
  background: rgba(30, 41, 59, 0.72);
  color: rgba(226, 232, 240, 0.82);
  border-color: rgba(99, 102, 241, 0.35);
}

.section-header {
  max-width: 720px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.landing-feature,
.subscription-feature {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  height: 100%;
}

.feature-icon,
.subscription-feature .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(99, 102, 241, 0.12);
  font-size: 1.7rem;
}

body.dark-mode .feature-icon,
body.dark-mode .subscription-feature .feature-icon {
  background: rgba(99, 102, 241, 0.28);
  color: #e0e7ff;
}

.workflow-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.workflow-card li {
  display: flex;
  gap: 1rem;
}

.workflow-step {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  background: rgba(99, 102, 241, 0.18);
  color: var(--aq-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

body.dark-mode .workflow-step {
  background: rgba(99, 102, 241, 0.32);
  color: #c7d2fe;
}

.experience-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-header {
  font-weight: 600;
  color: rgba(99, 102, 241, 0.85);
}

.experience-quote {
  font-size: 1.1rem;
  font-style: italic;
}

.highlight-title {
  display: block;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.85);
  margin-bottom: 0.35rem;
}

.landing-cta,
.subscription-cta-final {
  background: var(--aq-gradient-primary);
  color: white;
}

.landing-cta .text-muted,
.subscription-cta-final .text-muted {
  color: rgba(255, 255, 255, 0.78) !important;
}

.cta-note,
.cta-guarantee {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.78);
  display: inline-block;
}

/* ---------------------------------------------------------------------------
   Subscription-specific styles (hero plan card, comparison, FAQ)
   --------------------------------------------------------------------------- */

.subscription-plan-card {
  position: relative;
  max-width: 360px;
  padding: clamp(2.2rem, 5vw, 2.9rem);
  backdrop-filter: blur(16px);
}

.subscription-plan-card .plan-title {
  margin: 0;
  font-size: 1.6rem;
}

.subscription-plan-card .plan-price {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
}

.subscription-plan-card .currency {
  font-size: 1.4rem;
  font-weight: 600;
}

.subscription-plan-card .amount {
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1;
}

.subscription-plan-card .term {
  font-size: 1rem;
  color: var(--aq-text-muted);
}

.subscription-plan-card .plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  color: var(--aq-text-muted);
}

.subscription-plan-card .plan-features li span {
  color: var(--aq-text);
  font-weight: 600;
}

.plan-comparison ul {
  list-style: disc;
}

.plan-comparison {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 28px 65px -50px rgba(15, 23, 42, 0.45);
}

body.dark-mode .plan-comparison {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 32px 70px -45px rgba(2, 6, 23, 0.85);
}

.faq-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.faq-item {
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--aq-surface);
  padding: 1.2rem 1.35rem;
  box-shadow: var(--aq-shadow-sm);
}

body.dark-mode .faq-item {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 24px 55px -40px rgba(2, 6, 23, 0.85);
}

.faq-item summary {
  list-style: none;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '\002B';
  font-weight: 700;
  color: var(--aq-primary);
  transition: transform var(--aq-transition-fast);
}

body.dark-mode .faq-item summary::after {
  color: #c7d2fe;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--aq-text-muted);
  margin-bottom: 0;
}

body.dark-mode .faq-item p {
  color: rgba(203, 213, 225, 0.78);
}

.testimonial-slider {
  display: grid;
  gap: 1.5rem;
}

.testimonial {
  position: relative;
  padding-left: 2.5rem;
}

.testimonial::before {
  content: '“';
  position: absolute;
  top: -1.2rem;
  left: 0;
  font-size: 4rem;
  color: rgba(99, 102, 241, 0.18);
  font-family: Georgia, serif;
}

.testimonial-quote {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.testimonial-author {
  font-weight: 600;
  color: rgba(99, 102, 241, 0.9);
}

body.dark-mode .testimonial-quote {
  color: rgba(226, 232, 240, 0.85);
}

body.dark-mode .testimonial-author {
  color: #c7d2fe;
}

/* Billing toggle & comparison extras */

.billing-toggle {
  display: inline-flex;
  gap: 0.6rem;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  margin-bottom: 1.2rem;
}

body.dark-mode .billing-toggle {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(99, 102, 241, 0.35);
}

.billing-option {
  position: relative;
  display: inline-flex;
}

.billing-option input {
  display: none;
}

.billing-option__content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 120px;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  color: var(--aq-text-muted);
  font-weight: 600;
  background: transparent;
  transition: all var(--aq-transition-fast);
}

.billing-option__content small {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.55);
}

body.dark-mode .billing-option__content {
  color: rgba(226, 232, 240, 0.72);
}

body.dark-mode .billing-option__content small {
  color: rgba(148, 163, 184, 0.7);
}

.billing-option input:checked + .billing-option__content {
  background: rgba(99, 102, 241, 0.18);
  color: var(--aq-primary);
  box-shadow: 0 18px 35px -30px rgba(99, 102, 241, 0.7);
}

body.dark-mode .billing-option input:checked + .billing-option__content {
  background: rgba(99, 102, 241, 0.32);
  color: #e0e7ff;
  box-shadow: 0 22px 40px -30px rgba(99, 102, 241, 0.75);
}

.billing-option input:checked + .billing-option__content small {
  color: rgba(67, 56, 202, 0.8);
}

.plan-badge {
  align-self: flex-start;
  background: rgba(99, 102, 241, 0.16);
  color: var(--aq-primary);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.dark-mode .plan-badge {
  background: rgba(99, 102, 241, 0.35);
  color: #d0d4ff;
}

.plan-savings {
  color: rgba(67, 56, 202, 0.9);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 0.85rem;
}

body.dark-mode .plan-savings {
  background: rgba(99, 102, 241, 0.32);
  color: #d6dcff;
}

.comparison-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.comparison-card ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
  color: var(--aq-text-muted);
}

.comparison-card h4 {
  margin-bottom: 0.35rem;
}

.comparison-card--pro {
  background: rgba(236, 233, 254, 0.6);
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 20px 45px -35px rgba(99, 102, 241, 0.45);
}

.comparison-card--pro ul li::marker {
  color: var(--aq-primary);
}

.comparison-card--free ul li::marker {
  color: rgba(148, 163, 184, 0.8);
}

body.dark-mode .comparison-card--pro ul li::marker {
  color: #c7d2fe;
}

body.dark-mode .comparison-card--free ul li::marker {
  color: rgba(148, 163, 184, 0.7);
}

/* ---------------------------------------------------------------------------
   Responsive adjustments
   --------------------------------------------------------------------------- */

@media (max-width: 992px) {
  .section-bleed {
    margin-left: 0;
    margin-right: 0;
  }

  .subscription-hero__card,
  .landing-hero__card {
    order: -1;
  }
}

@media (max-width: 768px) {
  .billing-option__content {
    min-width: 110px;
  }
}

@media (max-width: 575.98px) {
  .landing-hero,
  .landing-section,
  .landing-section--alt,
  .landing-cta,
  .subscription-hero,
  .subscription-section,
  .subscription-section--alt,
  .subscription-cta-final,
  .plan-comparison {
    padding: 2.2rem 1.5rem;
  }

  .landing-hero__cta,
  .subscription-hero__content .landing-hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-toggle {
    width: 100%;
    justify-content: space-between;
  }
}

.nav-item.dropdown {
  position: relative;
}

.nav-item.dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  margin: 0;
  min-width: 12rem;
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1050;
}

.nav-item.dropdown .dropdown-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

body.dark-mode .nav-item.dropdown .dropdown-menu {
  background: rgba(17, 24, 39, 0.88);
  border-color: rgba(99, 102, 241, 0.2);
}

/* ---------------------------------------------------------------------------
   Home Page Dark Mode Styles
   --------------------------------------------------------------------------- */

/* Hero Section */
body.dark-mode .hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

body.dark-mode .hero-badge {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #a5b4fc !important;
}

body.dark-mode .hero-title {
  color: #f1f5f9 !important;
}

body.dark-mode .hero-description {
  color: #94a3b8 !important;
}

/* Quiz Preview */
body.dark-mode .quiz-preview {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .quiz-badge {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
}

body.dark-mode .quiz-question {
  color: #f1f5f9 !important;
}

body.dark-mode .quiz-option {
  border-color: rgba(99, 102, 241, 0.3) !important;
  background: rgba(15, 23, 42, 0.5) !important;
  color: #e2e8f0 !important;
}

body.dark-mode .quiz-option:hover {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.1) !important;
}

body.dark-mode .quiz-option-correct {
  border-color: #34d399 !important;
  background-color: rgba(16, 185, 129, 0.15) !important;
}

body.dark-mode .quiz-type {
  color: #94a3b8 !important;
}

/* Features Section */
body.dark-mode .features-section {
  background: rgba(15, 23, 42, 0.6) !important;
}

body.dark-mode .section-title {
  color: #f1f5f9 !important;
}

body.dark-mode .section-description {
  color: #94a3b8 !important;
}

body.dark-mode .feature-card {
  background: rgba(30, 41, 59, 0.6) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

body.dark-mode .feature-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

body.dark-mode .feature-title {
  color: #f1f5f9 !important;
}

body.dark-mode .feature-description {
  color: #94a3b8 !important;
}

/* CTA Section */
body.dark-mode .cta-section {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
}

/* User Stats for logged-in users */
body.dark-mode .stat-card {
  background: rgba(30, 41, 59, 0.6) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}

body.dark-mode .stat-value {
  color: #f1f5f9 !important;
}

body.dark-mode .stat-label {
  color: #94a3b8 !important;
}

/* ---------------------------------------------------------------------------
   Enhanced Form Styles (Login/Register)
   --------------------------------------------------------------------------- */

/* Auth Page Container */
.row.justify-content-center {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.form-enhanced {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--aq-radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow:
    0 20px 50px -20px rgba(15, 23, 42, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  position: relative;
  overflow: hidden;
}

.form-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.form-enhanced > * {
  position: relative;
  z-index: 1;
}

body.dark-mode .form-enhanced {
  background: rgba(17, 24, 39, 0.95);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    0 20px 50px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(99, 102, 241, 0.2) inset;
}

body.dark-mode .form-enhanced::before {
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.12), transparent 60%);
}

/* Form Labels */
.form-enhanced .form-label {
  font-weight: 600;
  color: var(--aq-text);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

body.dark-mode .form-enhanced .form-label {
  color: #e2e8f0;
}

/* Enhanced Form Controls */
.form-control-enhanced,
.form-select.form-control-enhanced {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--aq-radius-md);
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--aq-text);
  transition: all var(--aq-transition-fast);
  box-shadow: 0 4px 12px -8px rgba(15, 23, 42, 0.15);
}

.form-control-enhanced:focus,
.form-select.form-control-enhanced:focus {
  background: white;
  border-color: var(--aq-primary);
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.1),
    0 8px 20px -8px rgba(99, 102, 241, 0.3);
  outline: none;
  transform: translateY(-1px);
}

.form-control-enhanced::placeholder {
  color: rgba(100, 116, 139, 0.6);
}

body.dark-mode .form-control-enhanced,
body.dark-mode .form-select.form-control-enhanced {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e2e8f0;
  box-shadow: 0 4px 12px -8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .form-control-enhanced:focus,
body.dark-mode .form-select.form-control-enhanced:focus {
  background: rgba(30, 41, 59, 0.95);
  border-color: #6366f1;
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, 0.2),
    0 8px 20px -8px rgba(99, 102, 241, 0.4);
}

body.dark-mode .form-control-enhanced::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

/* Enhanced Buttons */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  font-weight: 600;
  border-radius: var(--aq-radius-md);
  padding: 0.875rem 2rem;
  transition: all var(--aq-transition-fast);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.btn-enhanced:hover::before {
  left: 100%;
}

.btn-enhanced:hover {
  transform: translateY(-2px);
}

.btn-enhanced:active {
  transform: translateY(0);
}

/* Primary Enhanced Button */
.btn-primary-enhanced {
  background: var(--aq-gradient-primary);
  color: white;
  box-shadow: 0 12px 30px -15px rgba(99, 102, 241, 0.6);
}

.btn-primary-enhanced:hover {
  box-shadow: 0 16px 40px -15px rgba(99, 102, 241, 0.7);
  color: white;
}

.btn-primary-enhanced:active {
  box-shadow: 0 8px 20px -15px rgba(99, 102, 241, 0.8);
}

/* Warning Enhanced Button (for subscription) */
.btn-warning-enhanced {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  box-shadow: 0 12px 30px -15px rgba(245, 158, 11, 0.6);
}

.btn-warning-enhanced:hover {
  background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
  box-shadow: 0 16px 40px -15px rgba(245, 158, 11, 0.7);
  color: white;
}

/* Success Enhanced Button (for subscription) */
.btn-success-enhanced {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 12px 30px -15px rgba(16, 185, 129, 0.6);
}

.btn-success-enhanced:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 16px 40px -15px rgba(16, 185, 129, 0.7);
  color: white;
}

/* Form Check (Checkboxes/Radio) */
.form-enhanced .form-check {
  padding-left: 1.75rem;
}

.form-enhanced .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  border: 2px solid rgba(148, 163, 184, 0.4);
  transition: all var(--aq-transition-fast);
}

.form-enhanced .form-check-input:checked {
  background-color: var(--aq-primary);
  border-color: var(--aq-primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-enhanced .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  border-color: var(--aq-primary);
}

body.dark-mode .form-enhanced .form-check-input {
  background-color: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.3);
}

body.dark-mode .form-enhanced .form-check-input:checked {
  background-color: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

body.dark-mode .form-enhanced .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
}

/* Resend Verification Card */
.form-enhanced .card {
  border-radius: var(--aq-radius-md);
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.05);
  transition: all var(--aq-transition-fast);
}

.form-enhanced .card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 20px -10px rgba(99, 102, 241, 0.3);
}

body.dark-mode .form-enhanced .card {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

body.dark-mode .form-enhanced .card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 20px -10px rgba(99, 102, 241, 0.4);
}

/* Form Size Variants */
.form-control-lg.form-control-enhanced {
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
}

.btn-lg.btn-enhanced {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* Animation for form elements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-enhanced {
  animation: fadeInUp 0.6s ease-out;
}

.form-enhanced .mb-4:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s both; }
.form-enhanced .mb-4:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.form-enhanced .mb-4:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.3s both; }
.form-enhanced .mb-4:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.4s both; }
.form-enhanced .mb-4:nth-child(5) { animation: fadeInUp 0.6s ease-out 0.5s both; }

/* Login/Register Page Branding Icon */
.form-enhanced ~ .text-center .mb-4 span[style*="font-size: 4rem"],
div.text-center.mb-5 .mb-4 span[style*="font-size: 4rem"] {
  display: inline-block;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(99, 102, 241, 0.3));
}

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

/* Welcome heading glow effect */
div.text-center.mb-5 h1.gradient-text,
.text-center h1.gradient-text {
  position: relative;
  display: inline-block;
}

div.text-center.mb-5 h1.gradient-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  background: var(--aq-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(20px);
  opacity: 0.5;
}

/* Features reminder cards on login/register */
.text-center.mt-5 .row.g-3 > div {
  transition: transform var(--aq-transition-fast);
}

.text-center.mt-5 .row.g-3 > div:hover {
  transform: translateY(-4px);
}

.text-center.mt-5 .row.g-3 .p-3 {
  border-radius: var(--aq-radius-md);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all var(--aq-transition-fast);
}

.text-center.mt-5 .row.g-3 .p-3:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 20px -10px rgba(99, 102, 241, 0.3);
}

body.dark-mode .text-center.mt-5 .row.g-3 .p-3 {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(99, 102, 241, 0.2);
}

body.dark-mode .text-center.mt-5 .row.g-3 .p-3:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 20px -10px rgba(99, 102, 241, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .form-enhanced {
    padding: 1.5rem;
  }

  .form-control-enhanced,
  .form-select.form-control-enhanced {
    padding: 0.75rem 1rem;
  }

  .btn-enhanced {
    padding: 0.75rem 1.5rem;
  }
}
