.hidden { display: none !important; }
body.arcade { background: radial-gradient(1200px 700px at 15% -10%, rgba(139,92,246,.3), transparent 60%), radial-gradient(900px 600px at 95% 20%, rgba(34,211,238,.14), transparent 60%), var(--bg); min-height: 100vh; }
body.arcade #bg { display: none; }
.a-wrap { max-width: 1280px; margin: 0 auto; padding: 120px 20px 60px; }
.lobby-hero { max-width: 760px; margin-bottom: 34px; }
.lobby-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); margin: 18px 0; }
.lobby-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lobby-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.panel { padding: 24px; display: grid; gap: 14px; align-content: start; }
.panel h3 { margin-top: 4px; }
label { display: grid; gap: 6px; font-size: .8rem; color: var(--muted); }
input[type=text], input:not([type]), input#nick, input#codeIn { background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text); padding: 13px 14px; border-radius: 12px; font: inherit; width: 100%; }
input:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 4px rgba(34,211,238,.15); }
.chk { display: flex; gap: 10px; align-items: center; font-size: .82rem; }
.gpick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gopt { text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); display: grid; gap: 4px; transition: .25s; }
.gopt .ico { font-size: 1.8rem; }
.gopt small { color: var(--muted); font-size: .72rem; }
.gopt:hover { transform: translateY(-3px); }
.gopt.sel { border-color: var(--cyan); background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(168,85,247,.2)); box-shadow: 0 0 28px rgba(34,211,238,.2); }
.rooms { display: grid; gap: 8px; }
.roomrow { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); text-align: left; }
.roomrow:hover { border-color: var(--cyan); }
.roomrow b { color: var(--cyan); letter-spacing: .2em; }
.small { font-size: .8rem; } .lnk { color: var(--cyan); text-decoration: underline; }
.err { color: #fb7185; min-height: 1.4em; margin-top: 10px; }
.btn.sm { padding: 9px 16px; font-size: .85rem; border-radius: 10px; }

.play { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.stage { padding: 10px; position: relative; }
#gc { width: 100%; height: auto; display: block; border-radius: 14px; background: #05030c; box-shadow: inset 0 0 60px rgba(139,92,246,.25); }
.stage:fullscreen { display: grid; place-items: center; background: #000; border-radius: 0; }
.stage:fullscreen #gc { max-height: 100vh; width: auto; max-width: 100vw; }
.banner { position: absolute; left: 50%; top: 18%; transform: translate(-50%, -20px); padding: 14px 28px; border-radius: 999px; background: rgba(10,7,22,.9); border: 1px solid var(--cyan); font-weight: 700; opacity: 0; transition: .35s; pointer-events: none; box-shadow: var(--glow); white-space: nowrap; }
.banner.show { opacity: 1; transform: translate(-50%, 0); }
.side { display: grid; gap: 16px; }
.roomcard { justify-items: center; text-align: center; }
.rcode { font-size: 2.6rem; font-weight: 800; letter-spacing: .3em; padding-left: .3em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#qr { width: 132px; height: 132px; border-radius: 10px; }
.board { list-style: none; display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: .9rem; }
.board li.me { outline: 1px solid var(--cyan); }
.board i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.actions { display: flex; gap: 10px; } .actions .btn { flex: 1; justify-content: center; }
body.screenmode .touch-ctl { display: none !important; }

.touch-ctl { display: none; grid-column: 1 / -1; justify-content: space-between; align-items: center; padding: 10px 6px; }
@media (pointer: coarse) { .touch-ctl { display: flex; } }
.dp { display: grid; grid-template: ". u ." "l . r" ". d ." / 64px 64px 64px; grid-template-rows: repeat(3, 64px); gap: 6px; }
.dp button[data-k=u] { grid-area: u; } .dp button[data-k=l] { grid-area: l; } .dp button[data-k=r] { grid-area: r; } .dp button[data-k=d] { grid-area: d; }
.dp button, .fire { border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 1.3rem; touch-action: none; user-select: none; -webkit-user-select: none; }
.fire { width: 110px; height: 110px; border-radius: 50%; font-weight: 800; letter-spacing: .1em; background: radial-gradient(circle, rgba(232,121,249,.5), rgba(139,92,246,.25)); border-color: var(--magenta); }
.dp button.down, .fire.down { background: var(--violet); box-shadow: var(--glow); transform: scale(.95); }

/* controle do celular */
body.padpage { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% 0, rgba(139,92,246,.35), transparent 70%), var(--bg); overscroll-behavior: none; touch-action: none; }
.padjoin { padding: 28px; display: grid; gap: 14px; width: min(380px, 92vw); text-align: center; justify-items: center; }
.padjoin input { text-align: center; }
.padctl { width: 100%; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr; padding: env(safe-area-inset-top) 18px 14px; }
.padtop { display: flex; justify-content: space-between; padding: 12px 0; }
.padbody { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.dp.big { grid-template-columns: repeat(3, min(22vw, 22vh)); grid-template-rows: repeat(3, min(22vw, 22vh)); }
.fire.big { width: min(36vw, 40vh); height: min(36vw, 40vh); font-size: 1.4rem; }

@media (max-width: 980px) { .play, .lobby-grid { grid-template-columns: 1fr; } .gpick { grid-template-columns: 1fr; } .side { grid-template-columns: 1fr 1fr; } .actions { grid-column: 1/-1; } }
@media (max-width: 560px) { .side { grid-template-columns: 1fr; } .a-wrap { padding-top: 100px; } }
.result { position: fixed; right: 18px; bottom: 18px; z-index: 70; padding: 18px 20px; width: min(320px, 92vw); animation: rin .4s; }
.result ol { list-style: none; display: grid; gap: 6px; margin: 10px 0; }
.result li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.05); }
.result li.me { outline: 1px solid var(--cyan); }
@keyframes rin { from { transform: translateY(20px); opacity: 0; } }
.audiobar { position: fixed; left: 14px; bottom: 14px; z-index: 95; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(10,7,22,.85); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.audiobar button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.06); font-size: 1rem; }
.audiobar input[type=range] { width: 70px; accent-color: #a855f7; }
@media (max-width: 760px) { .audiobar { bottom: 74px; } .audiobar input { display: none; } }

.abtns { display: flex; gap: 14px; align-items: center; } .fire.sec { width: 90px; height: 90px; background: radial-gradient(circle, rgba(34,211,238,.45), rgba(14,116,144,.25)); border-color: var(--cyan); } .abtns .fire.big { width: min(26vw, 32vh); height: min(26vw, 32vh); } .abtns .fire.sec { width: min(22vw, 27vh); height: min(22vw, 27vh); }
.touch-ctl .btns { display: flex; gap: 12px; align-items: center; }
