/* ============================================================
   ESWT — Design System
   Dark theme, glassmorphism, risk-tier accents
   ============================================================ */

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

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1629;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(20, 30, 55, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;

  --text-primary: #f1f5f9;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);

  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;

  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6, #8b5cf6);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow-green: 0 0 40px rgba(16, 185, 129, 0.15);
  --shadow-glow-amber: 0 0 40px rgba(245, 158, 11, 0.15);
  --shadow-glow-red: 0 0 40px rgba(239, 68, 68, 0.15);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Animated Background ---- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-mesh::before,
.bg-mesh::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: meshFloat 12s ease-in-out infinite alternate;
}

.bg-mesh::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent 70%);
  top: -200px;
  right: -200px;
}

.bg-mesh::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
  bottom: -150px;
  left: -150px;
  animation-delay: -6s;
}

@keyframes meshFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, -30px) scale(1.1);
  }
}

/* ---- Layout ---- */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-smooth);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-brand-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-brand-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: none;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* ---- Hero Section ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero-pulse {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
  animation: heroPulse 4s ease-in-out infinite;
}

@keyframes heroPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.15;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease-out;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease-out 0.1s both;
}

.hero h1 .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.8s ease-out 0.3s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  animation: fadeUp 0.8s ease-out 0.4s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

/* ---- Sections ---- */
.section {
  padding: 100px 0;
  display: none;
}

.section.active {
  display: block;
  animation: sectionIn 0.6s ease-out;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Glass Card ---- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--bg-card-hover);
}

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

/* ---- Form ---- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-label .icon {
  font-size: 16px;
}

.form-label .normal-range {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input.warning {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input.danger {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* ---- Demo Patient Cards ---- */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.demo-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-fast);
}

.demo-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.demo-card.active {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.06);
}

.demo-card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.demo-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.demo-card-tier {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
}

.demo-card-tier.low {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.demo-card-tier.moderate {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.demo-card-tier.high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

/* ---- Results Dashboard ---- */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.results-full {
  grid-column: 1 / -1;
}

.risk-tier-banner {
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

.risk-tier-banner.low {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: var(--shadow-glow-green);
}

.risk-tier-banner.moderate {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: var(--shadow-glow-amber);
}

.risk-tier-banner.high {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  box-shadow: var(--shadow-glow-red);
  animation: dangerPulse 2s ease-in-out infinite;
}

@keyframes dangerPulse {

  0%,
  100% {
    box-shadow: var(--shadow-glow-red);
  }

  50% {
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.25);
  }
}

.risk-icon {
  font-size: 48px;
  animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconBounce {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.risk-tier-label {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.risk-tier-action {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.chart-container {
  height: 220px;
  position: relative;
}

.chart-container-lg {
  height: 280px;
}

/* ---- Factor List ---- */
.factor-list {
  list-style: none;
}

.factor-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: factorSlide 0.4s ease-out both;
}

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

@keyframes factorSlide {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }

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

.factor-severity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.factor-severity-dot.critical {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.factor-severity-dot.high {
  background: var(--accent-amber);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.factor-severity-dot.moderate {
  background: var(--accent-blue);
}

.factor-name {
  font-size: 14px;
  font-weight: 600;
}

.factor-value {
  font-size: 12px;
  color: var(--text-secondary);
}

.factor-message {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

/* ---- Recommendations ---- */
.rec-list {
  list-style: none;
}

.rec-item {
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  animation: factorSlide 0.4s ease-out both;
}

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

/* ---- qSOFA Panel ---- */
.qsofa-criteria-list {
  list-style: none;
}

.qsofa-criterion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.qsofa-criterion:last-child {
  border-bottom: none;
}

.qsofa-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.qsofa-check.met {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.qsofa-check.not-met {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Education Cards ---- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.edu-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.edu-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.edu-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.edu-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.edu-card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Disclaimer ---- */
.disclaimer {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 32px;
}

.disclaimer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.disclaimer-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: 40px;
}

.footer-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Utilities ---- */
.hidden {
  display: none !important;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mt-8 {
  margin-top: 32px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

/* ---- Card Header ---- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---- Hero Mode Cards ---- */
.hero-modes {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  animation: fadeUp 0.8s ease-out 0.5s both;
}

.hero-mode-card {
  flex: 1;
  max-width: 180px;
  padding: 20px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.hero-mode-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

.hero-mode-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.hero-mode-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.hero-mode-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- Mode Selector Tabs ---- */
.mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 8px;
}

.mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--text-secondary);
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.mode-tab.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.mode-tab-icon {
  font-size: 24px;
}

.mode-tab-label {
  font-size: 14px;
  font-weight: 700;
}

.mode-tab-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.mode-tab.active .mode-tab-desc {
  color: var(--accent-blue);
}

/* ---- Mode Panels ---- */
.mode-panel {
  display: none;
  animation: sectionIn 0.5s ease-out;
}

.mode-panel.active {
  display: block;
}

/* ---- Glow Button ---- */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: none;
}

.btn-glow:hover::after {
  transform: translateX(100%);
  transition: transform 0.6s ease;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* ---- Glass Card Accent Variant ---- */
.glass-card-accent {
  border-color: rgba(59, 130, 246, 0.15);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(30, 27, 75, 0.3) 100%);
}

/* ---- Card Desc ---- */
.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ---- WHOOP Actions ---- */
.whoop-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- WHOOP Readings Grid ---- */
.whoop-readings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.whoop-reading {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: var(--transition-fast);
}

.whoop-reading.alert {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
}

/* ---- Hospital Actions ---- */
.hospital-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- Hospital Vitals Grid ---- */
.hospital-vitals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

/* ---- DIY Highlight ---- */
.diy-highlight {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.08);
}

/* ---- Form Grid Variants ---- */
.form-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: 600px;
}

.form-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---- Confidence Bar ---- */
.confidence-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
}

/* ---- Results Mode Badge ---- */
.results-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

/* ---- Gradient Text utility ---- */
.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Section Title gradient support ---- */
.section-title .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 100px 16px 60px;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat-value {
    font-size: 22px;
  }

  .hero-modes {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-mode-card {
    max-width: 100%;
    width: 100%;
  }

  .section {
    padding: 60px 0;
  }

  .mode-selector {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mode-tab {
    flex-direction: row;
    padding: 14px 16px;
    gap: 12px;
  }

  .mode-tab-icon {
    font-size: 20px;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  .risk-tier-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

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

  .demo-grid {
    grid-template-columns: 1fr;
  }

  .edu-grid {
    grid-template-columns: 1fr;
  }

  .glass-card {
    padding: 20px;
  }

  .app-wrapper {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 14px;
  }
}