* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050507; color: #eef1f6; font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
body.playing #c { cursor: none; }
.hidden { display: none !important; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 35%, rgba(40,10,40,.35), rgba(3,3,6,.75)); z-index: 10; padding: 12px; }
.panel { background: rgba(10,10,16,.86); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 26px 32px; width: 520px; max-width: 100%; box-shadow: 0 20px 70px rgba(0,0,0,.7); backdrop-filter: blur(8px); text-align: center; }
h1 { margin: 0; font: italic 900 46px/0.95 "Arial Black", Impact, sans-serif; color: #fff; text-shadow: 0 0 18px #ff2fa8, 0 0 40px rgba(255,47,168,.5); letter-spacing: 1px; }
h1 span { font-size: 54px; color: #ffe3f3; }
h2 { margin: 0 0 14px; font-weight: 800; }
h3 { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #9aa3b5; }
.tag { color: #9aa3b5; margin: 12px 0 18px; }
.btns { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 18px; }
button { font-family: inherit; font-size: 15px; font-weight: 600; color: #fff; background: #1d2030; border: 1px solid #343a52; border-radius: 10px; padding: 10px 22px; cursor: pointer; min-width: 200px; transition: background .15s, transform .08s; }
button:hover { background: #292e45; }
button:active { transform: scale(.97); }
button.big { min-width: 300px; padding: 13px 26px; font-size: 17px; background: linear-gradient(180deg, #ff3550, #c3101e); border-color: #ff6070; box-shadow: 0 4px 18px rgba(255,40,60,.35); }
button.big.alt { background: linear-gradient(180deg, #2f7cf6, #1b50c4); border-color: #5b9bff; box-shadow: 0 4px 18px rgba(47,124,246,.35); }
.row { display: flex; gap: 22px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.small { font-size: 13px; color: #9aa3b5; }
label { display: inline-flex; gap: 8px; align-items: center; }
select, #code { background: #0c0d14; color: #fff; border: 1px solid #343a52; border-radius: 8px; padding: 6px 10px; font: inherit; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.seg button { min-width: 0; padding: 8px 14px; font-size: 14px; }
.seg button.on { background: #ff2a44; border-color: #ff6070; }
.join { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
#code { width: 130px; text-transform: uppercase; text-align: center; font-size: 22px; letter-spacing: 6px; }
.join button { min-width: 120px; }
.err { color: #ff7b8b; min-height: 1.2em; }
.code { font: 900 52px "Courier New", monospace; letter-spacing: 10px; color: #ffd400; margin: 4px 0 6px; text-shadow: 0 0 16px rgba(255,212,0,.4); }
.link { word-break: break-all; }
ul.help { text-align: left; line-height: 1.5; padding-left: 20px; }
kbd { background: #222638; border: 1px solid #3a4160; border-bottom-width: 3px; border-radius: 5px; padding: 0 6px; font-size: 13px; }
table.stats { margin: 8px auto; border-collapse: collapse; }
table.stats td { padding: 5px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
table.stats td:nth-child(2) { color: #9aa3b5; font-size: 13px; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#score { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(6,6,10,.72); padding: 6px 10px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.5); white-space: nowrap; }
#score .p { display: flex; align-items: center; gap: 10px; font-weight: 800; }
#score .p i { font: normal 900 28px "Courier New", monospace; min-width: 44px; text-align: center; border-radius: 6px; padding: 0 6px; }
#score .red i { background: #c3101e; text-shadow: 0 0 10px #ff6070; }
#score .blue i { background: #1b50c4; text-shadow: 0 0 10px #6aa0ff; }
#score .to { font-size: 11px; color: #9aa3b5; text-transform: uppercase; letter-spacing: 1px; }
#banner { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); text-align: center; animation: pop .3s ease-out; }
#bmsg { font: italic 900 72px "Arial Black", Impact, sans-serif; color: #fff; text-shadow: 0 0 20px rgba(255,47,168,.9), 0 4px 0 rgba(0,0,0,.4); white-space: nowrap; }
#bmsg.blue { text-shadow: 0 0 20px rgba(60,140,255,.9), 0 4px 0 rgba(0,0,0,.4); }
#bsub { font-size: 18px; font-weight: 700; margin-top: 4px; color: #ffe; text-shadow: 0 2px 6px #000; }
@keyframes pop { from { transform: translateX(-50%) scale(.5); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
#speed { position: absolute; bottom: 20px; left: 20px; font-size: 13px; color: #c9cfdc; background: rgba(6,6,10,.6); padding: 5px 10px; border-radius: 8px; }
#speed:empty { display: none; }
#ping { position: absolute; top: 18px; right: 20px; font-size: 12px; color: #9aa3b5; }
#help { position: absolute; bottom: 20px; right: 20px; font-size: 12px; color: rgba(255,255,255,.5); }
@media (max-width: 700px) { #help { display: none; } #bmsg { font-size: 48px; } h1 { font-size: 34px; } h1 span { font-size: 40px; } button.big { min-width: 240px; } }
