/* ═══════════════════════════════════════════════════════════
   HairSense AI v3 — Design System
   5 Themes: purple, ocean, forest, sunset, rose
   ═══════════════════════════════════════════════════════════ */

/* ── Google Font already loaded in HTML ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══════ THEME TOKENS ═══════════════════════════════════════ */
:root, [data-theme="purple"] {
  --bg:       #08001a;
  --bg2:      #0d0025;
  --surface:  rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.08);
  --accent:   #a855f7;
  --accent2:  #ec4899;
  --accent3:  #38bdf8;
  --glow:     rgba(168,85,247,0.35);
  --glow2:    rgba(236,72,153,0.25);
  --text:     #f1f0ff;
  --text2:    rgba(241,240,255,0.55);
  --risk-high:#f87171; --risk-mid:#fbbf24; --risk-low:#4ade80;
  --orb1: #7c3aed; --orb2: #ec4899; --orb3: #3b82f6;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
}
[data-theme="ocean"] {
  --bg:       #000d1a; --bg2: #001428;
  --surface:  rgba(255,255,255,0.04); --border: rgba(255,255,255,0.08);
  --accent:   #22d3ee; --accent2: #3b82f6; --accent3: #a855f7;
  --glow:     rgba(34,211,238,0.3); --glow2: rgba(59,130,246,0.2);
  --text: #e0f7ff; --text2: rgba(224,247,255,0.55);
  --orb1: #0369a1; --orb2: #0e7490; --orb3: #1d4ed8;
  --grad: linear-gradient(135deg, #22d3ee, #3b82f6);
}
[data-theme="forest"] {
  --bg:       #001a08; --bg2: #002410;
  --surface:  rgba(255,255,255,0.04); --border: rgba(255,255,255,0.08);
  --accent:   #4ade80; --accent2: #22d3ee; --accent3: #a3e635;
  --glow:     rgba(74,222,128,0.3); --glow2: rgba(34,211,238,0.2);
  --text: #e8fff0; --text2: rgba(232,255,240,0.55);
  --orb1: #166534; --orb2: #0e7490; --orb3: #365314;
  --grad: linear-gradient(135deg, #4ade80, #22d3ee);
}
[data-theme="sunset"] {
  --bg:       #1a0800; --bg2: #240f00;
  --surface:  rgba(255,255,255,0.04); --border: rgba(255,255,255,0.08);
  --accent:   #fb923c; --accent2: #f43f5e; --accent3: #fbbf24;
  --glow:     rgba(251,146,60,0.35); --glow2: rgba(244,63,94,0.25);
  --text: #fff7ed; --text2: rgba(255,247,237,0.55);
  --orb1: #9a3412; --orb2: #be185d; --orb3: #92400e;
  --grad: linear-gradient(135deg, #fb923c, #f43f5e);
}
[data-theme="rose"] {
  --bg:       #1a0010; --bg2: #240018;
  --surface:  rgba(255,255,255,0.04); --border: rgba(255,255,255,0.08);
  --accent:   #f472b6; --accent2: #fbbf24; --accent3: #e879f9;
  --glow:     rgba(244,114,182,0.35); --glow2: rgba(251,191,36,0.2);
  --text: #fff0f8; --text2: rgba(255,240,248,0.55);
  --orb1: #9d174d; --orb2: #92400e; --orb3: #86198f;
  --grad: linear-gradient(135deg, #f472b6, #fbbf24);
}

/* ═══════ BASE ═══════════════════════════════════════════════ */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Particles & Orbs ── */
#particles { position:fixed; inset:0; pointer-events:none; z-index:0; opacity:.7; }

.bg-orb {
  position: fixed; border-radius: 50%;
  filter: blur(90px); opacity: .12;
  pointer-events: none; z-index: 0;
  animation: orb-float 18s ease-in-out infinite;
}
.orb1 { width:600px; height:600px; background:var(--orb1); top:-180px; left:-180px; animation-delay:0s; }
.orb2 { width:500px; height:500px; background:var(--orb2); bottom:-140px; right:-140px; animation-delay:-6s; }
.orb3 { width:400px; height:400px; background:var(--orb3); top:45%; left:40%; animation-delay:-12s; }
@keyframes orb-float {
  0%,100%{transform:translate(0,0) scale(1);}
  33%{transform:translate(25px,-35px) scale(1.06);}
  66%{transform:translate(-18px,28px) scale(0.94);}
}

/* ═══════ TOPBAR ══════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.topbar-left { display:flex; align-items:center; }
.brand {
  display:flex; align-items:center; gap:8px;
  background:none; border:none; cursor:pointer;
  font-family:'Inter',sans-serif; font-size:1.15rem; font-weight:800; color:var(--text);
  transition: opacity .2s;
}
.brand:hover { opacity:.8; }
.brand-icon { font-size:1.4rem; }
.brand-ai { background:var(--grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

.topbar-nav { display:flex; gap:4px; }
.nav-btn {
  background:none; border:none; color:var(--text2);
  font-family:'Inter',sans-serif; font-size:.875rem; font-weight:500;
  padding:8px 14px; border-radius:8px; cursor:pointer;
  transition: color .2s, background .2s;
}
.nav-btn:hover { color:var(--text); background:var(--surface); }

.topbar-right { display:flex; align-items:center; gap:12px; }

/* ── Theme switcher ── */
.theme-switcher { display:flex; gap:6px; align-items:center; }
.theme-btn {
  width:18px; height:18px; border-radius:50%; border:2px solid transparent;
  cursor:pointer; transition:transform .2s, border-color .2s;
}
.theme-btn:hover { transform:scale(1.25); }
.theme-btn.active { border-color:white; transform:scale(1.2); }
[data-theme="purple"] .theme-btn[data-theme="purple"] { background:linear-gradient(135deg,#a855f7,#ec4899); }
[data-theme="ocean"]  .theme-btn[data-theme="ocean"]  { background:linear-gradient(135deg,#22d3ee,#3b82f6); }
[data-theme="forest"] .theme-btn[data-theme="forest"] { background:linear-gradient(135deg,#4ade80,#22d3ee); }
[data-theme="sunset"] .theme-btn[data-theme="sunset"] { background:linear-gradient(135deg,#fb923c,#f43f5e); }
[data-theme="rose"]   .theme-btn[data-theme="rose"]   { background:linear-gradient(135deg,#f472b6,#fbbf24); }
.theme-btn[data-theme="purple"] { background:linear-gradient(135deg,#a855f7,#ec4899); }
.theme-btn[data-theme="ocean"]  { background:linear-gradient(135deg,#22d3ee,#3b82f6); }
.theme-btn[data-theme="forest"] { background:linear-gradient(135deg,#4ade80,#22d3ee); }
.theme-btn[data-theme="sunset"] { background:linear-gradient(135deg,#fb923c,#f43f5e); }
.theme-btn[data-theme="rose"]   { background:linear-gradient(135deg,#f472b6,#fbbf24); }

/* ── API Key Button ── */
.api-key-btn {
  display:flex; align-items:center; gap:7px;
  padding:8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius:10px;
  color:var(--text); font-family:'Inter',sans-serif; font-size:.85rem; font-weight:600;
  cursor:pointer; transition:all .2s; position:relative;
  backdrop-filter:blur(10px);
}
.api-key-btn:hover { background:rgba(255,255,255,.08); border-color:var(--accent); box-shadow:0 0 16px var(--glow); }
.api-key-btn.configured { border-color:rgba(74,222,128,.5); }
.api-key-btn.configured .api-key-icon::after { content:'✅'; }
.api-key-badge {
  position:absolute; top:-5px; right:-5px;
  width:10px; height:10px; border-radius:50%;
  background:var(--risk-low); border:2px solid var(--bg);
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge { 0%,100%{box-shadow:0 0 0 0 rgba(74,222,128,.6);} 50%{box-shadow:0 0 0 5px rgba(74,222,128,0);} }

/* ═══════ MODAL ══════════════════════════════════════════════ */
.modal-overlay {
  position:fixed; inset:0; z-index:500;
  background:rgba(0,0,0,.75); backdrop-filter:blur(8px);
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.modal-overlay.hidden { display:none; }

.modal-card {
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  border-radius:24px;
  padding:32px;
  width:100%; max-width:640px;
  box-shadow:0 24px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(30px);
  animation: modal-pop .3s cubic-bezier(.34,1.56,.64,1);
  max-height:90vh; overflow-y:auto;
}
@keyframes modal-pop { from{opacity:0;transform:scale(.92) translateY(20px);} to{opacity:1;transform:none;} }

.modal-header {
  display:flex; justify-content:space-between; align-items:center; margin-bottom:12px;
}
.modal-header h2 { font-size:1.3rem; font-weight:800; }
.modal-close {
  background:none; border:none; color:var(--text2); font-size:1.2rem;
  cursor:pointer; padding:4px 8px; border-radius:6px;
  transition:color .15s, background .15s;
}
.modal-close:hover { color:var(--text); background:var(--surface); }
.modal-subtitle { font-size:.85rem; color:var(--text2); margin-bottom:24px; line-height:1.6; }
.modal-subtitle strong { color:var(--text); }

/* ── Provider Grid ── */
.provider-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:20px;
}
.prov-tile {
  background:var(--surface); border:2px solid var(--border);
  border-radius:12px; padding:12px 8px;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  cursor:pointer; transition:all .2s;
  text-align:center;
}
.prov-tile:hover { transform:translateY(-2px); border-color:var(--accent); }
.prov-tile.selected { border-color:var(--accent); background:rgba(255,255,255,.08); box-shadow:0 0 20px var(--glow); }
.prov-icon { font-size:1.5rem; }
.prov-name { font-size:.72rem; font-weight:700; }
.prov-model { font-size:.62rem; color:var(--text2); font-family:'JetBrains Mono',monospace; }

/* ── API Input ── */
.api-provider-selected {
  margin-bottom:10px; font-size:.82rem; color:var(--text2);
  padding:8px 12px; background:var(--surface); border-radius:8px;
}
.input-row { display:flex; gap:8px; margin-bottom:10px; }
.api-input {
  flex:1; padding:12px 16px;
  background:rgba(255,255,255,.05); border:1px solid var(--border);
  border-radius:10px; color:var(--text);
  font-family:'JetBrains Mono',monospace; font-size:.85rem;
  outline:none; transition:border-color .2s, box-shadow .2s;
}
.api-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--glow); }
.btn-icon {
  width:44px; height:44px; background:var(--surface); border:1px solid var(--border);
  border-radius:10px; cursor:pointer; font-size:1.1rem;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s;
}
.btn-icon:hover { background:rgba(255,255,255,.1); }

.api-links { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; }
.api-link-item {
  font-size:.78rem; color:var(--accent); text-decoration:none;
  padding:4px 0; display:flex; align-items:center; gap:6px;
}
.api-link-item:hover { text-decoration:underline; }

.modal-actions { display:flex; gap:12px; justify-content:flex-end; }

.api-status {
  margin-top:16px; padding:12px 16px; border-radius:10px; font-size:.85rem; font-weight:600;
}
.api-status.success { background:rgba(74,222,128,.12); border:1px solid rgba(74,222,128,.3); color:#4ade80; }
.api-status.error   { background:rgba(248,113,113,.12); border:1px solid rgba(248,113,113,.3); color:#f87171; }

/* ═══════ SECTIONS ═══════════════════════════════════════════ */
.section {
  display:none; min-height:100vh;
  flex-direction:column; align-items:center; justify-content:center;
  padding:88px 24px 60px;
  position:relative; z-index:1;
}
.section.active { display:flex; animation:sec-in .5s cubic-bezier(.4,0,.2,1) both; }
@keyframes sec-in { from{opacity:0;transform:translateY(24px);} to{opacity:1;transform:none;} }

/* ═══════ HERO ════════════════════════════════════════════════ */
.hero-wrapper { text-align:center; max-width:820px; width:100%; position:relative; }

.hero-badge {
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(168,85,247,.12); border:1px solid rgba(168,85,247,.25);
  color:var(--accent); padding:7px 16px; border-radius:100px;
  font-size:.78rem; font-weight:600; letter-spacing:.04em; margin-bottom:28px;
}
.pulse-dot {
  width:6px; height:6px; border-radius:50%; background:var(--risk-low);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{box-shadow:0 0 0 0 rgba(74,222,128,.6);} 50%{box-shadow:0 0 0 6px rgba(74,222,128,0);} }

.hero-title {
  font-size:clamp(3.5rem,10vw,7.5rem); font-weight:900;
  line-height:1; letter-spacing:-.04em; margin-bottom:20px;
}
.grad-text { background:var(--grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.title-ai { color:rgba(255,255,255,.35); font-size:.6em; font-weight:700; }

.hero-sub { font-size:1.1rem; color:var(--text2); margin-bottom:44px; }
.hero-sub strong { color:var(--text); }

/* Stat row */
.stat-row {
  display:flex; align-items:center; justify-content:center;
  gap:0; background:var(--surface); backdrop-filter:blur(20px);
  border:1px solid var(--border); border-radius:20px;
  padding:20px 36px; margin-bottom:36px;
  box-shadow:0 8px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
}
.stat-pill { text-align:center; padding:0 28px; }
.stat-num { font-size:2rem; font-weight:900; background:var(--grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.stat-u   { font-size:1rem; font-weight:700; color:var(--accent); }
.stat-lbl { display:block; font-size:.7rem; color:var(--text2); margin-top:4px; text-transform:uppercase; letter-spacing:.08em; font-weight:600; }
.stat-sep { width:1px; height:44px; background:var(--border); }

.hero-cta { display:flex; gap:14px; justify-content:center; margin-bottom:48px; }

/* Floating hair strands */
.hair-strands { position:absolute; inset:0; pointer-events:none; overflow:visible; }
.hs { position:absolute; }
.hs1 { width:28px; height:180px; top:-50px; left:-90px;  animation:hs-float 9s  ease-in-out infinite; }
.hs2 { width:22px; height:150px; top:10px;  right:-70px; animation:hs-float 11s ease-in-out infinite reverse 1s; }
.hs3 { width:18px; height:200px; bottom:0;  left:-50px;  animation:hs-float 13s ease-in-out infinite 2s; }
.hs4 { width:22px; height:160px; bottom:20px; right:-90px; animation:hs-float 10s ease-in-out infinite .5s; }
@keyframes hs-float { 0%,100%{transform:translateY(0) rotate(-4deg);} 50%{transform:translateY(-18px) rotate(4deg);} }

/* Info cards */
.info-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:0; }
.info-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:16px; padding:20px; text-align:left;
  transition:transform .25s, box-shadow .25s;
}
.info-card:hover { transform:translateY(-4px); box-shadow:0 12px 40px rgba(0,0,0,.3); }
.info-card-icon { font-size:1.8rem; margin-bottom:10px; display:block; }
.info-card h3 { font-size:.9rem; font-weight:700; margin-bottom:6px; }
.info-card p  { font-size:.8rem; color:var(--text2); line-height:1.5; }

/* ═══════ ANIMATE-IN ══════════════════════════════════════════ */
.animate-in { animation:fade-up .7s cubic-bezier(.4,0,.2,1) both; }
.delay-1{animation-delay:.1s} .delay-2{animation-delay:.2s}
.delay-3{animation-delay:.3s} .delay-4{animation-delay:.45s} .delay-5{animation-delay:.6s}
@keyframes fade-up { from{opacity:0;transform:translateY(28px);} to{opacity:1;transform:none;} }

/* ═══════ BUTTONS ════════════════════════════════════════════ */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 24px; border-radius:12px;
  font-family:'Inter',sans-serif; font-size:.9rem; font-weight:700;
  cursor:pointer; border:none;
  transition:all .2s cubic-bezier(.34,1.56,.64,1);
  position:relative; overflow:hidden; white-space:nowrap;
}
.btn svg { width:16px; height:16px; transition:transform .2s; }
.btn:hover svg { transform:translateX(3px); }
.btn-primary {
  background:var(--grad); color:#fff;
  box-shadow:0 4px 20px var(--glow);
}
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 8px 30px var(--glow); }
.btn-primary:active { transform:none; }
.btn-outline {
  background:transparent; color:var(--text);
  border:1.5px solid var(--border);
}
.btn-outline:hover { background:var(--surface); border-color:var(--accent); transform:translateY(-2px); }
.btn-ghost { background:var(--surface); color:var(--text2); border:1px solid var(--border); }
.btn-ghost:hover { color:var(--text); background:rgba(255,255,255,.07); transform:translateY(-1px); }
.btn-lg { padding:15px 32px; font-size:1rem; border-radius:14px; }
.btn-analyze { min-width:200px; }
.link-btn { background:none; border:none; color:var(--accent); cursor:pointer; font-size:inherit; text-decoration:underline; padding:0; }

/* Spinner */
.spinner { width:16px; height:16px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .65s linear infinite; }
@keyframes spin { to{transform:rotate(360deg);} }
.hidden { display:none!important; }

/* ═══════ WIZARD ═════════════════════════════════════════════ */
.wizard-container {
  width:100%; max-width:680px;
  background:linear-gradient(145deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border:1px solid var(--border);
  border-radius:28px; padding:36px;
  box-shadow:0 20px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter:blur(30px);
}

/* Progress bar */
.wizard-progress { margin-bottom:36px; }
.wiz-bar { height:4px; background:rgba(255,255,255,.07); border-radius:2px; margin-bottom:18px; overflow:hidden; }
.wiz-bar-fill { height:100%; background:var(--grad); border-radius:2px; transition:width .5s cubic-bezier(.34,1.56,.64,1); width:25%; }
.wiz-steps { display:flex; justify-content:space-between; }
.wiz-step { display:flex; flex-direction:column; align-items:center; gap:5px; }
.ws-dot {
  width:30px; height:30px; border-radius:50%;
  background:rgba(255,255,255,.05); border:2px solid rgba(255,255,255,.12);
  display:flex; align-items:center; justify-content:center;
  font-size:.75rem; font-weight:800;
  transition:all .3s cubic-bezier(.34,1.56,.64,1);
}
.wiz-step.active .ws-dot { background:var(--grad); border-color:transparent; box-shadow:0 0 18px var(--glow); transform:scale(1.15); }
.wiz-step.done .ws-dot { background:#4ade80; border-color:transparent; }
.wiz-step span { font-size:.7rem; color:var(--text2); font-weight:600; }
.wiz-step.active span { color:var(--accent); }

/* Step panels */
.wiz-step-panel { display:none; animation:fade-up .35s cubic-bezier(.4,0,.2,1) both; }
.wiz-step-panel.active { display:block; }

.step-hd { text-align:center; margin-bottom:32px; }
.step-emoji { font-size:2.8rem; margin-bottom:10px; animation:pop-in .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop-in { from{transform:scale(0);} 70%{transform:scale(1.2);} to{transform:scale(1);} }
.step-hd h2 { font-size:1.45rem; font-weight:800; margin-bottom:6px; }
.step-hd p  { font-size:.85rem; color:var(--text2); }

.fields { display:flex; flex-direction:column; gap:24px; margin-bottom:32px; }

/* Field groups */
.field-group label {
  display:block; font-size:.9rem; font-weight:700; margin-bottom:12px;
  color:rgba(255,255,255,.88);
}
.range-note { font-size:.75rem; font-weight:400; color:var(--text2); }
.why-tip {
  cursor:help; color:var(--accent); font-size:.8rem;
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%;
  background:rgba(168,85,247,.15); margin-left:4px;
  font-style:normal;
}

/* ── Slider ── */
.slider-row { position:relative; display:flex; align-items:center; gap:12px; }
.slider {
  flex:1; height:6px; border-radius:3px;
  background:rgba(255,255,255,.08); -webkit-appearance:none; appearance:none;
  outline:none; cursor:pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:22px; height:22px; border-radius:50%;
  background:var(--grad); cursor:pointer;
  box-shadow:0 0 12px var(--glow);
  transition:transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
}
.slider::-webkit-slider-thumb:hover { transform:scale(1.25); box-shadow:0 0 20px var(--glow); }
.slider-val {
  min-width:62px; text-align:right;
  font-family:'JetBrains Mono',monospace; font-size:.82rem; font-weight:700; color:var(--accent);
}
.slider-ticks { display:flex; justify-content:space-between; margin-top:5px; font-size:.68rem; color:var(--text2); }
.stress-emoji-row { display:flex; justify-content:space-between; margin-top:6px; font-size:.72rem; color:var(--text2); }
.sleep-zones { display:flex; justify-content:space-between; margin-top:6px; font-size:.68rem; }
.sz-bad{color:#f87171} .sz-mid{color:#fbbf24} .sz-ok{color:#4ade80} .sz-good{color:var(--accent3)}

/* ── Big cards (gender) ── */
.big-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.big-card {
  background:rgba(255,255,255,.03); border:2px solid var(--border);
  border-radius:14px; padding:18px 12px; text-align:center;
  cursor:pointer; transition:all .2s cubic-bezier(.34,1.56,.64,1);
  display:flex; flex-direction:column; align-items:center; gap:7px;
}
.big-card:hover { border-color:var(--accent); background:rgba(255,255,255,.06); transform:translateY(-2px); }
.big-card.active { border-color:var(--accent); background:rgba(168,85,247,.15); box-shadow:0 0 24px var(--glow); transform:translateY(-3px); }
.bc-icon { font-size:2rem; transition:transform .2s cubic-bezier(.34,1.56,.64,1); }
.big-card:hover .bc-icon, .big-card.active .bc-icon { transform:scale(1.2); }
.bc-label { font-weight:800; font-size:.95rem; }
.bc-sub { font-size:.71rem; color:var(--text2); }

/* ── Option cards (3-col) ── */
.opt-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; }
.opt-cards-2 { grid-template-columns:repeat(2,1fr); }
.opt-card {
  background:rgba(255,255,255,.03); border:2px solid var(--border);
  border-radius:12px; padding:14px 10px; text-align:center;
  cursor:pointer; transition:all .2s cubic-bezier(.34,1.56,.64,1);
  display:flex; flex-direction:column; align-items:center; gap:5px;
  position:relative; overflow:hidden;
}
.opt-card::before { content:''; position:absolute; inset:0; background:rgba(255,255,255,0); transition:background .15s; }
.opt-card:hover::before { background:rgba(255,255,255,.04); }
.opt-card:hover { border-color:var(--accent); transform:translateY(-2px); }
.opt-card.active { border-color:var(--accent); background:rgba(168,85,247,.15); box-shadow:0 0 18px var(--glow); transform:translateY(-3px); }
.opt-card.risk-card.active { border-color:#f87171; background:rgba(248,113,113,.12); box-shadow:0 0 18px rgba(248,113,113,.25); }
.oc-icon  { font-size:1.6rem; transition:transform .2s cubic-bezier(.34,1.56,.64,1); }
.opt-card:hover .oc-icon, .opt-card.active .oc-icon { transform:scale(1.15) rotate(-5deg); }
.oc-label { font-weight:700; font-size:.82rem; }
.oc-sub   { font-size:.68rem; color:var(--text2); }

/* AI Reminder */
.ai-reminder {
  display:flex; gap:14px; align-items:flex-start;
  background:rgba(168,85,247,.08); border:1px solid rgba(168,85,247,.2);
  border-radius:12px; padding:16px;
  font-size:.83rem;
}
.ai-reminder.configured { background:rgba(74,222,128,.08); border-color:rgba(74,222,128,.2); }
.air-icon { font-size:1.5rem; flex-shrink:0; }
.ai-reminder strong { display:block; margin-bottom:3px; color:var(--text); }
.ai-reminder p { color:var(--text2); }

/* Step nav */
.step-nav { display:flex; justify-content:space-between; align-items:center; padding-top:4px; }

/* ═══════ RESULTS ════════════════════════════════════════════ */
.results-wrap { width:100%; max-width:880px; display:flex; flex-direction:column; gap:20px; }

/* Top row */
.res-top-row { display:grid; grid-template-columns:1fr 1.4fr; gap:20px; align-items:stretch; }

/* Ring meter card */
.ring-meter-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:20px; padding:24px; text-align:center;
  box-shadow:0 8px 32px rgba(0,0,0,.4);
  display:flex; flex-direction:column; align-items:center;
}
.card-label { font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--text2); margin-bottom:16px; }
.ring-meter { position:relative; width:200px; height:200px; margin:0 auto; }
.ring-svg { width:100%; height:100%; }
#ring-progress { transition:stroke-dashoffset 1.6s cubic-bezier(.4,0,.2,1); }
.ring-center {
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
}
.ring-num { font-size:3rem; font-weight:900; background:var(--grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; line-height:1; }
.ring-pct { font-size:1.1rem; font-weight:700; color:var(--accent); vertical-align:top; margin-top:4px; }
.ring-cat { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--text2); margin-top:4px; }
.risk-zones { display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; justify-content:center; }
.rz { font-size:.68rem; font-weight:600; padding:3px 8px; border-radius:6px; }
.rz-low  { background:rgba(74,222,128,.15); color:#4ade80; }
.rz-mid  { background:rgba(251,191,36,.15); color:#fbbf24; }
.rz-high { background:rgba(248,113,113,.15); color:#f87171; }

/* Verdict card */
.verdict-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:20px; padding:28px;
  box-shadow:0 8px 32px rgba(0,0,0,.4);
  display:flex; flex-direction:column; gap:12px;
}
.verdict-card.high { border-color:rgba(248,113,113,.4); box-shadow:0 8px 40px rgba(248,113,113,.12); }
.verdict-card.mid  { border-color:rgba(251,191,36,.4);  box-shadow:0 8px 40px rgba(251,191,36,.12); }
.verdict-card.low  { border-color:rgba(74,222,128,.4);  box-shadow:0 8px 40px rgba(74,222,128,.12); }
.verdict-icon  { font-size:2.8rem; animation:pop-in .5s cubic-bezier(.34,1.56,.64,1); }
.verdict-title { font-size:1.5rem; font-weight:900; line-height:1.2; }
.verdict-sub   { font-size:.88rem; color:var(--text2); }
.verdict-stats { display:flex; flex-direction:column; gap:7px; }
.vs-item { display:flex; align-items:center; gap:8px; font-size:.8rem; }
.vs-dot  { width:8px; height:8px; border-radius:50%; flex-shrink:0; }

/* Result cards */
.res-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:20px; padding:24px 28px;
  box-shadow:0 8px 32px rgba(0,0,0,.35);
}
.res-card-title {
  display:flex; align-items:center; gap:9px;
  font-size:1rem; font-weight:800; margin-bottom:20px;
}
.card-sub { margin-left:auto; font-size:.72rem; color:var(--text2); font-weight:400; }

/* Radar chart */
.radar-wrapper { display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
#radar-canvas { flex-shrink:0; }
.radar-legend { display:flex; flex-direction:column; gap:8px; }
.rl-item { display:flex; align-items:center; gap:8px; font-size:.8rem; }
.rl-dot  { width:10px; height:10px; border-radius:50%; flex-shrink:0; }

/* Contribution bars */
.contrib-list { display:flex; flex-direction:column; gap:10px; }
.contrib-item { animation:fade-up .4s ease both; }
.ci-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:5px; }
.ci-name { display:flex; align-items:center; gap:7px; font-size:.82rem; font-weight:600; }
.ci-val  { font-size:.75rem; font-family:'JetBrains Mono',monospace; color:var(--accent); background:rgba(168,85,247,.12); padding:2px 8px; border-radius:5px; }
.ci-bar-track { height:6px; background:rgba(255,255,255,.06); border-radius:3px; overflow:hidden; }
.ci-bar-fill  { height:100%; border-radius:3px; transition:width 1s cubic-bezier(.4,0,.2,1); }
.ci-label { font-size:.67rem; color:var(--text2); margin-top:3px; }

/* Model stats */
.model-stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.ms-card { background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:12px; padding:14px; text-align:center; animation:fade-up .4s ease both; }
.ms-val  { font-size:1.6rem; font-weight:900; color:var(--accent); }
.ms-name { font-size:.68rem; color:var(--text2); margin-top:4px; text-transform:uppercase; letter-spacing:.06em; font-weight:600; }

/* AI recommendation */
.ai-rec-card { border-color:rgba(168,85,247,.2); }
.ai-provider-badge { margin-left:auto; font-size:.7rem; font-weight:600; background:rgba(168,85,247,.15); border:1px solid rgba(168,85,247,.3); color:var(--accent); padding:3px 10px; border-radius:100px; }
.ai-thinking { display:flex; flex-direction:column; align-items:center; gap:14px; padding:28px; color:var(--text2); font-size:.88rem; }
.thinking-dots { display:flex; gap:8px; }
.thinking-dots span { width:8px; height:8px; background:var(--accent); border-radius:50%; animation:dot-bounce 1.4s ease-in-out infinite; }
.thinking-dots span:nth-child(2){animation-delay:.2s}
.thinking-dots span:nth-child(3){animation-delay:.4s}
@keyframes dot-bounce { 0%,80%,100%{transform:scale(.7);opacity:.4;} 40%{transform:scale(1.1);opacity:1;} }
.ai-rec-output { font-size:.9rem; line-height:1.85; color:rgba(255,255,255,.82); white-space:pre-wrap; }
.ai-rec-output strong { color:#fff; font-weight:700; }

/* Sources */
.sources-card { }
.sources-list { display:flex; flex-direction:column; gap:8px; }
.source-item { font-size:.8rem; color:var(--accent); text-decoration:none; padding:8px 12px; background:rgba(255,255,255,.03); border-radius:8px; border:1px solid var(--border); transition:background .15s; }
.source-item:hover { background:rgba(255,255,255,.07); }

/* Disclaimer */
.disclaimer-box {
  background:rgba(251,191,36,.07); border:1px solid rgba(251,191,36,.2);
  border-radius:12px; padding:14px 18px; font-size:.82rem; color:rgba(255,255,255,.65);
}
.disclaimer-box strong { color:#fbbf24; }
.res-actions { display:flex; gap:14px; justify-content:center; }

/* ═══════ ABOUT ══════════════════════════════════════════════ */
.about-wrap { max-width:960px; width:100%; }
.about-head { text-align:center; margin-bottom:44px; }
.about-head h2 { font-size:2.4rem; font-weight:900; margin-bottom:10px; }
.about-head p  { color:var(--text2); font-size:.95rem; }
.about-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; margin-bottom:32px; }
.about-card { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:24px; transition:transform .2s, box-shadow .2s; }
.about-card:hover { transform:translateY(-4px); box-shadow:0 14px 40px rgba(0,0,0,.35); }
.ac-icon { font-size:2.2rem; margin-bottom:14px; display:block; }
.about-card h3 { font-size:1rem; font-weight:800; margin-bottom:14px; }
.team-ul { list-style:none; display:flex; flex-direction:column; gap:9px; margin-bottom:14px; }
.team-ul li { display:flex; justify-content:space-between; font-size:.88rem; }
.team-ul li code { font-family:'JetBrains Mono',monospace; font-size:.73rem; color:var(--accent); background:rgba(168,85,247,.12); padding:2px 8px; border-radius:5px; }
.supervisor { font-size:.78rem; color:var(--text2); font-style:italic; }
.ml-steps { display:flex; flex-direction:column; gap:12px; }
.ml-step { display:flex; gap:10px; font-size:.83rem; color:var(--text2); align-items:flex-start; }
.ml-n { width:22px; height:22px; background:var(--grad); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:900; color:#fff; flex-shrink:0; }
.src-ul { list-style:none; display:flex; flex-direction:column; gap:7px; }
.src-ul li { font-size:.8rem; color:var(--text2); padding-left:12px; border-left:2px solid var(--accent); }
.feat-bars { display:flex; flex-direction:column; gap:9px; }
.fb-row { display:flex; align-items:center; gap:10px; }
.fb-lbl { font-size:.75rem; color:var(--text2); width:120px; flex-shrink:0; }
.fb-track { flex:1; height:5px; background:rgba(255,255,255,.06); border-radius:3px; overflow:hidden; }
.fb-fill { height:100%; border-radius:3px; transition:width 1.2s cubic-bezier(.4,0,.2,1); }
.fb-score { font-size:.68rem; font-family:'JetBrains Mono',monospace; color:var(--text2); width:36px; text-align:right; }

.provider-section { margin-bottom:32px; }
.provider-section h3 { font-size:1.1rem; font-weight:800; margin-bottom:16px; display:flex; align-items:center; gap:10px; }
.free-badge { font-size:.7rem; background:rgba(74,222,128,.15); border:1px solid rgba(74,222,128,.3); color:#4ade80; padding:3px 10px; border-radius:100px; font-weight:600; }
.provider-row { display:flex; flex-wrap:wrap; gap:10px; }
.prov-chip { display:flex; align-items:center; gap:7px; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:9px 14px; font-size:.82rem; font-weight:600; }

.about-actions { display:flex; gap:14px; justify-content:center; }

/* ═══════ SIDE NAV ════════════════════════════════════════════ */
.side-nav { position:fixed; right:20px; top:50%; transform:translateY(-50%); z-index:100; display:flex; flex-direction:column; gap:10px; }
.side-dot { width:9px; height:9px; border-radius:50%; border:2px solid rgba(255,255,255,.25); background:transparent; cursor:pointer; transition:all .2s cubic-bezier(.34,1.56,.64,1); }
.side-dot:hover, .side-dot.active { background:#fff; border-color:var(--accent); transform:scale(1.5); box-shadow:0 0 10px var(--accent); }

/* ═══════ TOAST ══════════════════════════════════════════════ */
.toast {
  position:fixed; bottom:28px; left:50%; transform:translateX(-50%) translateY(80px);
  background:rgba(20,20,30,.95); backdrop-filter:blur(20px);
  border:1px solid var(--border); color:#fff;
  padding:12px 22px; border-radius:12px; font-size:.85rem; z-index:1000;
  transition:transform .3s cubic-bezier(.34,1.56,.64,1); white-space:nowrap;
}
.toast.show { transform:translateX(-50%) translateY(0); }

/* ═══════ RESPONSIVE ══════════════════════════════════════════ */
@media(max-width:768px){
  .topbar { padding:0 16px; }
  .topbar-nav { display:none; }
  .stat-row { flex-direction:column; padding:20px; }
  .stat-sep { width:60%; height:1px; }
  .hero-cta { flex-direction:column; align-items:center; }
  .info-cards { grid-template-columns:1fr; }
  .wizard-container { padding:24px; }
  .big-cards { grid-template-columns:1fr; }
  .opt-cards { grid-template-columns:1fr; }
  .opt-cards-2 { grid-template-columns:1fr; }
  .res-top-row { grid-template-columns:1fr; }
  .model-stat-grid { grid-template-columns:repeat(2,1fr); }
  .about-grid { grid-template-columns:1fr; }
  .radar-wrapper { justify-content:center; }
  .side-nav { display:none; }
  .theme-switcher { display:none; }
}
