:root { --bg: #0d0f12; --card: #171a20; --line: #2a2f38; --text: #e8e6e3; --muted: #9aa0a8; --accent: #e8552d; --ok: #57c26b; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
canvas#canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; background: #000; visibility: hidden; }
body.playing canvas#canvas { visibility: visible; }
body.playing { overflow: hidden; }
main#gate, .overlay { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; position: relative; z-index: 2; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); }
[hidden] { display: none !important; }
.card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: .5px; color: var(--accent); }
h2 { margin: 0 0 8px; }
.sub { margin: 0 0 16px; color: var(--muted); }
.server { padding: 10px 12px; border-radius: 8px; background: #0f1216; border: 1px solid var(--line); margin-bottom: 8px; }
.players { margin: 0 0 16px; padding-left: 22px; color: var(--muted); font-size: 13px; columns: 2; }
label { display: block; margin: 8px 0 6px; font-weight: 600; }
input, select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: #0f1216; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.hint { color: var(--muted); font-size: 13px; min-height: 18px; margin-top: 4px; }
.progress { height: 6px; background: #0f1216; border-radius: 3px; margin-top: 14px; overflow: hidden; }
#bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
button { margin-top: 14px; width: 100%; padding: 12px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 600 16px system-ui, sans-serif; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.secondary { background: #2a2f38; }
.msg { color: #ff8a73; margin-top: 10px; min-height: 20px; }
.keys { margin-top: 16px; color: var(--muted); }
.keys summary { cursor: pointer; color: var(--text); }
.keys table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.keys td { padding: 3px 0; vertical-align: top; }
.keys td:first-child { white-space: nowrap; padding-right: 12px; color: var(--text); }
.foot { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
a { color: #f0a37f; }
/* админка */
.admin { max-width: 720px; }
.row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.row button { margin-top: 0; flex: 0 0 auto; width: auto; padding: 10px 16px; }
section { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list td, table.list th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.list button { margin: 0; width: auto; padding: 4px 10px; font-size: 13px; }
pre#out { background: #0f1216; border: 1px solid var(--line); border-radius: 8px; padding: 10px; white-space: pre-wrap; max-height: 260px; overflow: auto; font-size: 12px; min-height: 40px; }
