/* Экран ведущего «Кибергонки»: трёхмерная сцена на весь экран, поверх — лобби, итоги и настройки. */
:root { --bg: #070a10; --panel: rgba(10, 15, 24, .86); --line: rgba(120, 200, 255, .22); --ink: #eaf2ff; --muted: #9db0c7; --acc: #2ee6ff; --hot: #ff8a1e; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow: hidden; }
#stage, #hud { position: fixed; inset: 0; }
#stage canvas { width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; z-index: 2; }
.screen { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; padding: 16px 20px 20px; gap: 14px; overflow: auto; background: linear-gradient(180deg, rgba(7, 10, 16, .72), rgba(7, 10, 16, .3) 30%, rgba(7, 10, 16, .78)); }
.screen[hidden], .modal[hidden], #toast[hidden], #unlock[hidden] { display: none; }
.screen.center { align-items: center; justify-content: center; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { font-size: 26px; font-weight: 900; letter-spacing: .02em; color: var(--acc); text-decoration: none; text-shadow: 0 0 18px rgba(46, 230, 255, .6); }
.tag { color: var(--muted); }
.spacer { flex: 1; }
.chip { background: rgba(255, 255, 255, .08); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font: inherit; cursor: pointer; text-decoration: none; }
.chip:hover { background: rgba(255, 255, 255, .16); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; backdrop-filter: blur(6px); }
.panel.wide { width: min(980px, 94vw); }
h2 { margin: 0 0 10px; font-size: 19px; }
h2 small { color: var(--muted); font-weight: 500; margin-left: 6px; }
h3 { margin: 12px 0 6px; font-size: 16px; color: var(--acc); }
.muted { color: var(--muted); font-size: 14px; }
kbd { background: #1b2433; border: 1px solid #3a4a62; border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; font: 600 13px ui-monospace, monospace; color: #fff; }
.lobby-grid { flex: 1; display: grid; grid-template-columns: 270px 1fr 330px; gap: 14px; min-height: 0; }
.join canvas { width: 180px; height: 180px; border-radius: 10px; background: #fff; display: block; margin: 0 auto 8px; }
.join .code { text-align: center; font-size: 15px; }
.join .code b { font: 900 30px ui-monospace, monospace; letter-spacing: .12em; color: var(--acc); margin-left: 6px; }
.join .link { text-align: center; font: 600 14px ui-monospace, monospace; word-break: break-all; margin: 4px 0; }
.join h2 { margin-top: 12px; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slot { border: 2px dashed rgba(255, 255, 255, .2); border-radius: 14px; padding: 12px; min-height: 132px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.slot.on { border-style: solid; border-color: var(--pc); background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 22%, transparent), rgba(255, 255, 255, .03)); }
.slot .who { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.slot .n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #05070c; font-weight: 900; flex: none; }
.slot .mark { color: var(--pc); }
.slot .dev { color: var(--muted); font-size: 14px; }
.slot .state { font-weight: 700; }
.slot .state.ok { color: #3ddc84; }
.slot .state.wait { color: #ffd23c; }
.slot .state.bad { color: #ff5a6a; }
.slot .acts { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.slot .acts button { font: inherit; font-size: 13px; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--ink); cursor: pointer; }
.slot .acts button.hot { background: var(--hot); color: #14100a; border-color: transparent; }
.slot.empty { align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.biomes { display: grid; gap: 8px; }
.biome { text-align: left; border: 2px solid var(--line); border-radius: 12px; padding: 9px 12px; background: rgba(255, 255, 255, .05); color: var(--ink); font: inherit; cursor: pointer; }
.biome b { display: block; font-size: 17px; }
.biome span { color: var(--muted); font-size: 13px; }
.biome.sel { border-color: var(--acc); background: rgba(46, 230, 255, .14); box-shadow: 0 0 18px rgba(46, 230, 255, .25); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.row.end { justify-content: flex-end; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; padding: 6px 12px; background: transparent; color: var(--ink); border: 0; cursor: pointer; }
.seg button.sel { background: var(--acc); color: #05070c; font-weight: 800; }
.btn { font: inherit; font-weight: 800; padding: 10px 18px; border-radius: 12px; border: 0; background: var(--acc); color: #05070c; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.big { width: 100%; font-size: 22px; padding: 14px; background: linear-gradient(90deg, #ff8a1e, #ffd23c); }
.results .btn.big, .row.end .btn.big { width: auto; }
.btn:disabled { opacity: .4; cursor: default; filter: grayscale(.6); }
.btn.ghost { background: rgba(255, 255, 255, .1); color: var(--ink); border: 1px solid var(--line); }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(4, 6, 10, .7); padding: 16px; overflow: auto; }
.modal .panel { min-width: min(460px, 94vw); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.keys td { padding: 3px 8px 3px 0; vertical-align: top; font-size: 14px; }
.c-en { color: #ffd23c; } .c-hp { color: #3ddc84; } .c-sh { color: #4cc3ff; } .c-st { color: #c77dff; } .c-pad { color: #ffb347; }
#resTable { width: 100%; border-collapse: collapse; font-size: 18px; }
#resTable th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 10px; }
#resTable td { padding: 9px 10px; border-top: 1px solid var(--line); }
#resTable .pl { font: 900 28px system-ui; width: 54px; }
#resTable .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #05070c; font-weight: 900; margin-right: 8px; }
#resTable tr.dnf td { opacity: .75; }
#resTable .dnf-tag { color: #ff5a6a; font-weight: 800; }
.wiz-step { font-size: 24px; font-weight: 800; margin: 18px 0; color: var(--hot); }
.wiz-bar { height: 8px; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; }
.wiz-bar div { height: 100%; width: 0; background: var(--acc); transition: width .2s; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 30; background: #0e141d; border: 1px solid var(--acc); border-radius: 12px; padding: 10px 18px; font-weight: 700; }
#unlock { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 30; background: rgba(255, 138, 30, .95); color: #14100a; border-radius: 99px; padding: 6px 16px; font-weight: 700; font-size: 14px; }
@media (max-width: 1100px) { .lobby-grid { grid-template-columns: 1fr; } .screen { overflow: auto; } }
