:root {
  --bg: #0b0b0f;
  --panel: #14141b;
  --panel-2: #1b1b24;
  --line: #26262f;
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --accent: #7c5cff;
  --accent-2: #19d3a2;
  --grad: linear-gradient(135deg, #7c5cff 0%, #19d3a2 100%);
  --bad: #ff5c7c;
  --warn: #ffb84d;
  --radius: 18px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 28px 18px 40px;
  justify-content: center;
  align-items: flex-start;
  animation: fade .35s ease;
}
.screen.active { display: flex; }

@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.phone {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.phone.center { align-items: center; text-align: center; justify-content: center; min-height: 80vh; }

/* ── Typography ── */
.badge {
  align-self: flex-start;
  font-weight: 900;
  letter-spacing: 3px;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.hook { font-size: 40px; line-height: 1.05; font-weight: 900; letter-spacing: -1px; margin-top: 8px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.sub { color: var(--muted); font-size: 16px; line-height: 1.5; }
.sub.small { font-size: 13px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; color: var(--accent-2); }
.section-h { font-size: 18px; font-weight: 700; margin-top: 8px; }
.fineprint { font-size: 12px; color: var(--muted); text-align: center; }

.trust { list-style: none; display: flex; gap: 18px; margin-top: 6px; }
.trust li { font-size: 12px; color: var(--muted); line-height: 1.3; }
.trust span { display: block; font-size: 18px; font-weight: 800; color: var(--text); }

/* ── Buttons ── */
.cta {
  border: 0;
  background: var(--grad);
  color: #0b0b0f;
  font-weight: 800;
  font-size: 17px;
  padding: 17px 22px;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
  transition: transform .1s ease, filter .2s ease;
}
.cta:hover { filter: brightness(1.05); }
.cta:active { transform: scale(.98); }
.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: 14px;
  cursor: pointer;
  width: 100%;
}

/* ── Camera ── */
.camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
#video, .preview { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview { transform: none; }
.face-guide {
  position: absolute; inset: 50% auto auto 50%;
  width: 58%; aspect-ratio: 3/4; transform: translate(-50%, -50%);
  border: 2px dashed rgba(255,255,255,.4); border-radius: 50%;
  pointer-events: none;
}
.camera-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); background: #000;
}
.capture-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── Analyzing ── */
.scanner {
  position: relative; width: 180px; height: 240px; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); background: #000; margin-bottom: 8px;
}
.scan-img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.scan-line {
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  box-shadow: 0 0 16px 4px rgba(25,211,162,.6);
  animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan { 0% { top: 4%; } 50% { top: 94%; } 100% { top: 4%; } }

.progress { width: 100%; max-width: 280px; height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--grad); transition: width .3s ease; }

.checklist { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.checklist li { color: var(--muted); font-size: 14px; opacity: .4; transition: opacity .3s, color .3s; }
.checklist li.done { opacity: 1; color: var(--text); }
.checklist li.done::before { content: '✓ '; color: var(--accent-2); font-weight: 800; }

/* ── Results ── */
.score-ring { position: relative; width: 180px; height: 180px; align-self: center; margin: 4px 0; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--panel); stroke-width: 10; }
.ring-fg {
  fill: none; stroke: url(#g); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1);
  stroke: var(--accent);
}
.score-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.score-num span { font-size: 52px; font-weight: 900; letter-spacing: -2px; }
.score-num small { color: var(--muted); font-size: 14px; margin-top: -6px; }
.score-caption { text-align: center; color: var(--muted); font-size: 15px; }

.zones { display: flex; flex-direction: column; gap: 10px; }
.zone {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.zone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.zone-name { font-weight: 700; font-size: 15px; }
.zone-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.zone-tag.bad { background: rgba(255,92,124,.15); color: var(--bad); }
.zone-tag.warn { background: rgba(255,184,77,.15); color: var(--warn); }
.zone-bar { height: 7px; background: #000; border-radius: 99px; overflow: hidden; }
.zone-bar > div { height: 100%; border-radius: 99px; }

.potential {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.potential-bar { display: flex; align-items: center; justify-content: space-around; }
.potential-bar span { font-size: 34px; font-weight: 900; }
.potential-bar .now span { color: var(--muted); }
.potential-bar .goal span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.potential-bar label { display: block; text-align: center; font-size: 12px; color: var(--muted); }
.potential-bar .arrow { font-size: 24px; color: var(--muted); }

/* ── Paywall ── */
.benefits { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 4px 0; }
.benefits li { font-size: 15px; color: var(--text); }
.plan {
  border: 2px solid var(--accent); border-radius: 16px; padding: 16px; background: rgba(124,92,255,.07);
}
.plan-top { display: flex; justify-content: space-between; align-items: center; }
.plan-top strong { font-size: 18px; }
.best { font-size: 10px; font-weight: 800; letter-spacing: 1px; background: var(--grad); color: #0b0b0f; padding: 3px 8px; border-radius: 6px; margin-left: 8px; }
.plan-price b { font-size: 24px; }
.plan-price small { color: var(--muted); }
.plan-sub { color: var(--muted); font-size: 13px; margin-top: 8px; }
.error { color: var(--bad); font-size: 13px; text-align: center; }

/* ── Sticky CTA bar (results + paywall) ── */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.sticky-bar > * { width: 100%; max-width: 440px; }

#screen-results .phone,
#screen-paywall .phone {
  padding-bottom: 120px;
}

.hidden { display: none !important; }

@media (max-width: 380px) {
  .hook { font-size: 34px; }
}
