:root {
  --bg: #f5f6fc;
  --bg-tint: #eceefa;
  --card: #ffffff;
  --ink: #1b2236;
  --muted: #5d6680;
  --line: #e2e6f0;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eceafe;
  --brand-ink: #3730a3;
  --scam: #e5484d;
  --scam-soft: #fdecec;
  --spam: #d97706;
  --spam-soft: #fff3da;
  --legit: #16a34a;
  --legit-soft: #e4f7eb;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 6px 20px rgba(20, 30, 60, .07);
  --shadow-lg: 0 20px 50px rgba(20, 30, 60, .18);
  --radius: 18px;
  --head: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1222;
    --bg-tint: #151a2e;
    --card: #1b2037;
    --ink: #eef0fa;
    --muted: #a3abc6;
    --line: #2c3352;
    --brand-soft: #2a2858;
    --brand-ink: #c7c4ff;
    --scam-soft: #3a1d22;
    --spam-soft: #3a2b12;
    --legit-soft: #14301f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.playing { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 800; font-size: 1rem;
  padding: 11px 22px; border-radius: 999px; border: 0;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible, .choice:focus-visible, .len:focus-visible, .icon-btn:focus-visible {
  outline: 3px solid #a5b4fc; outline-offset: 2px;
}
.btn-sm { padding: 8px 18px; font-size: .95rem; }
.btn-lg { padding: 14px 28px; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .35); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(79, 70, 229, .45); }
.btn-light { background: #fff; color: var(--brand); box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }

/* ---------- Top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { font-family: var(--head); font-weight: 800; font-size: 1.35rem; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.brand-emo { font-size: 1.5rem; }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-weight: 700; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--brand); }
@media (max-width: 640px) { .nav-links { display: none; } .topnav .btn { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--brand);
  padding: 64px 0 80px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.pill { display: inline-block; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); padding: 4px 14px; border-radius: 99px; font-weight: 700; font-size: .9rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; margin: 14px 0 12px; letter-spacing: -.5px; }
.hl-scam { background: #fff; color: var(--scam); padding: 0 .25em; border-radius: 12px; display: inline-block; transform: rotate(-2deg); }
.hero-copy p { font-size: 1.15rem; opacity: .94; max-width: 520px; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { list-style: none; display: flex; gap: 28px; padding: 0; margin: 32px 0 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--head); font-size: 1.9rem; line-height: 1; }
.hero-stats span { opacity: .8; font-weight: 600; }

.hero-examples { display: grid; gap: 14px; width: 100%; max-width: 360px; margin: 0 auto; }
.example-card {
  padding: 14px 16px;
  background: #fff; color: #1b2236; border-radius: 12px;
  font-weight: 600;
}
.example-tag { display: block; width: fit-content; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 99px; color: #fff; margin-bottom: 6px; }
.example-tag.scam { background: var(--scam); }
.example-tag.spam { background: var(--spam); }
.example-tag.legit { background: var(--legit); }
@media (max-width: 860px) {
  .hero { padding: 44px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-examples { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tint { background: var(--bg-tint); }
.section-title { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.section-sub { color: var(--muted); margin: 6px 0 28px; font-size: 1.08rem; }

.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.type { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.type::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; }
.type.scam::before { background: var(--scam); }
.type.spam::before { background: var(--spam); }
.type.legit::before { background: var(--legit); }
.type-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; }
.type.scam .type-icon { background: var(--scam-soft); }
.type.spam .type-icon { background: var(--spam-soft); }
.type.legit .type-icon { background: var(--legit-soft); }
.type h3 { font-size: 1.6rem; margin: 12px 0 4px; }
.type.scam h3 { color: var(--scam); }
.type.spam h3 { color: var(--spam); }
.type.legit h3 { color: var(--legit); }
.type p { margin: 0 0 14px; color: var(--muted); }
.mini-bubble { background: var(--bg); border-radius: 4px 16px 16px 16px; padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }
.type-do { font-size: .95rem; margin: 0 !important; }
.callout { margin: 22px 0 0; background: var(--brand-soft); color: var(--brand-ink); border-radius: 14px; padding: 14px 18px; font-weight: 700; }

/* ---------- Start card ---------- */
.start-card { max-width: 560px; margin: 0 auto; text-align: center; background: var(--card); border-radius: 26px; padding: 36px 24px; box-shadow: var(--shadow); }
.start-emo { font-size: 3.2rem; line-height: 1; }
.start-card h2 { font-size: 2rem; margin: 8px 0 6px; }
.start-card p { color: var(--muted); margin: 0 0 22px; }
.length-picker { display: flex; justify-content: center; gap: 10px; margin-bottom: 24px; }
.len {
  font: inherit; cursor: pointer; min-width: 92px; padding: 10px 12px;
  border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; transition: border-color .15s, background .15s;
}
.len b { font-family: var(--head); font-size: 1.6rem; line-height: 1.1; }
.len span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.len[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); }
.best { margin: 16px 0 0 !important; font-weight: 700; }

/* ---------- Flags & help ---------- */
.flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.flag { background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; box-shadow: var(--shadow); }
.flag-emo { font-size: 1.6rem; width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: var(--scam-soft); }
.flag h4 { font-size: 1.2rem; margin-bottom: 2px; }
.flag p { margin: 0; color: var(--muted); }

.help { background: var(--card); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.help h2 { font-size: 1.7rem; margin-bottom: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border-radius: 14px; padding: 14px; }
.steps span { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; }

.footer { text-align: center; color: var(--muted); padding: 32px 16px 48px; font-size: .93rem; }
.footer p { margin: 4px auto; max-width: 640px; }

/* =========================================================
   Full-screen game
   ========================================================= */
.play {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  height: 100dvh;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(124, 58, 237, .14), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(79, 70, 229, .14), transparent 60%),
    var(--bg);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }

.play-bar { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px; max-width: 1080px; width: 100%; margin: 0 auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); flex-shrink: 0; }
.dots { flex: 1; display: flex; gap: 4px; min-width: 0; }
.dot { flex: 1; height: 8px; border-radius: 99px; background: var(--line); transition: background .25s; }
.dot.now { background: var(--brand); opacity: .55; }
.dot.right { background: var(--legit); }
.dot.wrong { background: var(--scam); }
.stats { display: flex; gap: 6px; flex-shrink: 0; }
.stat { background: var(--card); border-radius: 99px; padding: 6px 12px; font-weight: 800; box-shadow: var(--shadow); font-size: .95rem; }
.stat.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }

.play-main {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 460px);
  justify-content: center; align-items: center; gap: 40px;
  padding: 8px 16px 20px; max-width: 1080px; width: 100%; margin: 0 auto;
}
.phone-wrap { height: 100%; max-height: 720px; min-height: 0; display: flex; }

/* ---------- Phone mockup ---------- */
.phone {
  --app: #64748b; --app-ink: #fff; --chat-bg: #eef1f6; --bubble: #fff; --bubble-ink: #1b2236;
  width: 100%; height: 100%; display: flex; flex-direction: column;
  background: var(--chat-bg); border-radius: 34px; overflow: hidden;
  border: 8px solid #1b2236; box-shadow: var(--shadow-lg);
  animation: slideIn .3s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } }
.phone.ch-SMS { --app: #475569; --chat-bg: #f1f5f9; }
.phone.ch-WhatsApp { --app: #0b7a5c; --chat-bg: #e9e2d6; --bubble: #fff; }
.phone.ch-Instagram { --app: #ffffff; --app-ink: #1b2236; --chat-bg: #ffffff; --bubble: #efeff3; }
.phone.ch-Telegram { --app: #2481cc; --chat-bg: #cfe3f2; }
.phone.ch-Email { --app: #ffffff; --app-ink: #1b2236; --chat-bg: #ffffff; }

.status { display: flex; justify-content: space-between; padding: 6px 18px 2px; font-size: .78rem; font-weight: 800; background: var(--app); color: var(--app-ink); }
.status-icons { letter-spacing: 2px; font-size: .7rem; }
.app-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 12px; background: var(--app); color: var(--app-ink); }
.ch-Instagram .app-head, .ch-Email .app-head { border-bottom: 1px solid #e7e9ef; }
.back { font-size: 1.7rem; line-height: 1; opacity: .8; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 1.05rem; background: #94a3b8; }
.ch-Instagram .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d6249f; }
.who { min-width: 0; flex: 1; }
.sender { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Wraps instead of cutting off: a strange email address is often the clue. */
.detail { font-size: .78rem; opacity: .8; overflow-wrap: anywhere; line-height: 1.3; }
.app-badge { font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .2); flex-shrink: 0; }
.ch-Instagram .app-badge { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); color: #fff; }
.ch-Email .app-badge { background: #2563eb; color: #fff; }

.chat { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.ch-WhatsApp .chat { background-image: radial-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px); background-size: 16px 16px; }
.sys { align-self: center; text-align: center; font-size: .82rem; font-weight: 700; background: #fff8c5; color: #5c4a00; padding: 6px 12px; border-radius: 10px; max-width: 92%; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.bubble {
  align-self: flex-start; max-width: 88%; position: relative;
  background: var(--bubble); color: var(--bubble-ink);
  padding: 10px 14px 20px; border-radius: 4px 18px 18px 18px;
  font-size: 1.02rem; line-height: 1.45; overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.ch-Email .bubble { max-width: 100%; border-radius: 12px; border: 1px solid #e7e9ef; box-shadow: none; padding: 14px 16px 22px; }
.stamp { position: absolute; right: 12px; bottom: 4px; font-size: .68rem; color: #8a93a6; }
.link { color: #2563eb; text-decoration: underline; word-break: break-all; }
.compose { flex-shrink: 0; margin: 0 10px 10px; display: flex; align-items: center; justify-content: space-between; background: #fff; color: #9aa3b5; border-radius: 99px; padding: 9px 16px; font-size: .9rem; border: 1px solid #e3e7ef; }
.compose i { font-style: normal; color: var(--app); }
.ch-Instagram .compose i, .ch-Email .compose i { color: #2563eb; }

/* ---------- Answer panel ---------- */
.panel { background: var(--card); border-radius: 26px; padding: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: 100%; min-height: 0; }
.q-count { margin: 0; font-weight: 800; color: var(--brand); font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }
.q-title { font-size: 1.5rem; margin: 2px 0 16px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice {
  position: relative; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 6px 14px; border-radius: 18px; border: 2px solid transparent;
  font-weight: 800; font-size: 1.08rem; transition: transform .1s ease, box-shadow .15s ease;
}
.choice:hover { transform: translateY(-2px); }
.choice:active { transform: scale(.96); }
.c-emo { font-size: 1.9rem; line-height: 1.1; }
.choice kbd { position: absolute; top: 6px; right: 8px; font: 700 .7rem var(--body); opacity: .55; }
.choice.scam { background: var(--scam-soft); color: var(--scam); border-color: color-mix(in srgb, var(--scam) 35%, transparent); }
.choice.spam { background: var(--spam-soft); color: var(--spam); border-color: color-mix(in srgb, var(--spam) 35%, transparent); }
.choice.legit { background: var(--legit-soft); color: var(--legit); border-color: color-mix(in srgb, var(--legit) 35%, transparent); }

.result { display: flex; flex-direction: column; gap: 14px; min-height: 0; animation: slideIn .25s ease; }
.result-body { overflow-y: auto; min-height: 0; }
.verdict { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.verdict-emo { font-size: 2.2rem; line-height: 1; }
.verdict h3 { font-size: 1.5rem; }
.verdict.good h3 { color: var(--legit); }
.verdict.bad h3 { color: var(--scam); }
.verdict p { margin: 0; color: var(--muted); font-weight: 700; font-size: .95rem; }
.tag { display: inline-block; font-weight: 800; padding: 1px 10px; border-radius: 99px; color: #fff; font-size: .9rem; }
.tag.scam { background: var(--scam); }
.tag.spam { background: var(--spam); }
.tag.legit { background: var(--legit); }
.why { margin: 0 0 12px; }
.clue-title { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: .88rem; font-weight: 700; }
.chip::before { content: "🔎 "; }

/* Phones and small tablets: phone on top, answer panel docked at the bottom. */
@media (max-width: 860px) {
  .play-bar { padding: 8px 12px; }
  .play-main { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 0 12px 12px; }
  .phone-wrap { flex: 1; max-height: none; justify-content: center; }
  .phone { max-width: 440px; margin: 0 auto; border-width: 6px; border-radius: 28px; }
  .panel { flex-shrink: 0; max-height: 52dvh; padding: 16px; border-radius: 22px; }
  .why { font-size: .97rem; }
  .chip { font-size: .82rem; padding: 3px 10px; }
  .q-title { font-size: 1.2rem; margin-bottom: 12px; }
  .choice { padding: 12px 4px 10px; font-size: 1rem; }
  .c-emo { font-size: 1.6rem; }
  .choice kbd { display: none; }
  .verdict-emo { font-size: 1.8rem; }
  .verdict h3 { font-size: 1.25rem; }
}
@media (max-height: 640px) and (max-width: 860px) {
  .status, .compose { display: none; }
  .q-count { display: none; }
}

/* ---------- End screen ---------- */
@property --pct { syntax: "<number>"; inherits: false; initial-value: 0; }
.play-end { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 24px; }
.end-card { max-width: 560px; margin: 0 auto; background: var(--card); border-radius: 28px; padding: 30px 24px; text-align: center; box-shadow: var(--shadow-lg); animation: slideIn .3s ease; }
.ring { --pct: 0; width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--line) 0); transition: --pct 1s; }
.ring-inner { width: 118px; height: 118px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-inner b { font-family: var(--head); font-size: 2rem; line-height: 1; }
.ring-inner span { color: var(--muted); font-weight: 700; font-size: .85rem; }
.badge-emo { font-size: 2.6rem; margin-top: 10px; }
.end-card h2 { font-size: 1.9rem; }
.end-card > p { color: var(--muted); margin: 6px 0 18px; }
.breakdown { display: grid; gap: 10px; text-align: left; margin-bottom: 18px; }
.bd-row { display: grid; grid-template-columns: 80px 1fr 48px; align-items: center; gap: 10px; font-weight: 800; }
.bd-bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: 99px; }
.bd-row span:last-child { text-align: right; color: var(--muted); }
.review { text-align: left; background: var(--bg); border-radius: 16px; padding: 4px 14px; margin-bottom: 20px; }
.review summary { cursor: pointer; font-weight: 800; padding: 10px 0; }
.review ul { list-style: none; margin: 0; padding: 0 0 10px; display: grid; gap: 10px; }
.review li { background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: .93rem; }
.review .r-text { margin: 4px 0; color: var(--muted); }
.end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; font-style: normal; font-size: 1.4rem; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
