:root {
  --bg: #070a12; --bg2: #0e1424; --card: #0f1626cc; --line: #1f2b45; --text: #eef3fb; --muted: #8b9bb8;
  --acc: #22d3ee; --acc2: #f59e0b; --pink: #f472b6; --bad: #ef4444; --good: #22c55e; --r: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); min-height: 100%; }
body { min-height: 100vh; background:
  radial-gradient(900px 500px at 85% -5%, #22d3ee22, transparent 60%),
  radial-gradient(700px 400px at 0% 30%, #f59e0b14, transparent 60%), var(--bg); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--acc); text-decoration: none; }
.muted { color: var(--muted); } small, .small { font-size: .85em; } .center { text-align: center; }
.hidden { display: none !important; }

/* topo */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 22px;
  background: #070a12e6; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; color: var(--text); }
.logo { display: flex; align-items: center; gap: 10px; }
.mark { width: 38px; height: 38px; filter: drop-shadow(0 0 8px #22d3ee88); }
.word { font-weight: 900; font-size: 1.35rem; letter-spacing: .08em; font-style: italic; }
.word b { background: linear-gradient(90deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95em; }
.nav a:hover { color: var(--text); background: var(--bg2); }
.top-r { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.credits { display: flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 99px; color: var(--text);
  background: linear-gradient(90deg, #22d3ee22, #f59e0b22); border: 1px solid #22d3ee55; font-variant-numeric: tabular-nums; }
select { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }

button { cursor: pointer; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); padding: 10px 16px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: linear-gradient(135deg, var(--acc), #0ea5e9); color: #041018; border: 0; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 6px 24px #22d3ee44; text-transform: uppercase; }
.primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ghost { background: transparent; } .ghost:hover { background: var(--bg2); }
.sm { padding: 7px 12px; font-size: .85em; }
.btnlink { display: inline-block; border-radius: 12px; padding: 12px 20px; }
.big { padding: 15px 22px; font-size: 1.05em; width: 100%; }
.huge { padding: 20px 26px; font-size: 1.25em; width: 100%; animation: pulse 1.2s infinite; }
.danger { border-color: #5b2323; color: #fca5a5; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px #22d3ee22; } }

/* hero */
.hero3 { position: relative; min-height: 460px; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0b1230 0%, #1b1340 45%, #3b1d3a 75%, #070a12 100%); }
.hero3.small { min-height: 240px; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 75%; }
.hero3::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(transparent, var(--bg)); }
.hero-in { position: relative; z-index: 2; max-width: 1180px; width: 100%; margin: 0 auto; padding: 40px 22px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.tag { display: inline-block; padding: 5px 12px; border-radius: 99px; background: #00000066; border: 1px solid #ffffff2a; font-size: .8em; letter-spacing: .1em; text-transform: uppercase; color: #cfe8f3; }
.hero-in h1 { font-size: clamp(2.4rem, 7vw, 5rem); line-height: .98; margin: 16px 0; font-weight: 900; font-style: italic; letter-spacing: -.02em;
  text-shadow: 0 0 30px #22d3ee55, 0 4px 0 #00000066; max-width: 12em; }
.lead { font-size: 1.15rem; color: #d5deef; max-width: 34em; }
.big-cta { font-size: 1.15rem; padding: 16px 30px; margin-top: 8px; }
.big-balance { font-size: clamp(2.6rem, 8vw, 4.2rem); font-weight: 900; font-variant-numeric: tabular-nums; text-shadow: 0 0 24px #22d3ee66; }
.hero-packs { display: flex; gap: 10px; }
.hero-packs .pack { background: #00000066; backdrop-filter: blur(6px); min-width: 110px; }

/* menu principal */
.wrap { max-width: 1180px; margin: 0 auto; padding: 10px 22px 60px; }
.menu-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); margin: 26px 0 14px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; backdrop-filter: blur(6px); scroll-margin-top: 80px; }
.card.neon { border-color: #22d3ee55; box-shadow: 0 0 0 1px #22d3ee22 inset, 0 10px 40px #22d3ee14; }
.card h2 { margin: 0 0 14px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.card h3 { margin: 16px 0 8px; font-size: .95rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.live-grid > div { background: #070a12aa; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.live-grid small { display: block; color: var(--muted); margin-bottom: 4px; }
.live-grid b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.live-grid b.free { color: var(--good); font-size: 1rem; } .live-grid b.busy { color: var(--acc2); font-size: 1rem; } .live-grid b.off { color: var(--bad); font-size: 1rem; }
.mine { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.qpos { font-size: 1.05rem; margin-bottom: 10px; } .qpos b { font-size: 1.5em; color: var(--acc); }
.clock-wrap { text-align: center; background: #070a12; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.clock { font-size: clamp(2.6rem, 8vw, 3.8rem); font-weight: 900; font-variant-numeric: tabular-nums; color: var(--acc); text-shadow: 0 0 20px #22d3ee66; }
.turn { text-align: center; } .turn h3 { color: var(--acc2); font-size: 1.6rem; margin: 6px 0 14px; }
.warn-box { background: #2a2410; border: 1px solid #5a4a14; color: #fde68a; padding: 12px; border-radius: 10px; margin: 0; }
.alarm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); }

/* chat */
.chat { display: flex; flex-direction: column; }
.chat-list { height: 290px; overflow-y: auto; background: #070a12; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.msg { display: flex; gap: 8px; align-items: baseline; font-size: .93em; line-height: 1.35; }
.msg .who { color: var(--acc2); font-weight: 700; white-space: nowrap; }
.msg .txt { flex: 1; word-break: break-word; }
.msg time { color: var(--muted); font-size: .75em; }
.msg .del { padding: 0 6px; border: 0; background: transparent; color: var(--muted); }
.chat-form { display: flex; gap: 8px; margin: 10px 0 6px; } .chat-form input { flex: 1; min-width: 0; }

/* controlos e pagamento */
.ctrls { display: flex; flex-direction: column; gap: 8px; }
.ctrl { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #070a1288; }
label.ctrl { cursor: pointer; } .ctrl.sel { border-color: var(--acc); background: #22d3ee14; }
.ctrl input { display: none; } .ctrl small { display: block; color: var(--muted); }
.ico { width: 60px; height: 40px; flex: none; fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.payinfo { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; } .payinfo small { display: block; color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.pack { display: flex; flex-direction: column; gap: 4px; padding: 14px 6px; border-radius: 12px; text-align: center; }
.pack:hover { border-color: var(--acc); box-shadow: 0 0 18px #22d3ee33; }
.pack span { color: var(--acc2); font-weight: 800; }
.guarantee { background: #0b2a1f; border: 1px solid #14532d; color: #bbf7d0; padding: 10px 12px; border-radius: 10px; font-size: .9em; margin: 8px 0 0; }

/* conta */
.acc-bal { display: flex; justify-content: space-between; align-items: center; background: #070a12; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.acc-bal b { font-size: 1.6rem; color: var(--acc); font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; } .grow { flex: 1; }
.hist { display: flex; flex-direction: column; } .hrow { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .9em; }
.hrow time { color: var(--muted); font-size: .85em; }

/* formulários */
label { display: flex; flex-direction: column; gap: 6px; font-size: .9em; color: var(--muted); }
input { background: #070a12; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--text); }
input:focus { outline: 2px solid var(--acc); border-color: transparent; }
#authForm { display: flex; flex-direction: column; gap: 14px; }
.err { color: #fca5a5; min-height: 1em; margin: 0; }
.sec { margin-top: 34px; } .sec > h2 { font-size: 1.4rem; margin: 0 0 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #041018; font-weight: 900; }
.step h3 { color: var(--text); font-size: 1.1rem; margin: 12px 0 6px; } .step p { color: var(--muted); margin: 0; }
.auth-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; scroll-margin-top: 80px; }
.req { color: var(--muted); padding-left: 20px; margin: 0 0 10px; } .req li { margin: 5px 0; }
.disclaimer { color: var(--muted); font-size: .8em; text-align: center; margin-top: 30px; }
.banner { width: 100%; margin-top: 14px; background: #2a2410; border-color: #5a4a14; color: #fde68a; }
.settings { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); } .settings h3 { margin: 0; }
.adminq { padding-left: 20px; color: var(--muted); }

/* modal */
.modal { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { position: relative; background: var(--bg2); border: 1px solid #22d3ee55; border-radius: var(--r); padding: 24px; width: min(480px, 100%); max-height: 92vh; overflow: auto; }
.modal-box h2 { margin-top: 0; font-size: 1.2rem; padding-right: 30px; }
.x { position: absolute; top: 12px; right: 12px; background: transparent; border: 0; font-size: 1.2rem; }
#sumup-card { background: #fff; border-radius: 12px; padding: 6px; color: #111; min-height: 60px; }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(520px, 92vw); }
.toast { background: var(--bg2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 30px #000a; }
.toast.good { border-color: var(--good); } .toast.bad { border-color: var(--bad); }

/* jogador */
.player { position: fixed; inset: 0; background: #000; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(#000a, transparent); z-index: 5; flex-wrap: wrap; }
.small-clock { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; background: #000a; padding: 2px 10px; border-radius: 8px; }
.small-clock.warn { color: var(--acc2); animation: pulse 1s infinite; }
.hud-msg { flex: 1; text-align: center; color: #fff; text-shadow: 0 1px 3px #000; font-size: .95em; }
.hud-r { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.hud select, .hud button { background: #000a; border-color: #fff3; }
.help { position: absolute; right: 12px; top: 56px; background: #000d; border: 1px solid #fff2; border-radius: 12px; padding: 12px; z-index: 6; font-size: .9em; }
.help td { padding: 3px 8px; }
kbd { background: #222; border: 1px solid #444; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.rotate-hint { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  .player.touch .rotate-hint { display: grid; place-items: center; position: absolute; inset: 0; background: #000c; z-index: 20; font-size: 1.3rem; text-align: center; padding: 20px; }
}

/* controlos de toque */
.touchpad-ui { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.touchpad-ui > * { pointer-events: auto; }
.touchpad-ui button { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 50%; touch-action: none; font-weight: 700; }
.touchpad-ui button.on { background: rgba(20,184,166,.55); }
.t-stick { position: absolute; left: 4vw; bottom: 8vh; width: 32vmin; height: 32vmin; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.2); touch-action: none; }
.t-knob { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border-radius: 50%; background: rgba(255,255,255,.35); pointer-events: none; }
.t-look { position: absolute; left: 40%; right: 30%; top: 15%; bottom: 0; touch-action: none; }
.t-btns { position: absolute; right: 4vw; bottom: 10vh; width: 30vmin; height: 30vmin; }
.t-b { position: absolute; width: 10vmin; height: 10vmin; font-size: 4.5vmin; }
.t-tri { left: 10vmin; top: 0; } .t-sq { left: 0; top: 10vmin; } .t-ci { right: 0; top: 10vmin; } .t-x { left: 10vmin; bottom: 0; }
.t-shoulder { position: absolute; top: 14vh; display: flex; gap: 2vmin; }
.t-shoulder button { border-radius: 12px; width: 13vmin; height: 8vmin; font-size: 3.5vmin; }
.t-sl { left: 3vw; } .t-sr { right: 3vw; flex-direction: row-reverse; }
.t-dpad { position: absolute; left: 36vmin; bottom: 4vh; width: 21vmin; height: 21vmin; }
.t-dpad button { position: absolute; width: 7vmin; height: 7vmin; border-radius: 8px; font-size: 3vmin; }
.t-dpad button:nth-child(1) { left: 7vmin; top: 0; } .t-dpad button:nth-child(2) { left: 0; top: 7vmin; }
.t-dpad button:nth-child(3) { right: 0; top: 7vmin; } .t-dpad button:nth-child(4) { left: 7vmin; bottom: 0; }
.t-mid { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); display: flex; gap: 3vmin; }
.t-mid button { border-radius: 10px; width: 10vmin; height: 7vmin; font-size: 3vmin; }


.state-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #000c; border: 1px solid #22d3ee55;
  padding: 16px 22px; border-radius: 14px; z-index: 6; text-align: center; max-width: 80vw; font-size: 1.05rem; }

@media (max-width: 900px) {
  .menu-grid, .auth-sec, .steps { grid-template-columns: 1fr; }
  .nav { display: none; }
  .hero3 { min-height: 380px; }
}
@media (max-width: 520px) { .word { font-size: 1.1rem; } .credits { padding: 6px 9px; } .hero-packs { width: 100%; } .hero-packs .pack { flex: 1; min-width: 0; } }

.ping { font-size: .85em; background: #000a; padding: 3px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.ping.good { color: var(--good); } .ping.mid { color: var(--acc2); } .ping.bad { color: var(--bad); }

#modeBtn.car { border-color: var(--acc2); color: var(--acc2); }
.help h4 { margin: 8px 0 4px; color: var(--acc); }
.help { max-height: 80vh; overflow: auto; }
