:root {
  --bg: #0f1420;
  --bg2: #161d2e;
  --card: #1c2539;
  --line: #2c3854;
  --text: #e8ecf5;
  --muted: #98a3bb;
  --accent: #f0a020;
  --accent2: #ffc04d;
  --ok: #3fb97a;
  --err: #e5534b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 600px at 50% -200px, #24304d 0%, var(--bg) 70%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent2); }
h1 { font-size: 26px; margin: 0 0 18px; }
h2 { font-size: 18px; margin: 0 0 12px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: #0b0f18cc; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; backdrop-filter: blur(6px); flex-wrap: wrap;
}
.brand { color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 6px; }
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; }
.logo { background: linear-gradient(135deg, var(--accent), #e0601a); color: #1a1004; border-radius: 8px; padding: 2px 7px; font-weight: 900; }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a, .link { color: var(--text); text-decoration: none; opacity: .85; }
nav a:hover, .link:hover { opacity: 1; color: var(--accent2); }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 16px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 30px #0006; }
.narrow { max-width: 440px; margin: 24px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.server header { display: flex; justify-content: space-between; align-items: center; }
.server h2 { margin: 0; }
.tag { color: var(--muted); font-size: 12px; border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.char { margin: 14px 0; }

form { display: grid; gap: 12px; margin: 0; }
label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
label small { font-size: 11px; }
input, select {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset.sex { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; }
fieldset.sex label { display: flex; align-items: center; gap: 6px; color: var(--text); }
fieldset.sex input { width: auto; }

.btn {
  display: inline-block; text-align: center; text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, var(--accent2), var(--accent)); color: #241503;
  font-weight: 700; border: 0; border-radius: 8px; padding: 10px 18px; font-size: 15px;
}
.btn:hover { filter: brightness(1.08); }
.btn.big { display: block; padding: 13px; font-size: 16px; }

.msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 14px; }
.msg.ok { background: #3fb97a22; border: 1px solid var(--ok); }
.msg.err { background: #e5534b22; border: 1px solid var(--err); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* pagina do jogo */
body.play { background: #05070c; align-items: center; }
.game-bar { width: 1000px; max-width: 100%; display: flex; justify-content: space-between; padding: 10px 4px; color: var(--muted); font-size: 13px; }
.game-bar a { color: var(--muted); text-decoration: none; }
#game { width: 1000px; height: 600px; max-width: 100%; background: #000; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
#game > *, #game embed { display: block; width: 100%; height: 100%; }
.game-bar { gap: 16px; }
.game-bar a:last-child { margin-left: auto; }

/* Moldura de angulos (img/moldura.jpg, 1600x900): o jogo ocupa o buraco de 1000x600 em (300,149).
   A moldura escala com a janela mantendo 16:9; o Ruffle redimensiona o jogo para caber no buraco. */
.stage.framed {
  position: relative;
  width: min(calc(100vw - 16px), calc((100vh - 48px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000 url(../img/moldura.jpg) center / 100% 100% no-repeat;
}
.stage.framed #game {
  position: absolute; left: 18.75%; top: 16.5556%; width: 62.5%; height: 66.6667%;
  max-width: none; border: 0; border-radius: 0;
}
body.play:has(.stage.framed) .game-bar { width: min(calc(100vw - 16px), calc((100vh - 48px) * 16 / 9)); }

/* ---------- tela de entrada / cadastro ---------- */
body.auth { min-height: 100vh; background: #1a0f08; overflow-x: hidden; }
.auth-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    linear-gradient(90deg, #120a05f2 0%, #120a05c4 38%, #120a0566 70%, #120a0540 100%),
    linear-gradient(0deg, #0d0704e6 0%, transparent 45%),
    url(../img/login-bg.jpg) center / cover no-repeat;
  animation: bg-in 1.2s ease-out both;
}
@keyframes bg-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.auth-wrap {
  position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr minmax(340px, 420px); gap: 48px; align-items: center;
  padding: 48px 24px;
}
.hero { animation: rise .7s .1s ease-out both; }
.hero-brand { display: flex; align-items: center; gap: 16px; }
.hero-brand h1 { font-size: 52px; line-height: 1; margin: 0; letter-spacing: -1px; text-shadow: 0 4px 24px #000a; }
.version { margin: 4px 0 0; color: var(--accent2); font-weight: 600; letter-spacing: .5px; }
.logo.big { font-size: 34px; padding: 10px 14px; border-radius: 16px; box-shadow: 0 10px 30px #e0601a55; }
.tagline { font-size: 19px; line-height: 1.5; max-width: 30ch; margin: 22px 0 18px; color: #f3e9dd; text-shadow: 0 2px 12px #000c; }
.perks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: center; color: #e9dccd; }
.perks .ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #ffffff14; border: 1px solid #ffffff1f; font-size: 13px; flex: none; }
.status { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.srv, .count { background: #00000059; border: 1px solid #ffffff1f; border-radius: 99px; padding: 5px 12px; font-size: 13px; backdrop-filter: blur(4px); }
.srv { display: inline-flex; align-items: center; gap: 8px; }
.srv i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.srv.on i { background: var(--ok); box-shadow: 0 0 0 0 #3fb97a99; animation: pulse 2s infinite; }
.srv.off i { background: var(--err); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px #3fb97a00; } 100% { box-shadow: 0 0 0 0 #3fb97a00; } }
.count strong { color: var(--accent2); }

.auth-card {
  padding: 30px 28px; border-radius: 18px; max-width: none; margin: 0;
  background: #170f0acc; border: 1px solid #ffffff1c; backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 30px 80px #000a, inset 0 1px 0 #ffffff14;
  animation: rise .6s .2s ease-out both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-card h2 { font-size: 24px; margin: 0 0 4px; }
.auth-card .sub { margin: 0 0 20px; color: var(--muted); }
.auth-form { gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: #d9cbbb; display: flex; justify-content: space-between; gap: 8px; }
.field label small { color: var(--muted); font-size: 11px; }
.auth-card input:not([type=checkbox]) { background: #0c0805b3; border-color: #ffffff24; padding: 12px 14px; font-size: 15px; }
.auth-card input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.auth-card input[aria-invalid=true] { border-color: var(--err); }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .7; pointer-events: none; }
.input-ic .ic ~ input { padding-left: 38px; }
.input-ic input { padding-right: 46px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 8px;
  border: 0; background: transparent; color: var(--text); cursor: pointer; opacity: .6; font-size: 16px;
}
.eye:hover, .eye.on { opacity: 1; background: #ffffff12; }
.hint { margin: 0; font-size: 12px; }
.hint.warn { color: var(--accent2); }
.remember { display: flex; align-items: center; gap: 8px; color: #d9cbbb; font-size: 13px; cursor: pointer; }
.remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.btn.big { display: block; width: 100%; padding: 13px; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid #ffffff33; }
.btn.ghost:hover { background: #ffffff0f; filter: none; }
.btn:disabled { cursor: progress; opacity: .8; }
.btn.loading::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid #241503; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #ffffff1f; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); min-height: 16px; }
.meter::before { content: ""; grid-area: 1 / 1; height: 5px; border-radius: 9px; background: #ffffff14; }
.meter i { grid-area: 1 / 1; height: 5px; border-radius: 9px; width: 0; transition: width .25s, background .25s; }
.meter.s1 i { background: var(--err); } .meter.s2 i { background: #e0a030; }
.meter.s3 i { background: #9bc53d; } .meter.s4 i { background: var(--ok); }
.center { text-align: center; }
.download { display: grid; gap: 2px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; text-decoration: none;
  border: 1px dashed #f0a02088; background: #f0a02012; color: var(--text); }
.download:hover { background: #f0a02024; }
.download strong { color: var(--accent2); }
.download span { color: var(--muted); font-size: 12px; }
.auth-foot { position: relative; z-index: 1; text-align: center; color: #ffffff80; font-size: 12px; padding: 16px; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px; max-width: 520px; }
  .hero-brand h1 { font-size: 40px; }
  .tagline { font-size: 16px; margin: 14px 0 10px; }
  .perks { display: none; }
  .auth-bg { background:
    linear-gradient(0deg, #120a05f5 0%, #120a05cc 55%, #120a0580 100%),
    url(../img/login-bg.jpg) center / cover no-repeat; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-bg, .hero, .auth-card, .srv.on i { animation: none; }
}

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .top { padding: 10px 16px; }
}

/* pagina /baixar */
.dl-hero { display: grid; gap: 8px; padding: 28px; margin-bottom: 20px;
  background: linear-gradient(135deg, #f0a02022, transparent 60%), var(--card); }
.dl-hero h1 { margin: 0 0 6px; font-size: 28px; }
.dl-kicker { margin: 0; color: var(--accent2); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.dl-btn { display: inline-block; margin: 14px 0 6px; padding-inline: 28px; }
.dl-grid h2 { margin-top: 0; font-size: 18px; }
.dl-steps, .dl-list { margin: 0; padding-left: 20px; line-height: 1.7; }
.dl-hash { font-size: 11px; word-break: break-all; color: var(--text); }
.nav-dl { color: var(--accent2) !important; font-weight: 700; }

/* recarga por Pix */
.pix-pacotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 6px 0 4px; }
.pix-pacote { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; cursor: pointer; padding: 18px 14px; color: var(--text); }
.pix-pacote input { position: absolute; opacity: 0; pointer-events: none; }
.pix-pacote:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 10px 30px #0006; }
.pix-pacote:hover { border-color: var(--accent2); }
.pix-pacote.destaque .tag { position: absolute; top: -10px; background: var(--accent); color: #241503; border: 0; font-weight: 700; }
.pix-nome { font-weight: 700; font-size: 15px; }
.pix-cupons { font-size: 22px; font-weight: 800; color: var(--accent2); font-variant-numeric: tabular-nums; }
.pix-valor { margin-top: 6px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pix-primeira { font-size: 15px; }
.pix-regras { margin-top: 22px; }
.pix-regras p { margin: 0 0 8px; color: var(--muted); }
.pix-pedido { max-width: 760px; }
.pix-resumo { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 18px; }
.pix-resumo dt { color: var(--muted); }
.pix-resumo dd { margin: 0; }
.pix-pagar { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; margin-bottom: 14px; }
.pix-qr { width: 240px; height: 240px; background: #fff; border-radius: 8px; padding: 8px; image-rendering: pixelated; }
.pix-pagar textarea { width: 100%; resize: none; font: 12px/1.4 ui-monospace, Consolas, monospace; word-break: break-all;
  background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.pix-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.pix-status.pendente { color: var(--accent2); border-color: var(--accent); }
.pix-status.pago { color: var(--ok); border-color: var(--ok); }
.pix-status.cancelado, .pix-status.expirado { color: var(--muted); }
.pix-tabela { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.pix-tabela th, .pix-tabela td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.pix-tabela th { color: var(--muted); font-weight: 600; font-size: 12px; }
@media (max-width: 640px) { .pix-pagar { grid-template-columns: 1fr; } .pix-qr { justify-self: center; } }
