:root { --bg: #0b0d17; --panel: #151a2c; --line: #262d48; --text: #e8ecff; --dim: #8b93b5; --accent: #4cc9f0; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(1200px 700px at 50% -10%, #1b2250 0%, var(--bg) 60%) fixed; color: var(--text); font: 15px/1.4 system-ui, "Segoe UI", sans-serif; }
#app { min-height: 100vh; padding: 28px 16px 60px; position: relative; }
.back { position: fixed; left: 14px; top: 12px; color: var(--dim); text-decoration: none; font-weight: 600; z-index: 5; }
.back:hover { color: var(--text); }
.conn { position: fixed; top: 10px; right: 14px; background: #3a1d28; color: #ffb4c0; padding: 4px 10px; border-radius: 8px; font-size: 13px; z-index: 5; }
.hidden { display: none !important; }
.view { display: none; } .view.active { display: block; }
.title { text-align: center; font-size: clamp(36px, 8vw, 64px); margin: 30px 0 4px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 55%, transparent); }
.title.small { font-size: 34px; }
.tagline { text-align: center; color: var(--dim); margin: 0 0 26px; }
.cards { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; flex: 1 1 340px; min-width: 0; }
.card.narrow { max-width: 440px; margin: 0 auto; }
.card h2 { margin: 0 0 12px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
label { display: block; color: var(--dim); font-size: 13px; margin-bottom: 12px; }
input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #0d1122; color: var(--text); font-size: 16px; }
.btn { background: #232a47; color: var(--text); border: 1px solid var(--line); padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; }
.btn:hover:not(:disabled) { background: #2d3659; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.big { display: block; width: 100%; padding: 12px; font-size: 16px; margin-bottom: 10px; }
.btn.primary { background: var(--accent); color: #07101a; border-color: transparent; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); background: var(--accent); }
.row { display: flex; gap: 10px; } .row .btn { flex: 1; } .row .btn.big { margin-bottom: 0; }
.hint { color: var(--dim); font-size: 13px; }
.rooms { display: flex; flex-direction: column; gap: 8px; }
.room { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: #0f1426; border: 1px solid var(--line); border-radius: 10px; }
.code { margin-bottom: 12px; } .code b { font-size: 22px; letter-spacing: .2em; color: var(--accent); }
.players, .standings { list-style: none; margin: 0 0 16px; padding: 0; }
.players li, .standings li { padding: 9px 12px; background: #0f1426; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.players li.me, .standings li.me { border-color: var(--accent); }
.tag { font-size: 11px; background: #2a3358; padding: 1px 7px; border-radius: 6px; margin-left: 6px; color: var(--dim); }
.stage { display: flex; justify-content: center; }
.stage canvas { max-width: 100%; max-height: calc(100vh - 70px); border-radius: 10px; border: 1px solid var(--line); background: #070a14; touch-action: none; }
.over { position: fixed; inset: 0; background: rgba(5,7,15,.78); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.quit { position: fixed; right: 14px; bottom: 12px; opacity: .7; }
.mute { position: fixed; right: 14px; top: 10px; z-index: 6; padding: 4px 9px; }
.conn:not(.hidden) ~ .mute { top: 44px; }
.row2 { display: flex; gap: 6px; }
.watching { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); background: #2a3358; color: var(--text); padding: 4px 12px; border-radius: 999px; font-size: 13px; z-index: 6; }
