:root {
  --bg: #0d0b1a;
  --bg-2: #161229;
  --panel: #1c1735;
  --line: #2e2752;
  --text: #ece9ff;
  --muted: #a39dc7;
  --accent: #7cff6b;
  --accent-2: #ff5ea8;
  --radius: 14px;
  --pixel: "Press Start 2P", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, #2a1f5c 0%, transparent 60%),
    radial-gradient(800px 500px at -10% 30%, #1d3b2a33 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  min-height: 100vh;
}
.wrap { width: min(860px, 100% - 32px); margin-inline: auto; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: #0d0b1acc; backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--pixel); font-size: 13px; color: var(--text); text-decoration: none; letter-spacing: .5px; }
.logo-mark { color: var(--accent); }
nav { display: flex; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 32px; }
.eyebrow { font-family: var(--pixel); font-size: 11px; color: var(--accent); margin: 0 0 18px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.5px; }
.accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0; }

/* Ask panel */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 24px; box-shadow: 0 20px 60px #0006; }
.ask { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; font-weight: 500; color: var(--muted); }
input, textarea {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font: inherit; resize: vertical;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #7cff6b22; }
.actions { display: flex; gap: 12px; align-items: center; }
.btn-primary {
  font-family: var(--pixel); font-size: 11px; letter-spacing: .5px;
  background: var(--accent); color: #0d0b1a; border: 0; border-radius: 10px;
  padding: 14px 18px; cursor: pointer; box-shadow: 0 4px 0 #3c9c31;
  transition: transform .05s, box-shadow .05s;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #3c9c31; }
.btn-primary:disabled { opacity: .5; cursor: wait; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; cursor: pointer; }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.notice { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #ff5ea81a; border: 1px solid #ff5ea855; color: #ffc2dd; font-size: 14px; }

/* Thread */
.thread { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.thread:empty { display: none; }
.msg { border-radius: 12px; padding: 14px 16px; }
.msg-user { background: var(--bg-2); border: 1px solid var(--line); }
.msg-user .who { color: var(--muted); }
.msg-assistant { background: #7cff6b0d; border: 1px solid #7cff6b33; }
.who { font-family: var(--pixel); font-size: 9px; letter-spacing: .5px; color: var(--accent); margin-bottom: 8px; display: block; }
.body p { margin: 0 0 10px; }
.body p:last-child { margin-bottom: 0; }
.body ol, .body ul { margin: 0 0 10px; padding-left: 22px; }
.body li { margin: 4px 0; }
.body h3, .body h4 { margin: 14px 0 6px; font-size: 16px; }
.body code { background: #0006; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.body a { color: var(--accent); }
.status { color: var(--muted); font-size: 13px; font-style: italic; }
.cursor::after { content: "▌"; color: var(--accent); animation: blink 1s steps(2) infinite; margin-left: 2px; }

/* Takeover teaser */
.takeover { margin-top: 56px; padding: 28px; border: 1px dashed var(--accent-2); border-radius: var(--radius); position: relative; background: #ff5ea80a; }
.takeover-tag { position: absolute; top: -11px; left: 24px; background: var(--accent-2); color: #0d0b1a; font-family: var(--pixel); font-size: 9px; padding: 6px 8px; border-radius: 6px; }
.takeover h2 { margin: 6px 0 8px; font-size: 24px; }
.takeover p { color: var(--muted); margin: 0 0 12px; }
.takeover ul { margin: 0; padding-left: 20px; color: var(--muted); }

.foot { color: var(--muted); font-size: 13px; padding: 48px 0 40px; text-align: center; }

@media (max-width: 560px) {
  nav { display: none; }
  .hero { padding-top: 48px; }
  .panel { padding: 18px; }
}

/* ===== Interface completa ===== */
nav a.active { color: var(--text); }
.nav-pill { border: 1px solid var(--accent-2); color: #ffc2dd !important; padding: 6px 12px; border-radius: 999px; }
.nav-pill.active, .nav-pill:hover { background: var(--accent-2); color: #0d0b1a !important; }
a.btn-primary, a.btn-ghost { display: inline-block; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h2 { font-size: 24px; margin: 0 0 18px; }

/* Arte gerada dos cards */
.art { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--a), var(--b)); display: grid; place-items: center; }
.art-grid { position: absolute; inset: 0; background-image: linear-gradient(#ffffff14 1px, transparent 1px), linear-gradient(90deg, #ffffff14 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(to top, #000, transparent 80%); }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #0009, transparent 55%); }
.art-icon { position: relative; z-index: 1; filter: drop-shadow(0 6px 14px #0008); }
.art-game { position: absolute; z-index: 2; left: 12px; bottom: 10px; font-family: var(--pixel); font-size: 9px; color: #fff; text-shadow: 0 2px 0 #0008; letter-spacing: .5px; }
.art-card { aspect-ratio: 16 / 9; }
.art-card .art-icon { font-size: 52px; }
.art-hero { aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1px solid #ffffff22; }
.art-hero .art-icon { font-size: 110px; }
.art-hero .art-game { font-size: 11px; left: 16px; bottom: 16px; }

/* Hero inicial */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { position: relative; display: block; transform: rotate(2deg); transition: transform .2s; }
.hero-art:hover { transform: rotate(0) scale(1.02); }
.hero-badge { position: absolute; top: -12px; right: 16px; background: var(--accent); color: #0d0b1a; font-family: var(--pixel); font-size: 9px; padding: 7px 9px; border-radius: 6px; }

/* Grade de fases */
.section-head { display: flex; flex-direction: column; gap: 12px; margin: 48px 0 18px; }
.section-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: 500 13px var(--sans); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); color: #0d0b1a; border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.grid.wrap { margin-bottom: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 40px #0008; }
.card[hidden] { display: none; }
.card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.card-body h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.card-body p { margin: 0; }
.card-link { color: var(--accent); font-size: 14px; font-weight: 700; margin-top: 4px; }
.skulls { font-size: 10px; letter-spacing: 2px; color: var(--accent-2); }
.skulls .off { color: var(--line); }

/* Vídeos */
.video-thumb { position: relative; }
.play { position: absolute; z-index: 3; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: #000a; color: #fff; display: grid; place-items: center; font-size: 20px; border: 2px solid #fff8; transition: transform .15s, background .15s; }
.card.video:hover .play { transform: scale(1.12); background: #e62117; }

/* Opções */
.options { margin-top: 56px; }
.options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.option { position: relative; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.option:hover { border-color: var(--accent); transform: translateY(-3px); }
.option h3 { margin: 10px 0 6px; font-size: 18px; }
.option p { margin: 0; color: var(--muted); font-size: 14px; }
.option-icon { font-size: 30px; }
.option-hot { border-color: #ff5ea866; background: linear-gradient(160deg, #ff5ea81f, var(--panel) 60%); }
.option-hot:hover { border-color: var(--accent-2); }
.soon { position: absolute; top: 14px; right: 14px; font-family: var(--pixel); font-size: 8px; background: var(--accent-2); color: #0d0b1a; padding: 5px 7px; border-radius: 5px; }

/* Página da fase */
.page-head { padding: 56px 0 8px; }
.level-head { padding-top: 28px; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--text); }
.level-top { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: center; margin-top: 18px; }
.level-top h1 { margin-bottom: 4px; font-size: clamp(26px, 4vw, 38px); }
.level-top .lede { font-size: 16px; margin-top: 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 12px 14px 12px 54px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: #0d0b1a; font-family: var(--pixel); font-size: 10px; display: grid; place-items: center; }
.panel h2 { margin-top: 0; }
#passo-a-passo { margin-top: 40px; margin-bottom: 48px; scroll-margin-top: 80px; }
.takeover .steps li { background: #0d0b1a99; }
.takeover .steps li::before { background: var(--accent-2); }
.takeover .actions { margin-top: 16px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { transform: none; }
  .options-grid { grid-template-columns: 1fr; }
  .level-top { grid-template-columns: 1fr; }
}

/* ===== Tela inicial: jogos passando no fundo ===== */
.stage { position: relative; overflow: hidden; min-height: min(680px, 88vh); display: grid; align-items: center; border-bottom: 1px solid var(--line); }
.stage-bg { position: absolute; inset: -40px -10%; display: grid; gap: 18px; align-content: center; transform: rotate(-6deg); }
.bg-row { overflow: hidden; }
.bg-track { display: flex; gap: 18px; width: max-content; animation: slide var(--dur) linear infinite; }
.bg-row.rev .bg-track { animation-direction: reverse; }
@keyframes slide { to { transform: translateX(-50%); } }
.bg-tile {
  position: relative; flex: none; width: 230px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, var(--a), var(--b)); display: grid; place-items: center;
  box-shadow: 0 10px 30px #0007; border: 1px solid #ffffff1a;
}
.bg-tile::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px); background-size: 16px 16px; }
.bg-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #000a, transparent 60%); }
.bg-icon { position: relative; z-index: 1; font-size: 54px; filter: drop-shadow(0 6px 12px #0008); }
.bg-name { position: absolute; z-index: 2; left: 12px; bottom: 10px; right: 12px; font-family: var(--pixel); font-size: 9px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 65% at 50% 50%, #0d0b1af2 0%, #0d0b1acc 45%, #0d0b1a66 100%), linear-gradient(to bottom, transparent 70%, var(--bg)); }
.stage-content { position: relative; z-index: 2; text-align: center; padding: 72px 0; }
.stage-content h1 { font-size: clamp(30px, 5.2vw, 54px); text-shadow: 0 4px 24px #000c; }
.picker { display: flex; gap: 10px; max-width: 560px; margin: 28px auto 0; background: #0d0b1acc; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 20px 60px #000a; }
.picker input { flex: 1; border: 0; background: transparent; font-size: 17px; padding: 12px; }
.picker input:focus { box-shadow: none; }
.picker:focus-within { border-color: var(--accent); }
.quick-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px auto 0; max-width: 640px; }
.pick { background: #1c1735cc; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font: 500 13px var(--sans); cursor: pointer; backdrop-filter: blur(4px); }
.pick:hover { border-color: var(--accent); color: var(--accent); }
.stage-featured { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--muted); text-decoration: none; font-size: 14px; }
.stage-featured:hover { color: var(--text); }
.hero-badge-inline { background: var(--accent); color: #0d0b1a; font-family: var(--pixel); font-size: 8px; padding: 5px 7px; border-radius: 5px; }
#fases { scroll-margin-top: 80px; }

@media (prefers-reduced-motion: reduce) { .bg-track { animation: none; } }
@media (max-width: 560px) {
  .bg-tile { width: 160px; }
  .bg-icon { font-size: 38px; }
  .picker { flex-direction: column; }
}

/* ===== Boas-vindas ===== */
.welcome .stage-content { padding: 64px 0 80px; }
.welcome-title { min-height: 2.4em; }
.type-cursor { color: var(--accent); animation: blink 1s steps(2) infinite; margin-left: 4px; }
.speak-btn { margin-top: 4px; background: #1c1735cc; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: 500 13px var(--sans); cursor: pointer; }
.speak-btn:hover { color: var(--text); border-color: var(--accent); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 36px auto 0; text-align: left; }
.choice { position: relative; display: block; padding: 28px; border-radius: 18px; text-decoration: none; color: var(--text); background: #1c1735e6; border: 2px solid #7cff6b55; box-shadow: 0 20px 60px #000b; backdrop-filter: blur(6px); transition: transform .15s, border-color .15s, box-shadow .15s; }
.choice:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 26px 70px #000d, 0 0 0 4px #7cff6b22; }
.choice-alt { border-color: #ff5ea855; }
.choice-alt:hover { border-color: var(--accent-2); box-shadow: 0 26px 70px #000d, 0 0 0 4px #ff5ea822; }
.choice-icon { font-size: 42px; }
.choice h2 { margin: 12px 0 8px; font-size: 24px; }
.choice p { margin: 0 0 16px; color: var(--muted); }
.choice-go { font-family: var(--pixel); font-size: 10px; color: var(--accent); }
.choice-alt .choice-go { color: var(--accent-2); }

/* ===== Recomendação ===== */
.rec-form fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.rec-form legend { font-weight: 700; margin-bottom: 12px; font-size: 17px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: block; padding: 12px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); transition: all .12s; user-select: none; }
.opt:hover span { border-color: var(--muted); color: var(--text); }
.opt input:checked + span { background: #7cff6b1a; border-color: var(--accent); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#rec-results { margin: 8px auto 48px; scroll-margin-top: 80px; }
.rec-card { cursor: default; }
.rec-card:hover { transform: none; }
.tag-hit { background: #7cff6b22; border-color: var(--accent); color: var(--text); }
.rec-links { display: flex; gap: 14px; margin-top: 4px; }
.rec-links a { color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; }
.buy-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.buy-btn { display: inline-block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--accent);
  color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.buy-btn:hover { background: var(--accent); color: #0d0b1a; }
.affiliate-note { margin-top: 14px; }
.rec-more { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.rec-more h3 { margin: 0 0 4px; }
.rec-more p { margin: 0; }

@media (max-width: 680px) {
  .choices { grid-template-columns: 1fr; }
  .rec-more { flex-direction: column; align-items: flex-start; }
}

/* ===== Bit, o robô guia ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bit-hero-slot { min-height: 230px; display: flex; justify-content: center; margin-top: 6px; }
.bit { display: flex; align-items: flex-end; gap: 10px; }
.bit-body { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.bit-svg { width: 130px; height: auto; filter: drop-shadow(0 14px 24px #000a); animation: bit-float 3s ease-in-out infinite; }
@keyframes bit-float { 50% { transform: translateY(-8px); } }
.bit-eye { transform-box: fill-box; transform-origin: center; animation: bit-blink 4.5s infinite; }
@keyframes bit-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.bit-led { animation: bit-led 1.6s ease-in-out infinite; }
@keyframes bit-led { 50% { fill: #ff5ea8; } }
.bit-mouth { transform-box: fill-box; transform-origin: center; }
.bit.talking .bit-mouth { animation: bit-talk .18s ease-in-out infinite alternate; }
@keyframes bit-talk { from { transform: scaleY(1); } to { transform: scaleY(2.6); } }
.bit.talking .bit-chest { animation: bit-led .4s infinite; }
.bit-arm { transform-box: fill-box; transform-origin: top center; }
.bit.talking .bit-arm-r { animation: bit-wave .5s ease-in-out infinite alternate; }
@keyframes bit-wave { from { transform: rotate(0); } to { transform: rotate(-35deg); } }

.bit-bubble {
  position: relative; max-width: 340px; background: #fff; color: #1b1638; border-radius: 18px;
  padding: 14px 18px; font: 700 17px/1.35 var(--sans); box-shadow: 0 14px 40px #000a; text-align: left;
}
.bit-bubble::after { content: ""; position: absolute; right: -10px; bottom: 26px; border: 10px solid transparent; border-left-color: #fff; border-right: 0; }
.bit-bubble.pop { animation: bit-pop .25s ease-out; }
@keyframes bit-pop { from { transform: scale(.8); opacity: 0; } }
.bit-mute {
  align-self: flex-start; background: #1c1735e6; color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 15px;
}
.bit-mute:hover { border-color: var(--accent); }

/* Na abertura: grande, no centro, balão à esquerda do robô */
.bit.hero { flex-direction: row; align-items: center; }
.bit.hero .bit-bubble { font-size: clamp(18px, 2.4vw, 24px); max-width: 420px; }
.bit.hero .bit-svg { width: clamp(130px, 16vw, 180px); }

/* Nas outras páginas: pequeno, no canto inferior direito */
.bit.corner { position: fixed; right: 18px; bottom: 18px; z-index: 20; }
.bit.corner .bit-svg { width: 78px; }
.bit.corner .bit-bubble { font-size: 14px; max-width: 260px; padding: 10px 14px; margin-bottom: 20px; }
.bit.corner .bit-bubble::after { bottom: 16px; }
.bit.corner .bit-mute { width: 28px; height: 28px; font-size: 12px; }

@media (max-width: 560px) {
  .bit.hero { flex-direction: column-reverse; }
  .bit.hero .bit-bubble::after { right: auto; left: 50%; bottom: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
  .bit.corner .bit-bubble { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) { .bit-svg, .bit-eye, .bit-led, .bit.talking * { animation: none !important; } }

/* ===== Bit voando pela abertura ===== */
.stage.welcome { overflow: hidden; }
.bit-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.bit.hero {
  position: absolute; left: 0; top: 0; display: block; pointer-events: auto;
  transition: transform 1.1s cubic-bezier(.45, .05, .3, 1);
}
.bit.hero.instant { transition: none; }
.bit.hero .bit-body { position: relative; z-index: 1; }
.bit.hero .bit-bubble { position: absolute; width: max-content; max-width: 360px; }
.bit.hero[data-side="left"] .bit-bubble { right: calc(100% + 14px); bottom: 40px; }
.bit.hero[data-side="top"] .bit-bubble { left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%); max-width: 250px; font-size: 17px; }
.bit.hero[data-side="top"] .bit-bubble.pop { animation: bit-pop-top .25s ease-out; }
@keyframes bit-pop-top { from { transform: translateX(-50%) scale(.8); opacity: 0; } }
.bit.hero[data-side="top"] .bit-bubble::after { right: auto; left: 50%; bottom: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
.bit.hero .bit-mute { position: absolute; top: 0; right: -38px; }
/* Em voo: inclina para a direção do movimento e solta "fogo" do propulsor */
.bit.flying .bit-svg { animation: none; transform: rotate(10deg); transition: transform .3s; }
.bit.flying.fly-left .bit-svg { transform: rotate(-10deg) scaleX(-1); }
.bit-body::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 26px; height: 26px; margin-left: -13px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: radial-gradient(circle at 50% 30%, #fff 0, #ffd166 30%, #ff5ea8 70%, transparent 72%);
  opacity: 0; transform: scaleY(.4); transform-origin: top; transition: opacity .2s, transform .2s;
}
.bit.flying .bit-body::after { opacity: 1; transform: scaleY(1); animation: bit-flame .12s infinite alternate; }
@keyframes bit-flame { to { transform: scaleY(1.35); } }
.bit-hero-slot { min-height: 250px; }

@media (max-width: 560px) {
  .bit.hero[data-side="left"] .bit-bubble { right: auto; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); max-width: 260px; font-size: 16px; }
  .bit.hero[data-side="left"] .bit-bubble.pop { animation: bit-pop-top .25s ease-out; }
  .bit.hero[data-side="left"] .bit-bubble::after { right: auto; left: 50%; bottom: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
}
/* Ajustes de tamanho do Bit na abertura */
.bit.hero .bit-svg { width: clamp(120px, 12vw, 150px); }
.bit.hero[data-side="left"] .bit-bubble { bottom: 70px; }
.bit-hero-slot { min-height: 270px; }
@media (max-width: 560px) {
  .bit-hero-slot { min-height: 300px; }
  .bit.hero .bit-svg { width: 120px; }
  .bit.hero[data-side="left"] .bit-bubble { right: auto; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); max-width: 280px; font-size: 16px; }
}

/* ===== Poses do Bit ===== */
.bit-body { position: relative; display: inline-block; }
.bit-svg { position: relative; z-index: 1; }
.face-gamer, .face-bored, .gamer, .sofa, .bit-zzz { display: none; }

/* Jogando: controle nas mãos, olhar concentrado, polegares apertando */
.bit[data-pose="gamer"] .face-normal, .bit[data-pose="gamer"] .arms-normal { display: none; }
.bit[data-pose="gamer"] .face-gamer, .bit[data-pose="gamer"] .gamer { display: inline; }
.bit[data-pose="gamer"] .bit-svg { animation: bit-game-bob .5s ease-in-out infinite alternate; }
@keyframes bit-game-bob { from { transform: rotate(-3deg); } to { transform: rotate(3deg) translateY(-3px); } }
.gamer .thumb-l, .gamer .thumb-r, .gamer .btn { transform-box: fill-box; transform-origin: center; }
.bit[data-pose="gamer"] .thumb-l { animation: bit-thumb-l .7s steps(2) infinite; }
.bit[data-pose="gamer"] .thumb-r { animation: bit-thumb-r 1.1s steps(1) infinite; }
@keyframes bit-thumb-l { 50% { transform: translate(1px, 2px); } }
@keyframes bit-thumb-r { 0% { transform: translate(0, 0); } 25% { transform: translate(5px, 3px); } 50% { transform: translate(-5px, 3px); } 75% { transform: translate(0, 7px); } }
.bit[data-pose="gamer"] .btn { animation: bit-btn 1.1s steps(1) infinite; }
.bit[data-pose="gamer"] .b2 { animation-delay: .27s; } .bit[data-pose="gamer"] .b3 { animation-delay: .55s; } .bit[data-pose="gamer"] .b4 { animation-delay: .82s; }
@keyframes bit-btn { 0% { transform: scale(.7); filter: brightness(1.8); } 25% { transform: none; filter: none; } }

/* Entediado no sofá: afundado, olhos meio fechados, "zzz" subindo */
.sofa { position: absolute; left: 50%; width: 155%; transform: translateX(-50%); bottom: -30%; }
.sofa-back { z-index: 0; }
.sofa-front { z-index: 2; }
.bit[data-pose="bored"] .sofa { display: block; animation: bit-sofa-in .35s ease-out; }
@keyframes bit-sofa-in { from { opacity: 0; transform: translateX(-50%) translateY(14px); } }
.bit[data-pose="bored"] .face-normal { display: none; }
.bit[data-pose="bored"] .face-bored { display: inline; }
.bit[data-pose="bored"] .bit-svg { animation: bit-sigh 3.2s ease-in-out infinite; transform: translateY(10%) rotate(-4deg); }
@keyframes bit-sigh { 50% { transform: translateY(12%) rotate(-6deg); } }
.bit[data-pose="bored"] .bit-led { animation: none; fill: #6c63b5; }
.bit[data-pose="bored"] .bit-arm-r { animation: none !important; }
.bit[data-pose="bored"] .bit-zzz { display: block; position: absolute; z-index: 3; right: -6%; top: 2%; font-family: var(--pixel); color: #c9c3ff; }
.bit-zzz i { position: absolute; font-style: normal; opacity: 0; animation: bit-z 2.4s ease-out infinite; }
.bit-zzz i:nth-child(1) { font-size: 12px; }
.bit-zzz i:nth-child(2) { font-size: 15px; animation-delay: .8s; }
.bit-zzz i:nth-child(3) { font-size: 19px; animation-delay: 1.6s; }
@keyframes bit-z { 0% { opacity: 0; transform: translate(0, 10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(18px, -36px); } }
/* Quando o balão fica em cima, sobe um pouco no sofá para não cobrir o "zzz" */
.bit.hero[data-pose="bored"][data-side="top"] .bit-bubble { bottom: calc(100% + 4px); }
@media (prefers-reduced-motion: reduce) { .bit[data-pose] * { animation: none !important; } }

/* ===== Cachorro astronauta nas costas do Bit ===== */
.dog-head { transform-box: fill-box; transform-origin: 30% 90%; animation: dog-bob 2.4s ease-in-out infinite; }
@keyframes dog-bob { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg) translateY(-1px); } }
.dog-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: dog-tail .35s ease-in-out infinite alternate; }
@keyframes dog-tail { to { transform: rotate(-25deg); } }
.dog-eye { transform-box: fill-box; transform-origin: center; animation: bit-blink 3.7s infinite; }
.bit.flying .dog-head { animation: dog-bob .5s ease-in-out infinite; }
.bit[data-pose="bored"] .dog-head { animation-duration: 4s; }
@media (prefers-reduced-motion: reduce) { .dog-head, .dog-tail, .dog-eye { animation: none !important; } }

/* ===== Card "Passar de fase": tela de luta azul x vermelho ===== */
.choice-vs {
  background:
    linear-gradient(115deg, transparent 49.2%, #ffffffcc 49.2% 50.8%, transparent 50.8%),
    linear-gradient(115deg, #1b46c9f0 0 50%, #c81e36f0 50% 100%);
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 3px #ffffff22, -10px 0 40px -8px #2f6bffaa, 10px 0 40px -8px #ff3355aa, 0 20px 60px #000b;
  overflow: visible;
}
.choice-vs:hover { border-color: #fff; box-shadow: 0 0 0 3px #fff4, -14px 0 50px -6px #2f6bffcc, 14px 0 50px -6px #ff3355cc, 0 26px 70px #000d; }
.choice-vs h2 { color: #fff; text-shadow: 0 2px 0 #0006; }
.choice-vs p { color: #e9eaff; }
.choice-vs .choice-go { color: #ffd166; }
.vs-badge {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-6deg);
  font-family: var(--pixel); font-size: 22px; letter-spacing: 2px; color: #ffd166;
  background: #111; border: 3px solid #fff; border-radius: 10px; padding: 9px 12px 7px;
  text-shadow: 3px 3px 0 #c81e36, -3px -3px 0 #1b46c9; box-shadow: 0 8px 20px #000a;
  animation: vs-pulse 1.4s ease-in-out infinite;
}
@keyframes vs-pulse { 50% { transform: translateX(-50%) rotate(-6deg) scale(1.12); } }
.vs-tag { position: absolute; top: 12px; font-family: var(--pixel); font-size: 9px; padding: 4px 6px; border-radius: 4px; background: #0008; color: #fff; }
.vs-p1 { left: 12px; } .vs-p2 { right: 12px; }

.choices { margin-top: 56px; row-gap: 56px; }
@media (prefers-reduced-motion: reduce) { .vs-badge { animation: none; } }

/* ===== Card "Recomendar um jogo": bonequinho com dúvida sentado na borda ===== */
.choice-doubt { overflow: visible; }
.doubt-guy { position: absolute; right: 22px; top: -86px; width: 76px; height: 118px; pointer-events: none; }
.doubt-guy svg { width: 100%; height: 100%; overflow: visible; }
.doubt-arm { transform-box: fill-box; transform-origin: 50% 100%; animation: doubt-scratch .45s ease-in-out infinite alternate; }
@keyframes doubt-scratch { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.doubt-guy svg { animation: doubt-tilt 3s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes doubt-tilt { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
.doubt-q {
  position: absolute; font-family: var(--pixel); color: #ffd166; text-shadow: 2px 2px 0 #ff5ea8;
  opacity: 0; animation: doubt-q 2.7s ease-out infinite;
}
.doubt-q.q1 { left: -6px; top: -6px; font-size: 14px; }
.doubt-q.q2 { left: 22px; top: -22px; font-size: 20px; animation-delay: .9s; }
.doubt-q.q3 { left: 50px; top: -8px; font-size: 12px; animation-delay: 1.8s; }
@keyframes doubt-q { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 20% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px) rotate(12deg); } }
.choice-doubt:hover .doubt-q { animation-duration: 1.2s; }
.choice-doubt:hover .doubt-arm { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) { .doubt-guy *, .doubt-guy svg { animation: none !important; } .doubt-q { opacity: 1; } }

/* ---------- Minigame "Bit Coleta" (canto inferior esquerdo da tela inicial) ---------- */
.mg { position: fixed; left: 18px; bottom: 18px; z-index: 21; display: none; flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
.mg.shown { display: flex; }
.mg-launch {
  font: 11px/1 var(--pixel); color: #0d0b1a; background: var(--accent); border: 0; border-radius: 999px;
  padding: 12px 16px; cursor: pointer; box-shadow: 0 6px 0 #3f9b35, 0 12px 24px #0008; transition: transform .1s;
  animation: mg-wiggle 4s ease-in-out infinite;
}
.mg-launch:hover { transform: translateY(-2px); }
.mg-launch:active { transform: translateY(4px); box-shadow: 0 2px 0 #3f9b35, 0 6px 14px #0008; }
.mg.open .mg-launch { animation: none; background: var(--panel); color: var(--text); box-shadow: 0 6px 0 #0d0b1a, 0 12px 24px #0008; }
.mg.open .mg-launch span::after { content: " ▾"; }
@keyframes mg-wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-6deg); } 94% { transform: rotate(6deg); } 97% { transform: rotate(-3deg); } }
.mg-panel {
  width: min(300px, calc(100vw - 36px)); background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 10px; box-shadow: 0 20px 50px #000c; animation: bit-pop .2s ease-out;
}
.mg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mg-title { font: 10px/1 var(--pixel); color: var(--accent); flex: 1; }
.mg-best { font: 10px/1 var(--pixel); color: #ffd54f; }
.mg-close, .mg-size { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 16px; line-height: 1; }
.mg-close:hover, .mg-size:hover { color: var(--text); border-color: var(--accent-2); }
.mg-canvas { display: block; width: 100%; aspect-ratio: 280 / 320; border-radius: 10px; cursor: pointer; touch-action: none; outline: none; }
.mg-canvas:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.mg-help { margin: 8px 2px 0; font-size: 11px; color: var(--muted); text-align: center; }
/* tela cheia */
body.mg-lock { overflow: hidden; }
.mg.full .mg-launch { display: none; }
.mg.full .mg-panel {
  position: fixed; inset: 0; width: auto; border: 0; border-radius: 0; padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(900px 600px at 50% 0%, #2a1f5c 0%, transparent 60%), var(--bg);
}
.mg.full .mg-head { width: min(100%, calc((100vh - 110px) * 280 / 320)); }
.mg.full .mg-title, .mg.full .mg-best { font-size: 13px; }
.mg.full .mg-canvas { width: min(100%, calc((100vh - 110px) * 280 / 320)); border: 2px solid var(--line); }
.mg.full .mg-help { font-size: 13px; }
.mg-panel:fullscreen { background: var(--bg); }
/* botão de ataque com as mãos de fogo */
.mg-attack {
  display: block; width: 100%; margin-top: 8px; padding: 10px; border: 0; border-radius: 10px; cursor: pointer;
  font: 11px/1 var(--pixel); color: #6b5a45; background: #2a2340; touch-action: manipulation; user-select: none;
}
.mg-attack small { font-size: 8px; opacity: .7; }
.mg-attack.ready { color: #2b0d00; background: linear-gradient(#ffd600, #ff6d00); box-shadow: 0 4px 0 #a33a00, 0 0 18px #ff9100aa; animation: mg-glow .5s ease-in-out infinite alternate; }
.mg-attack.ready:active { transform: translateY(3px); box-shadow: 0 1px 0 #a33a00; }
@keyframes mg-glow { to { box-shadow: 0 4px 0 #a33a00, 0 0 28px #ffd600; } }
.mg.full .mg-attack { width: min(100%, calc((100vh - 150px) * 280 / 320)); font-size: 14px; padding: 14px; }
.mg.full .mg-head, .mg.full .mg-canvas { width: min(100%, calc((100vh - 150px) * 280 / 320)); }
.mg-attack[hidden] { display: none; }
/* ranking mundial (aparece por cima do jogo) */
.mg-stage { position: relative; width: 100%; }
.mg.full .mg-stage { width: min(100%, calc((100vh - 150px) * 280 / 320)); }
.mg.full .mg-stage .mg-canvas { width: 100%; }
.mg-rank-btn { background: none; border: 1px solid var(--line); border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 14px; line-height: 1; }
.mg-rank-btn:hover { border-color: var(--accent-2); }
.mg-board {
  position: absolute; inset: 0; border-radius: 10px; padding: 14px 12px; overflow-y: auto;
  background: #0d0b1af2; display: flex; flex-direction: column; gap: 8px; color: var(--text);
}
.mg-board[hidden], .mg-form[hidden] { display: none; }
.mg-board-title { margin: 0; text-align: center; font: 11px/1.4 var(--pixel); color: #ffd54f; }
.mg-form { display: flex; flex-wrap: wrap; gap: 6px; }
.mg-form-msg { width: 100%; margin: 0; font-size: 12px; color: var(--accent); text-align: center; }
.mg-name { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 14px; }
.mg-form button, .mg-board-close { border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; font: 10px/1 var(--pixel); background: var(--accent); color: #0d0b1a; }
.mg-board-close { margin-top: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.mg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.mg-list li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px; background: #ffffff0a; font-size: 13px; }
.mg-list li:nth-child(-n+3) { background: #ffd54f1a; }
.mg-list li.me { outline: 2px solid var(--accent); }
.mg-list li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-list li b { color: #ffd54f; font-family: var(--pixel); font-size: 11px; }
.mg-list .mg-empty { justify-content: center; color: var(--muted); background: none; }
.mg.full .mg-list li { font-size: 16px; padding: 8px 12px; }

/* ---------- tela de entrada (cadastro / login) ---------- */
html.auth-locked, html.auth-locked body { overflow: hidden; }
.auth-gate {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 20%, #2a1f5a 0%, var(--bg) 70%); overflow-y: auto;
}
.auth-gate[hidden] { display: none; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 20px 60px #0008; color: var(--text);
}
.auth-logo { font-family: var(--pixel); font-size: 11px; color: var(--accent); margin: 0 0 14px; }
.auth-card h1 { font-family: var(--pixel); font-size: 16px; line-height: 1.5; margin: 0 0 18px; }
.auth-step { display: flex; flex-direction: column; gap: 12px; }
.auth-step[hidden] { display: none; }
.auth-step label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.auth-step input {
  font: inherit; font-weight: 400; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text);
}
.auth-step input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-step input[name="code"] { font-family: var(--pixel); font-size: 16px; letter-spacing: 6px; text-align: center; }
.auth-step .btn-primary, .auth-step .btn-ghost { padding: 13px; cursor: pointer; }
.auth-code-btn {
  font-family: var(--pixel); font-size: 10px; background: transparent; color: var(--text);
  border: 1px solid var(--accent-2); border-radius: 10px;
}
.auth-code-btn:hover { background: var(--accent-2); color: var(--bg); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-align: left; padding: 0; }
.auth-link:hover { color: var(--text); text-decoration: underline; }
.auth-sent { margin: 0; color: var(--muted); font-size: 14px; }
.auth-msg { min-height: 1.2em; margin: 14px 0 0; color: #ff8fb8; font-size: 14px; }
.auth-msg.ok { color: var(--accent); }
.auth-step button:disabled, .auth-step input:disabled { opacity: .6; cursor: wait; }
.auth-badge {
  margin-left: 12px; background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.auth-badge:hover { color: var(--text); border-color: var(--accent); }

.auth-inapp { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #ffd54f22; border: 1px solid #ffd54f88; line-height: 1.5; }
