:root {
  --midnight: #0F0F1A;
  --signal: #7F77DD;
  --signal-dark: #534AB7;
  --flux: #1D9E75;
  --flux-dark: #0F6E56;
  --play: #EF9F27;
  --papier: #F5F4F0;
  --gray80: #5F5E5A;
  --gray50: #888780;
  --gray20: #D3D1C7;
  --red: #E85D5D;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--midnight);
  color: #fff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,15,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 clamp(1rem,4vw,2rem);
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.logo { display: flex; flex-direction: column; gap: 4px; }
.logo-play { font-weight: 800; font-size: 1.25rem; color: #fff; }
.logo-arch { font-weight: 200; font-size: 1.25rem; color: var(--signal); }
.logo-bars { display: flex; gap: 3px; }
.bar-g { width: 28px; height: 2px; background: var(--flux); border-radius: 1px; }
.bar-i { width: 10px; height: 2px; background: var(--signal); border-radius: 1px; }
.bar-a { width: 5px; height: 2px; background: var(--play); border-radius: 1px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-step { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.35); }
.progress-track { width: 120px; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--flux), var(--signal)); border-radius: 2px; transition: width 0.5s cubic-bezier(0.16,1,0.3,1); }

/* SCREENS */
.screen {
  display: none; min-height: 100vh; padding: 80px 0 40px;
  position: relative; overflow: hidden;
}
.screen.active { display: flex; animation: fadeIn 0.5s ease; }
.screen-inner {
  max-width: 720px; margin: 0 auto; padding: 0 clamp(1rem,5vw,2rem);
  width: 100%; display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 120px);
}
.center-content { align-items: center; text-align: center; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* WELCOME */
.welcome-badge {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--flux); background: rgba(29,158,117,0.12); border: 1px solid rgba(29,158,117,0.25);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 2rem;
}
.welcome-title {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.15; margin-bottom: 1.5rem;
}
.text-signal { color: var(--signal); }
.welcome-sub {
  font-size: 1rem; color: rgba(255,255,255,0.5); max-width: 480px;
  line-height: 1.7; margin-bottom: 2.5rem;
}
.welcome-footer {
  display: flex; gap: 12px; font-size: 0.7rem; color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3rem;
}

/* BUTTONS */
.btn-start {
  padding: 14px 32px; background: var(--flux); color: #fff;
  font-family: inherit; font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: none; border-radius: 8px; cursor: pointer;
  transition: all 0.2s ease;
}
.btn-start:hover { background: var(--flux-dark); transform: translateY(-2px); }
.btn-next {
  padding: 12px 28px; background: var(--signal); color: #fff;
  font-family: inherit; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: none; border-radius: 8px; cursor: pointer; transition: all 0.2s ease;
}
.btn-next:hover { background: var(--signal-dark); }
.btn-results { background: var(--flux); }
.btn-results:hover { background: var(--flux-dark); }
.btn-ghost {
  padding: 12px 20px; background: transparent; color: rgba(255,255,255,0.4);
  font-family: inherit; font-size: 0.8rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  cursor: pointer; transition: all 0.2s ease;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }
.nav-buttons { display: flex; justify-content: space-between; margin-top: 2.5rem; }

/* QUESTION HEADER */
.q-header { margin-bottom: 2rem; }
.q-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--signal); display: inline-block; margin-bottom: 0.75rem;
}
.q-tag--flux { color: var(--flux); }
.q-tag--play { color: var(--play); }
.q-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.q-sub { font-size: 0.9rem; color: rgba(255,255,255,0.45); line-height: 1.6; }

/* OPTION CARDS (grid) */
.options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.options-grid.small { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.opt-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 1.5rem 1rem; text-align: center;
  cursor: pointer; transition: all 0.25s ease; font-family: inherit; color: #fff;
}
.opt-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.opt-card.selected { background: rgba(127,119,221,0.12); border-color: var(--signal); }
.opt-card.mini { padding: 1rem 0.75rem; }
.opt-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.opt-label { font-size: 0.8rem; font-weight: 600; }

/* OPTION ROWS (list) */
.options-list { display: flex; flex-direction: column; gap: 8px; }
.opt-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 14px 18px; cursor: pointer;
  transition: all 0.2s ease; font-family: inherit; font-size: 0.85rem; color: #fff; width: 100%; text-align: left;
}
.opt-row:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
.opt-row.selected { background: rgba(127,119,221,0.1); border-color: var(--signal); }
.opt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.opt-dot.red { background: var(--red); }
.opt-dot.amber { background: var(--play); }
.opt-dot.green { background: var(--flux); }
.opt-tag { font-size: 0.6rem; font-weight: 700; padding: 3px 8px; border-radius: 100px; margin-left: auto; letter-spacing: 0.06em; text-transform: uppercase; }
.red-bg { background: rgba(232,93,93,0.15); color: var(--red); }
.amber-bg { background: rgba(239,159,39,0.15); color: var(--play); }
.green-bg { background: rgba(29,158,117,0.15); color: var(--flux); }

/* SLIDER */
.slider-section { text-align: center; padding: 2rem 0; }
.slider-display { font-size: 4rem; font-weight: 800; color: var(--signal); letter-spacing: -0.03em; margin-bottom: 1rem; }
.custom-slider { width: 100%; max-width: 500px; height: 6px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,0.08); border-radius: 3px; outline: none; }
.custom-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--signal); cursor: pointer; border: 3px solid var(--midnight); box-shadow: 0 0 12px rgba(127,119,221,0.4); }
.slider-labels { display: flex; justify-content: space-between; max-width: 500px; margin: 8px auto 0; font-size: 0.7rem; color: rgba(255,255,255,0.25); }
.slider-insight { margin-top: 1.5rem; font-size: 0.85rem; color: rgba(255,255,255,0.5); font-style: italic; }

/* RESULTS */
.results-screen { max-width: 820px; }
.results-header { display: flex; align-items: center; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.score-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--signal); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.5s cubic-bezier(0.16,1,0.3,1), stroke 0.5s ease; }
.score-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%); font-size: 2rem; font-weight: 800; }
.score-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, 60%); font-size: 0.65rem; color: rgba(255,255,255,0.3); }
.results-title { font-size: 1.5rem; font-weight: 800; }
.results-sub { font-size: 0.85rem; color: rgba(255,255,255,0.45); margin-top: 0.4rem; line-height: 1.6; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 2.5rem; }
.result-card {
  background: rgba(255,255,255,0.03); border: 0.5px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 1.25rem; border-top: 2px solid var(--signal);
}
.result-card h4 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 0.5rem; }
.result-card .grade { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.result-card p { font-size: 0.75rem; color: rgba(255,255,255,0.4); line-height: 1.5; }
.grade-red { color: var(--red); }
.grade-amber { color: var(--play); }
.grade-green { color: var(--flux); }

.results-reco { margin-bottom: 2.5rem; }
.reco-title { font-size: 1rem; font-weight: 800; margin-bottom: 1rem; }
.reco-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(29,158,117,0.06); border: 0.5px solid rgba(29,158,117,0.15);
  border-left: 3px solid var(--flux); border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem; margin-bottom: 8px;
}
.reco-num { font-size: 0.7rem; font-weight: 800; color: var(--flux); background: rgba(29,158,117,0.15); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reco-text { font-size: 0.85rem; color: rgba(255,255,255,0.7); line-height: 1.6; }
.reco-text strong { color: #fff; }

.results-cta {
  text-align: center; padding: 2rem; background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(255,255,255,0.08); border-radius: 16px;
}
.results-cta h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.results-cta p { font-size: 0.85rem; color: rgba(255,255,255,0.45); margin-bottom: 1.5rem; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Background dots pattern */
.screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(127,119,221,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

@media (max-width: 640px) {
  .options-grid { grid-template-columns: 1fr 1fr; }
  .results-header { flex-direction: column; text-align: center; }
  .results-grid { grid-template-columns: 1fr; }
  .welcome-footer { flex-wrap: wrap; justify-content: center; }
}
