/* CORE SHIFT 360° — neon minimalista. Fundo quase preto, traço fino que brilha,
   cor só onde tem significado. Tudo respeita a área segura (notch / barra). */
:root {
  --bg0: #04030C;
  --bg1: #0E0B2A;
  --line: rgba(170, 160, 255, 0.28);
  --text: #F2F0FF;
  --muted: #8E88B8;
  --cyan: #22F3FF;
  --pink: #FF3FD0;
  --yellow: #FFE14D;
  --lime: #7CFF5B;
  --violet: #9B6BFF;
  --danger: #FF3355;
  --radius: 14px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --font: "Oxanium", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: radial-gradient(110% 80% at 50% 45%, var(--bg1), var(--bg0)); color: var(--text); font: 16px/1.4 var(--font); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.hidden { display: none !important; }
button { font-family: inherit; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; }

/* emblema: anel neon com três formas (girando). --r = raio, --s = tamanho das formas */
.emblem { --r: 48px; --s: 18px; width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin: 0 auto; position: relative; border-radius: 50%; flex: none;
  border: 2px solid rgba(170,160,255,0.7); box-shadow: 0 0 18px rgba(155,107,255,0.6), inset 0 0 14px rgba(155,107,255,0.35);
  animation: spin 6s linear infinite; }
.emblem i { position: absolute; width: var(--s); height: var(--s); left: 50%; top: 50%; margin: calc(var(--s) / -2); }
.emblem .e1 { transform: rotate(0deg) translateY(calc(var(--r) * -1)); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.emblem .e2 { transform: rotate(120deg) translateY(calc(var(--r) * -1)) rotate(-120deg); background: var(--pink); border-radius: 18%; box-shadow: 0 0 12px var(--pink); }
.emblem .e3 { transform: rotate(240deg) translateY(calc(var(--r) * -1)) rotate(-240deg); width: 0; height: 0; margin: calc(var(--s) * -0.55) calc(var(--s) * -0.6); background: none;
  border-left: calc(var(--s) * 0.6) solid transparent; border-right: calc(var(--s) * 0.6) solid transparent; border-bottom: calc(var(--s) * 1.05) solid var(--yellow); filter: drop-shadow(0 0 6px var(--yellow)); }
@keyframes spin { to { transform: rotate(360deg); } }

.screen { position: fixed; inset: 0; padding: calc(16px + var(--sat)) 16px calc(16px + var(--sab)); }
.topbar { display: flex; justify-content: flex-end; align-items: center; min-height: 40px; }

/* ── início ─────────────────────────────────────────────────────────────── */
.home { overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.home > * { width: 100%; max-width: 400px; }
.title-block { text-align: center; margin: 10px 0 2px; }
.logo { font-size: 36px; font-weight: 800; letter-spacing: 0.08em; margin: 30px 0 6px; color: #fff; text-shadow: 0 0 14px rgba(155,107,255,0.8), 0 0 2px #fff; }
.logo span { color: var(--cyan); text-shadow: 0 0 14px var(--cyan); }
.tag { color: var(--muted); margin: 0; font-size: 15px; }

.best { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.best div { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: center; background: rgba(14,11,42,0.6); }
.best small { display: block; font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }
.best b { font-size: 26px; color: var(--yellow); text-shadow: 0 0 10px rgba(255,225,77,0.6); font-variant-numeric: tabular-nums; }

.btn { width: 100%; padding: 15px 16px; border-radius: var(--radius); border: 1.5px solid var(--line); background: rgba(14,11,42,0.7); color: var(--text);
  font-size: 17px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; transition: transform 0.08s, box-shadow 0.15s; }
.btn:active { transform: scale(0.97); }
.btn-primary { border-color: var(--cyan); color: #fff; font-size: 20px; padding: 18px; text-shadow: 0 0 10px var(--cyan);
  box-shadow: 0 0 18px rgba(34,243,255,0.45), inset 0 0 14px rgba(34,243,255,0.25); }

.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(14,11,42,0.5); cursor: pointer; font-size: 14px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--violet); margin: 0; flex: none; }

.lang-toggle { display: flex; gap: 6px; }
.lang-flag { font-size: 14px; font-weight: 800; color: var(--text); font-family: inherit; min-width: 40px; height: 34px; background: none; border: 1.5px solid transparent; border-radius: 10px; padding: 2px 6px; cursor: pointer; opacity: 0.5; }
.lang-flag.sel { border-color: var(--line); opacity: 1; }

/* ── partida ────────────────────────────────────────────────────────────── */
.game { padding: 0; cursor: pointer; touch-action: none; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; }

.hud { position: absolute; top: 0; left: 0; right: 0; padding: calc(10px + var(--sat)) 14px 6px; display: grid; grid-template-columns: 44px 1fr 92px; align-items: center; pointer-events: none; max-width: 560px; margin: 0 auto; }
.hud > * { pointer-events: auto; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(14,11,42,0.6); color: var(--text); font-size: 12px; font-weight: 800; cursor: pointer; }
.hud-mid { text-align: center; pointer-events: none; }
.hud-score { display: block; font-size: 38px; line-height: 1; font-weight: 800; color: #fff; text-shadow: 0 0 14px rgba(155,107,255,0.9); font-variant-numeric: tabular-nums; }
.hud-level { font-size: 12px; letter-spacing: 0.22em; color: var(--muted); }
.hud-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
.lives { display: flex; gap: 6px; }
.lives i { width: 18px; height: 16px; position: relative; display: block; }
.lives i::before { content: "♥"; position: absolute; inset: -4px 0 0; font-style: normal; font-size: 20px; line-height: 20px; color: var(--pink); text-shadow: 0 0 8px var(--pink); }
.lives i.off::before { color: transparent; -webkit-text-stroke: 1px rgba(255,63,208,0.4); text-shadow: none; }
.lives.hurt { animation: hurt 0.4s; }
@keyframes hurt { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.combo { --c: var(--yellow); font-weight: 800; font-size: 18px; color: var(--c); text-shadow: 0 0 10px var(--c); transition: color .3s, text-shadow .3s; }
.combo[data-tier="2"] { --c: #22F3FF; } .combo[data-tier="3"] { --c: #7CFF5B; } .combo[data-tier="4"] { --c: #FFE14D; } .combo[data-tier="5"] { --c: #FF3FD0; font-size: 21px; }
.bump { animation: bump 0.22s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }

.hint-bubble { position: absolute; left: 16px; right: 16px; bottom: calc(22px + var(--sab)); margin: 0 auto; max-width: 420px; text-align: center; pointer-events: none;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(14,11,42,0.75); color: var(--text); font-size: 15px; }

.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4,3,12,0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 10; padding: 16px; cursor: default; }
.card { width: min(340px, 100%); border: 1.5px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; background: rgba(14,11,42,0.92); box-shadow: 0 0 30px rgba(155,107,255,0.25); }
.card h2 { margin: 0; text-align: center; letter-spacing: 0.12em; font-size: 20px; }
.res-score { text-align: center; }
.res-score b { display: block; font-size: 54px; line-height: 1.1; color: #fff; text-shadow: 0 0 18px rgba(155,107,255,0.9); font-variant-numeric: tabular-nums; }
.res-record { color: var(--yellow); letter-spacing: 0.14em; font-weight: 800; text-shadow: 0 0 10px var(--yellow); }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 2px 0 6px; }
.res-stats div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; }
.res-stats b { display: block; font-size: 18px; }
.res-stats small { color: var(--muted); font-size: 10px; letter-spacing: 0.1em; }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translateX(-50%); background: rgba(14,11,42,0.95); color: var(--text); padding: 10px 16px; border-radius: 999px; z-index: 70; border: 1px solid var(--line); }
.update-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #3B1D8F; color: #fff; text-align: center; padding: calc(10px + var(--sat)) 10px 10px; font-weight: 700; cursor: pointer; }

.btn-gold { border-color: var(--yellow); color: #fff; text-shadow: 0 0 8px rgba(255,225,77,0.8); box-shadow: 0 0 14px rgba(255,225,77,0.35), inset 0 0 10px rgba(255,225,77,0.18); }
.btn-gold small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); text-shadow: none; letter-spacing: 0.04em; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding-bottom: 18px; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px; }
.health p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.health b { color: var(--yellow); }
.cont-timer { height: 6px; border-radius: 3px; background: rgba(170,160,255,0.15); overflow: hidden; }
.cont-timer i { display: block; height: 100%; width: 100%; background: var(--lime); box-shadow: 0 0 8px var(--lime); transform-origin: left; }
.gift-icon { font-size: 44px; line-height: 1; text-align: center; filter: drop-shadow(0 0 12px rgba(255,63,208,0.6)); }

.select-row { grid-column: 1 / -1; justify-content: space-between; }
.select-row select { background: rgba(14,11,42,0.9); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 14px; }
.break { text-align: center; }
.break-tip { margin: 0; color: var(--text); font-size: 14px; line-height: 1.45; }
.break-note { color: var(--muted); font-size: 11px; }
.break-eye { width: 54px; height: 30px; margin: 0 auto 2px; border: 2px solid var(--cyan); border-radius: 50% / 60%; position: relative; box-shadow: 0 0 12px rgba(34,243,255,0.4); animation: blinkEye 4s ease-in-out infinite; }
.break-eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--cyan); }
@keyframes blinkEye { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }

/* ── capa ─────────────────────────────────────────────────────────────── */
.home { gap: 0; justify-content: flex-start; }
.home > * { max-width: 420px; }
.home-top { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.lang-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1.5px solid rgba(170,160,255,0.35); border-radius: 999px; background: rgba(14,11,42,0.6); color: var(--text); font-weight: 700; font-size: 15px; cursor: pointer; }
.lang-pill select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; outline: none; }
.lang-pill select option { background: #0E0B2A; }
.lang-pill span { font-size: 11px; pointer-events: none; }
.top-link { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #C9C3F0; font: inherit; font-size: 16px; cursor: pointer; padding: 6px 0; }
.top-link svg { width: 24px; height: 24px; }
.logo2 { margin: 18px 0 0; text-align: center; line-height: 0.95; }
.logo2 .l1 { display: block; font-size: clamp(38px, 11.5vw, 54px); font-weight: 800; letter-spacing: 0.02em; color: #fff; text-shadow: 0 0 16px rgba(155,107,255,0.6), 0 2px 0 rgba(0,0,0,0.4); }
.logo2 .l2 { display: block; font-size: clamp(32px, 9.5vw, 46px); font-weight: 800; color: var(--cyan); text-shadow: 0 0 14px rgba(34,243,255,0.7); margin-top: 2px; }
.hero { width: min(78vw, 330px); aspect-ratio: 1; margin: 14px auto 6px; position: relative;
  background-image: radial-gradient(rgba(140,130,255,0.18) 1px, transparent 1.2px); background-size: 22px 22px; }
.hero svg { width: 100%; height: 100%; overflow: visible; }
.hero-ring { transform-origin: 150px 150px; animation: spin 8s linear infinite; }
.hero-piece { animation: heroShot 8s linear infinite; }
@keyframes heroShot { 0%, 86% { transform: translateY(0); opacity: 1; } 96% { transform: translateY(-112px); opacity: 1; } 97% { opacity: 0; transform: translateY(-112px); } 98% { transform: translateY(0); opacity: 0; } 100% { opacity: 1; } }
.tagline { margin: 6px 0 2px; text-align: center; font-size: clamp(20px, 6vw, 26px); font-weight: 800; color: #fff; }
.subline { margin: 0 0 18px; text-align: center; font-size: clamp(15px, 4.4vw, 19px); color: #B9A8FF; }
.btn-play { width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--cyan); color: #050416; font-family: inherit; font-size: 26px; font-weight: 800; letter-spacing: 0.06em; box-shadow: 0 0 26px rgba(34,243,255,0.55); transition: transform 0.08s; }
.btn-play svg { width: 34px; height: 34px; }
.btn-play:active { transform: scale(0.97); }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; border: 1.5px solid rgba(170,160,255,0.28); border-radius: 18px; background: rgba(14,11,42,0.5); }
.stats div { text-align: center; padding: 12px 6px; }
.stats div + div { border-left: 1.5px solid rgba(170,160,255,0.22); }
.stats small { display: block; font-size: 12px; letter-spacing: 0.14em; color: #9D8CFF; font-weight: 700; }
.stats b { font-size: 26px; color: #fff; font-variant-numeric: tabular-nums; }
.home .btn-gold { margin-top: 12px; }
.a11y-link { margin: 16px auto 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: none; border: 0; color: #B9A8FF; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.a11y-link svg { width: 26px; height: 26px; }
.foot { display: flex; justify-content: center; align-items: center; margin: 14px 0 6px; flex-wrap: wrap; }
.foot-link { background: none; border: 0; color: #C9C3F0; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; padding: 6px 16px; }
.foot-link + .foot-link { border-left: 1.5px solid rgba(170,160,255,0.3); }
.foot-link .warn { color: var(--yellow); }
.sheet .card { gap: 12px; }
.sheet .settings { grid-template-columns: 1fr; padding-bottom: 0; }
.sheet-note { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
@media (max-height: 700px) { .hero { width: min(62vw, 260px); margin: 8px auto 2px; } .logo2 { margin-top: 8px; } }

/* capa sem rolagem: espaços e tamanhos acompanham a ALTURA da tela */
/* O emblema fica numa caixa que ocupa SÓ o espaço que sobra (flex: 1) e se mede por ela
   (cqh/cqw): letra grande do sistema ou botão de compra a mais encolhem o emblema, nunca
   os espaços entre os botões. */
.home { overflow: hidden; justify-content: flex-start; padding-top: calc(10px + var(--sat)); padding-bottom: calc(10px + var(--sab)); }
.home-top { margin-top: 0; }
.logo2 { margin: clamp(4px, 1.4dvh, 14px) 0 0; }
.logo2 .l1 { font-size: clamp(30px, min(11.5vw, 6.4dvh), 54px); }
.logo2 .l2 { font-size: clamp(26px, min(9.5vw, 5.2dvh), 46px); }
.home > .hero-wrap { flex: 1 1 0; min-height: 0; max-width: none; container-type: size; display: grid; place-items: center; }
.emblem.big { --s: clamp(12px, 8cqmin, 32px); --r: clamp(24px, min(50cqh - var(--s) * 1.15, 40cqw), 92px); border-width: 3px; }   /* 1,15·s = a forma que sai do anel + brilho */
.tagline { margin: 0; font-size: clamp(17px, min(6vw, 3.1dvh), 26px); }
.subline { margin: 0.6dvh 0 0; font-size: clamp(14px, min(4.4vw, 2.3dvh), 19px); }
.btn-play { margin-top: clamp(12px, 2.4dvh, 22px); padding: clamp(10px, 2.1dvh, 18px); font-size: clamp(20px, 3.3dvh, 26px); border-radius: clamp(16px, 2.6dvh, 22px); }
.btn-play svg { width: clamp(24px, 4dvh, 34px); height: clamp(24px, 4dvh, 34px); }
.stats { margin-top: clamp(12px, 2dvh, 18px); }
.stats div { padding: clamp(6px, 1.3dvh, 12px) 6px; }
.stats b { font-size: clamp(20px, 3.2dvh, 26px); }
.home .btn-gold { margin-top: clamp(12px, 2dvh, 18px); padding: clamp(8px, 1.4dvh, 14px); font-size: 15px; }
.a11y-link { margin: clamp(10px, 2dvh, 18px) auto 0; }
.foot { margin: clamp(4px, 1dvh, 10px) 0 0; }
.foot-link { padding: 6px 12px; white-space: nowrap; }
.hero { display: none; }

.countdown { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(4,3,12,0.55); pointer-events: none; }
.countdown b { font-size: 120px; line-height: 1; color: #fff; text-shadow: 0 0 24px rgba(34,243,255,0.9); font-variant-numeric: tabular-nums; }
.countdown small { color: var(--cyan); letter-spacing: 0.2em; font-weight: 700; text-transform: uppercase; }

/* FX (fx.js) */
.confetti-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; border-radius: 2px; animation-name: confetti-fall; animation-timing-function: cubic-bezier(.25,.6,.4,1); animation-fill-mode: forwards; }
@keyframes confetti-fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); opacity: 0.9; } }

/* reduzir movimento: corta animações de interface */
.reduced *, .reduced *::before, .reduced *::after { animation: none !important; transition: none !important; }
