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

/* ── Tokens ── */
:root {
  --bg:        #F5F7FA;
  --white:     #FFFFFF;
  --text:      #000000;
  --text2:     #6C6C70;
  --text3:     #AEAEB2;
  --border:    #E5E5EA;

  --pink:      #FF6B6B;
  --pink-lt:   #FFF0F5;
  --pink-bd:   #FFD6E7;

  --blue:      #4B8EF1;
  --blue-lt:   #EFF6FF;

  --green:     #2ECC71;
  --green-lt:  #EDFBF1;
  --green-bd:  #B2EDBD;

  --orange:    #F7A800;
  --purple:    #8A30E6;
  --purp-lt:   #F0ECFF;
  --purp-bd:   #C9BAFF;

  --num-bg:    #4B8EF1;
  --hot:       linear-gradient(90deg, #D17FFF 0%, #8A30E6 100%);
  --slider:    linear-gradient(90deg, #D17FFF 0%, #8A30E6 100%);
  --arch-bg:   linear-gradient(135deg,#6B44D4 0%,#9B59E8 100%);

  --r:  24px;
  --rs: 14px;
  --shadow: 0 2px 14px rgba(0,0,0,.07);
  --shadow-sm: 0 1px 6px rgba(0,0,0,.05);
}


/* ── Global Header ── */
.global-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.lang-sel {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.head-icons {
  display: flex; align-items: center; gap: 12px;
}
.head-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: #F5F7FA;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer;
  transition: opacity .2s;
}
.head-icon:active { opacity: 0.7; }
.text-gradient {
  background: var(--hot);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Base ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html,body {
  height:100%; overflow:hidden;
  font-family:'Inter',sans-serif;
  background:var(--bg); color:var(--text);
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
}
#app { width:100%; height:100%; position:relative; overflow:hidden; }

/* ── Screens ── */
.screen {
  position:absolute; inset:0;
  display:flex; flex-direction:column;
  overflow-y:auto; overflow-x:hidden;
  padding:0 16px 40px;
  opacity:0; transform:translateX(26px);
  pointer-events:none;
  transition:opacity .24s ease, transform .24s ease;
  scrollbar-width:none;
}
.screen::-webkit-scrollbar { display:none; }
.screen.active  { opacity:1; transform:translateX(0); pointer-events:all; }
.screen.exit    { opacity:0; transform:translateX(-26px); pointer-events:none; }
.safe-top { height:max(env(safe-area-inset-top),20px); flex-shrink:0; }
.safe-bot { height:max(env(safe-area-inset-bottom),24px); flex-shrink:0; }
.spacer   { flex:1; }

/* ── Card ── */
.card {
  background:var(--white);
  border-radius:var(--r);
  padding:18px 18px;
  margin-bottom:12px;
  box-shadow:var(--shadow);
}

/* ── Section header row ── */
.sec {
  display:flex; align-items:center; gap:10px;
  margin-bottom:14px;
}
.sec-n {
  width:26px; height:26px; border-radius:50%;
  background:var(--num-bg);
  display:flex; align-items:center; justify-content:center;
  font-family:'Unbounded',sans-serif; font-size:11px; font-weight:800;
  color:#FFFFFF; flex-shrink:0;
}
.sec-t {
  font-family:'Inter',sans-serif; font-size:16px; font-weight:700;
  color:var(--text);
}

/* ── Buttons ── */
.btn {
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; padding:16px 20px; border:none; border-radius:99px;
  font-family:'Inter',sans-serif; font-size:16px; font-weight:700;
  cursor:pointer; transition:transform .13s, opacity .13s;
}
.btn:active { transform:scale(.97); }
.btn:disabled { opacity:.35; pointer-events:none; }
.btn-hot {
  background:var(--hot); color:#fff;
  box-shadow:0 4px 18px rgba(255,45,120,.28);
}
.btn-outline {
  background:var(--white); color:var(--text);
  border:1.5px solid var(--border);
}
.btn-ghost {
  background:transparent; color:var(--text2);
  font-size:14px; font-weight:500;
}
.bottom-cta {
  position:sticky; bottom:0;
  padding:14px 0 0;
  background:linear-gradient(to top,var(--bg) 65%,transparent);
  margin-top:auto;
}

/* ── Gender badges ── */
.badge-f {
  display:inline-flex; align-items:center; gap:4px;
  background:var(--pink); color:#fff;
  border-radius:99px; padding:5px 14px;
  font-size:13px; font-weight:700;
}
.badge-m {
  display:inline-flex; align-items:center; gap:4px;
  background:var(--blue); color:#fff;
  border-radius:99px; padding:5px 14px;
  font-size:13px; font-weight:700;
}

/* ── Progress ── */
.prog-bar {
  flex:1; height:4px; background:var(--border);
  border-radius:99px; overflow:hidden;
}
.prog-fill {
  height:100%; background:var(--hot);
  border-radius:99px; transition:width .35s ease;
}

/* ── Quiz option ── */
.q-card {
  background:var(--white); border-radius:var(--r);
  padding:20px 18px; box-shadow:var(--shadow);
  animation:fadeUp .26s ease both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0); }
}
.q-text {
  font-size:18px; font-weight:700; line-height:1.35;
  color:var(--text); margin-bottom:18px;
}
.q-opt {
  display:flex; align-items:center; gap:12px;
  padding:13px 14px;
  border:1.5px solid var(--border); border-radius:var(--rs);
  cursor:pointer; transition:all .15s;
  font-size:14px; font-weight:500; color:var(--text);
  line-height:1.4; margin-bottom:8px;
}
.q-opt:last-child { margin-bottom:0; }
.q-opt:active { transform:scale(.98); }
.q-opt.sel {
  border-color:var(--pink); background:var(--pink-lt); color:var(--pink);
}
.q-radio {
  width:20px; height:20px; border-radius:50%;
  border:2px solid var(--border); flex-shrink:0;
  transition:all .15s; position:relative;
}
.q-opt.sel .q-radio {
  border-color:var(--pink); background:var(--pink);
}
.q-opt.sel .q-radio::after {
  content:''; position:absolute; inset:4px;
  background:#fff; border-radius:50%;
}

/* ── Avatar ── */
.ava {
  width:88px; height:88px; border-radius:50%;
  overflow:hidden; flex-shrink:0;
  box-shadow:0 3px 12px rgba(0,0,0,.12);
}
.ava img { width:100%; height:100%; object-fit:cover; }
.ava-sm {
  width:36px; height:36px; border-radius:50%;
  overflow:hidden; flex-shrink:0;
}
.ava-sm img { width:100%; height:100%; object-fit:cover; }

/* ── Compatibility ── */
.compat-pct {
  font-family:'Unbounded',sans-serif;
  font-size:54px; font-weight:900;
  color: #F7A800; line-height:1;
}
.compat-dash {
  display:inline-block; width:50px; height:5px;
  background:var(--orange); border-radius:3px;
  vertical-align:middle; margin-left:10px; margin-bottom:7px;
}

/* ── Archetype card ── */
.arch-card {
  background:var(--arch-bg);
  border-radius:var(--r); padding:20px;
  margin-bottom:12px; position:relative;
  min-height: 190px; flex-shrink: 0; height: auto;
}
.arch-card-text {
  position:relative; z-index:3; width: 50%; padding-bottom: 8px;
}
.arch-card-img {
  position:absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 100px; height: auto; z-index:2; object-fit:contain;
  mix-blend-mode: multiply;
  border-radius: 12px;
}
.arch-card::before {
  content:''; position:absolute;
  right:-16px; top:-16px;
  width:80px; height:80px;
  background:rgba(255,255,255,.1); border-radius:50%;
}
.arch-card::after {
  content:''; position:absolute;
  left:-20px; bottom:-20px;
  width:60px; height:60px;
  background:rgba(255,255,255,.07); border-radius:50%;
}

/* ── Compat bar ── */
.compat-pct {
  font-family:'Unbounded',sans-serif;
  font-size:clamp(30px,9vw,38px); font-weight:900;
  color:#F7A800; line-height:1.1; margin-bottom:8px;
}
.compat-bar-track {
  height:8px; border-radius:99px;
  background:#F0ECE0; overflow:hidden; margin-bottom:4px;
}
.compat-bar-fill {
  height:100%; border-radius:99px;
  background:linear-gradient(90deg,#F7A800,#FF9500);
  width:52%; transition:width .6s ease;
}
.compat-verdict-box {
  background:var(--purp-lt); border-radius:14px;
  padding:12px 14px; flex:1;
  display:flex; flex-direction:column; align-items:flex-start;
}

/* ── Flag cards ── */
.flag-card { border-radius:var(--r); padding:16px; margin-bottom:12px; }
.flag-card.green-card { background:var(--green-lt); border:1px solid var(--green-bd); }
.flag-card.red-card   { background:var(--pink-lt);  border:1px solid var(--pink-bd);  }

/* ── Pay check ── */
.pay-check {
  width:20px; height:20px; border-radius:50%;
  background:linear-gradient(135deg,#7B5CF0,#C070F0);
  color:#fff; font-size:11px; font-weight:900;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; margin-right:8px;
}

/* ── Stories Preview Card ── */
.stories-preview-card {
  margin:0 0 12px; border-radius:16px;
  overflow:hidden; cursor:pointer;
}
.stories-preview-inner {
  background:linear-gradient(135deg,#09090B 0%,#1c0936 100%);
  border-radius:16px; padding:20px;
  position:relative; overflow:hidden;
}
.stories-preview-glow-1 {
  position:absolute; top:-60px; left:-60px;
  width:200px; height:200px;
  background:radial-gradient(circle,rgba(138,43,226,.4) 0%,transparent 70%);
  filter:blur(40px);
}
.stories-preview-glow-2 {
  position:absolute; bottom:-40px; right:-40px;
  width:160px; height:160px;
  background:radial-gradient(circle,rgba(255,45,120,.3) 0%,transparent 70%);
  filter:blur(40px);
}
.stories-preview-label {
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:2px; color:rgba(255,255,255,.6); margin-bottom:8px;
}
.stories-preview-title {
  font-size:13px; font-weight:800; color:#fff;
  margin-bottom:14px; line-height:1.3;
}
.stories-pct {
  font-family:'Unbounded',sans-serif;
  font-size:44px; font-weight:900; color:#FF2D78; line-height:1;
}
.stories-preview-btn {
  background:rgba(255,255,255,.08); border-radius:10px;
  padding:10px 14px; display:flex;
  align-items:center; justify-content:space-between;
  font-size:13px; color:rgba(255,255,255,.85);
}

/* ── Abuser result row ── */
.abuser-result-row {
  display:flex; justify-content:center; margin-bottom:12px;
}


.arch-label {
  font-size:11px; font-weight:600; text-transform:uppercase;
  letter-spacing:.8px; color:rgba(255,255,255,.65); margin-bottom:6px;
}
.arch-name {
  font-family:'Unbounded',sans-serif;
  font-size:clamp(20px,6vw,26px); font-weight:900;
  color:#fff; line-height:1.15; margin-bottom:12px;
}
.arch-desc { font-size:13px; color:rgba(255,255,255,.85); line-height:1.65; }

/* ── Abuser ── */
.abuser-pill {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--pink); color:#fff;
  border-radius:99px; padding:8px 20px;
  font-size:15px; font-weight:800;
}
.abuser-pill-dot {
  width:18px; height:18px; border-radius:50%;
  background:#fff; display:flex; align-items:center; justify-content:center;
}
.abuser-pill-dot::after { content:'!'; color:var(--pink); font-size:12px; font-weight:900; }
.abuser-comment {
  background:#FFF5F8; border-radius:var(--rs);
  padding:14px 16px; margin-top:12px;
  font-size:14px; color:var(--text2); line-height:1.65; font-style:italic;
}

/* ── Battle ── */
.battle-row { margin-bottom:14px; }
.battle-row:last-child { margin-bottom:0; }
.battle-q {
  display:flex; align-items:center; gap:8px;
  font-size:14px; font-weight:600; color:var(--text);
  margin-bottom:7px;
}
.battle-hot-dot {
  width:18px; height:18px; border-radius:50%;
  background:#FF3B30; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.battle-hot-dot::after {
  content:'!'; color:#fff; font-size:10px; font-weight:900;
}
.battle-track {
  height:10px; border-radius:99px;
  background:var(--border); position:relative; overflow:hidden;
}
.battle-fill {
  position:absolute; left:0; top:0; height:100%;
  background:var(--slider); border-radius:99px;
  transition:width 1.1s cubic-bezier(.4,0,.2,1);
}
.battle-thumb {
  position:absolute; top:50%;
  transform:translate(-50%,-50%);
  width:20px; height:20px;
  background:var(--white); border-radius:50%;
  border:2.5px solid #FF2D78;
  box-shadow:0 1px 5px rgba(0,0,0,.18);
  transition:left 1.1s cubic-bezier(.4,0,.2,1);
}

/* ── Flag count ── */
.flag-circle {
  width:70px; height:70px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family:'Unbounded',sans-serif;
  font-size:26px; font-weight:900; color:#fff;
  margin:8px auto 0;
}
.flag-circle.g { background:var(--green); box-shadow:0 4px 12px rgba(40,200,64,.3); }
.flag-circle.r { background:var(--pink);  box-shadow:0 4px 12px rgba(255,45,120,.3); }

.flag-badge {
  display:inline-flex; align-items:center; gap:5px;
  border-radius:99px; padding:5px 12px;
  font-size:12px; font-weight:700;
}
.flag-badge.g { background:var(--green-lt); color:var(--green); border:1px solid var(--green-bd); }
.flag-badge.r { background:var(--pink-lt);  color:var(--pink);  border:1px solid var(--pink-bd); }

/* ── Flag award block ── */
.award-block {
  background:var(--white); border-radius:var(--r);
  padding:16px 18px; margin-bottom:10px;
  box-shadow:var(--shadow-sm);
  display:flex; align-items:center; gap:14px;
}
.award-ava { width:64px; height:64px; border-radius:50%; overflow:hidden; flex-shrink:0; }
.award-ava img { width:100%; height:100%; object-fit:cover; }

/* ── Choice ── */
.choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
.choice-card {
  background:var(--white); border:2px solid var(--border);
  border-radius:var(--r); padding:22px 14px;
  text-align:center; cursor:pointer;
  transition:all .16s;
  display:flex; flex-direction:column; align-items:center; gap:8px;
}
.choice-card:active { transform:scale(.97); }
.choice-card.sel { border-color:var(--pink); background:var(--pink-lt); }
.choice-card .ico-img { width:52px; height:52px; object-fit:cover; border-radius:50%; }
.choice-card .lbl {
  font-family:'Unbounded',sans-serif; font-size:13px; font-weight:800; color:var(--text);
}
.choice-card .sub { font-size:11px; color:var(--text3); }

.choice-row {
  background:var(--white); border:2px solid var(--border);
  border-radius:var(--r); padding:16px 18px;
  cursor:pointer; transition:all .16s;
  display:flex; align-items:center; gap:14px; margin-bottom:10px;
}
.choice-row:active { transform:scale(.98); }
.choice-row.sel { border-color:var(--pink); background:var(--pink-lt); }
.choice-row .lbl {
  font-family:'Unbounded',sans-serif; font-size:13px; font-weight:800; color:var(--text);
}
.choice-row .sub { font-size:12px; color:var(--text3); margin-top:3px; }

/* ── Pulse ── */
.pulse-wrap { position:relative; width:76px; height:76px; margin:0 auto 20px; }
.pulse-ring {
  position:absolute; inset:0; border-radius:50%;
  border:3px solid var(--pink);
  animation:pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing {
  from { transform:scale(.85); opacity:.75; }
  to   { transform:scale(1.7);  opacity:0;   }
}
.pulse-core {
  position:absolute; inset:8px; border-radius:50%;
  background:var(--hot);
  display:flex; align-items:center; justify-content:center;
}
.pulse-core img { width:100%; height:100%; object-fit:contain; }

/* ── Blur paywall ── */
.blur-wrap { position:relative; overflow:hidden; border-radius:var(--r); margin-bottom:12px; }
.blur-inner { filter:blur(5px); pointer-events:none; }
.blur-over {
  position:absolute; inset:0;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:6px;
  background:rgba(255,255,255,.45); backdrop-filter:blur(3px);
}
.blur-over .lock-icon { font-size:32px; line-height:1; }
.blur-over p { font-family:'Unbounded',sans-serif; font-size:13px; font-weight:800; color:var(--text); }
.blur-over span { font-size:12px; color:var(--text2); }

/* ── Paywall ── */
.paywall {
  background:var(--white); border-radius:var(--r);
  padding:22px 18px; border:1.5px solid var(--pink-bd);
  box-shadow:0 4px 20px rgba(255,45,120,.1);
}
.pay-price {
  font-family:'Unbounded',sans-serif; font-size:48px; font-weight:900;
  background:var(--hot);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text; line-height:1;
}
.pay-row {
  display:flex; align-items:center; gap:10px;
  padding:10px 0; border-bottom:1px solid var(--border);
  font-size:14px; color:var(--text); font-weight:500;
}
.pay-row:last-of-type { border-bottom:none; }
.pay-dot {
  width:8px; height:8px; border-radius:50%;
  background:var(--hot); flex-shrink:0;
}

/* ── Share banner ── */
.share-banner {
  background:var(--hot); border-radius:var(--r);
  padding:22px 18px; text-align:center;
  margin-bottom:12px; position:relative; overflow:hidden;
}
.share-banner::after {
  content:''; position:absolute;
  right:-20px; bottom:-20px;
  width:100px; height:100px;
  background:rgba(255,255,255,.1); border-radius:50%;
}

/* ── Link box ── */
.link-box {
  background:var(--white); border:1.5px solid var(--border);
  border-radius:var(--rs); padding:13px 15px;
  display:flex; align-items:center; gap:10px;
  cursor:pointer; margin-bottom:10px;
}
.link-box:active { opacity:.75; }
.link-url { flex:1; font-size:13px; color:var(--text2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.link-copy { font-size:13px; font-weight:700; color:var(--pink); white-space:nowrap; }

/* ── Misc ── */
.row   { display:flex; align-items:center; gap:10px; }
.col   { display:flex; flex-direction:column; gap:6px; }
.grow  { flex:1; }
.center { text-align:center; }
.mt4  { margin-top:4px; }
.mt8  { margin-top:8px; }
.mt12 { margin-top:12px; }
.mt16 { margin-top:16px; }
.mb4  { margin-bottom:4px; }
.mb8  { margin-bottom:8px; }
.mb12 { margin-bottom:12px; }
.mb16 { margin-bottom:16px; }

.h1 {
  font-family:'Unbounded',sans-serif;
  font-size:clamp(18px,5.5vw,24px); font-weight:900; line-height:1.1; color:var(--text); word-break: break-word; hyphens: auto; -webkit-hyphens: auto;
}
.h1 span { color:var(--purple); }
.h2 {
  font-family:'Unbounded',sans-serif;
  font-size:20px; font-weight:900; color:var(--text);
  line-height:1.2;
}
.body { font-size:14px; line-height:1.65; color:var(--text2); }
.cap  { font-size:12px; color:var(--text3); }

/* ── Confetti ── */
.conf {
  position:fixed; pointer-events:none; z-index:9999;
  border-radius:2px; animation:confFall linear forwards;
}
@keyframes confFall {
  0%   { transform:translateY(-10px) rotate(0deg);    opacity:1; }
  100% { transform:translateY(110vh) rotate(540deg);  opacity:0; }
}

/* ── Toast ── */
.toast {
  position:fixed; bottom:86px; left:50%;
  transform:translateX(-50%) translateY(8px);
  background:rgba(28,28,30,.9); color:#fff;
  border-radius:99px; padding:9px 20px;
  font-size:13px; font-weight:600; opacity:0;
  transition:all .24s ease; z-index:999; white-space:nowrap;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── Simultaneous quiz (together mode) ── */
.qt-screen {
  background: var(--bg);
}
.qt-question-card {
  background: var(--white);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}
.qt-question-text {
  font-size: 16px; font-weight: 700;
  color: var(--text); line-height: 1.4;
}
.qt-panel {
  background: var(--white);
  border-radius: 18px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.qt-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.qt-panel.p1::before { background: var(--pink); }
.qt-panel.p2::before { background: var(--blue); }

.qt-panel-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.qt-check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green);
  display: none; align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0;
}
.qt-check.show { display: flex; }
.qt-check svg { display: block; }

.qt-opt {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--text); line-height: 1.3;
  transition: all .15s; margin-bottom: 4px;
}
.qt-opt:last-child { margin-bottom: 0; }
.qt-opt:active { transform: scale(.98); }
.qt-opt.sel1 { border-color: var(--pink); background: var(--pink-lt); color: var(--pink); }
.qt-opt.sel2 { border-color: var(--blue); background: var(--blue-lt); color: var(--blue); }

.qt-radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  margin-top: 1px; transition: all .15s;
}
.qt-opt.sel1 .qt-radio { background: var(--pink); border-color: var(--pink); }
.qt-opt.sel2 .qt-radio { background: var(--blue); border-color: var(--blue); }

/* Both answered — flash animation */
@keyframes bothFlash {
  0%   { background: var(--white); }
  30%  { background: #E8F8EC; }
  100% { background: var(--white); }
}
.qt-panel.both-done { animation: bothFlash .5s ease; }

/* Progress dots */
.qt-dots {
  display: flex; justify-content: center; gap: 6px; margin-bottom: 8px;
}
.qt-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: background .2s;
}
.qt-dot.done { background: var(--purple); }
.qt-dot.active { background: var(--pink); transform: scale(1.2); }


.lang-drop.show { display: flex !important; }