html, body { margin: 0; height: 100%; background: #000; color: #d8d8e0; font-family: system-ui, "Segoe UI", sans-serif; overflow: hidden; }
canvas#screen { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; background: #000; }
.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, 92vw); max-height: 92vh; overflow: auto;
  background: rgba(14, 14, 24, .94); border: 1px solid #3a3a5a; border-radius: 14px; padding: 22px 26px; text-align: center; box-shadow: 0 10px 50px #000c; }
.panel h1 { margin: 0 0 14px; letter-spacing: 6px; color: #f8c83c; font-size: 34px; text-shadow: 0 0 18px #f8803c66; }
.panel[hidden], [hidden] { display: none !important; }
.row { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.btn { background: #26264a; color: #eee; border: 1px solid #4a4a80; border-radius: 8px; padding: 10px 18px; font-size: 15px; cursor: pointer; display: inline-block; }
.btn:hover { background: #34346a; }
.btn.primary { background: #c8401c; border-color: #f0703c; font-weight: 600; }
.btn.primary:hover { background: #e0502c; }
.btn.danger { background: #5a1c24; border-color: #a03040; }
.btn.small { padding: 6px 12px; font-size: 13px; }
input[type=text], #roomCode { background: #0b0b14; color: #fff; border: 1px solid #4a4a80; border-radius: 8px; padding: 10px; font-size: 18px; width: 9em; text-align: center; letter-spacing: 4px; text-transform: uppercase; }
.msg { min-height: 1.3em; color: #f8b060; margin: 6px 0; }
.small { font-size: 12px; color: #9a9ab0; line-height: 1.5; }
.code { font-size: 30px; letter-spacing: 8px; color: #7fe0ff; user-select: all; }
a { color: #7fe0ff; }
hr { border: 0; border-top: 1px solid #2a2a44; margin: 14px 0; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; text-align: left; font-size: 14px; }
.opts input[type=range] { width: 90px; vertical-align: middle; }
#hostBox, #joinBox { text-align: left; }
textarea { width: 100%; box-sizing: border-box; background: #0b0b14; color: #9fe; border: 1px solid #4a4a80; border-radius: 8px; padding: 8px; font: 11px/1.3 ui-monospace, Consolas, monospace; resize: none; word-break: break-all; }
#hud { position: fixed; left: 8px; top: 6px; font: 12px/1.4 ui-monospace, Consolas, monospace; color: #bfe; text-shadow: 0 1px 2px #000, 0 0 4px #000; pointer-events: none; white-space: pre; }
#toast { position: fixed; left: 50%; bottom: 8%; transform: translateX(-50%); background: #000c; border: 1px solid #555; padding: 10px 18px; border-radius: 10px; font-size: 15px; pointer-events: none; }
