:root { color-scheme: dark; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #fff; }
#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
#screen { max-width: 100vw; max-height: 100vh; width: 100vw; height: auto; aspect-ratio: 1280 / 658; touch-action: none;
  display: block; image-rendering: auto; }
@media (min-aspect-ratio: 1280/658) { #screen { width: auto; height: 100vh; } }

.panel { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 20px; background: radial-gradient(ellipse at center, #1c2b6b 0%, #0a0f2c 70%, #000 100%); z-index: 10; text-align: center; }
.panel[hidden], [hidden] { display: none !important; }
.logo { font-size: clamp(34px, 8vw, 72px); font-weight: 900; letter-spacing: .06em; color: #ffd84a; text-shadow: 0 3px 0 #b8860b, 0 0 22px rgba(255,216,74,.5); }
#bar { width: min(360px, 80vw); height: 10px; border-radius: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
#bar i { display: block; height: 100%; width: 0%; background: #ffd84a; transition: width .15s; }
#loadtxt { margin-top: 8px; opacity: .7; font-size: 14px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 14px 22px; color: #1a1a1a; background: #ffd84a; font-weight: 700; }
button.big { font-size: 18px; min-width: min(320px, 80vw); box-shadow: 0 4px 0 #b8860b; }
button.big:active { transform: translateY(2px); box-shadow: 0 2px 0 #b8860b; }
button.alt { background: #4cd3ff; box-shadow: 0 4px 0 #1a8ab0; }
button.link { background: none; color: #9fb4ff; font-weight: 500; padding: 8px; }
button:disabled { opacity: .45; cursor: default; }
input[type=text], input:not([type]), input#nick, input#code { font: inherit; font-size: 18px; padding: 12px 14px; border-radius: 10px; border: 2px solid #3a4a99;
  background: #0d1440; color: #fff; text-align: center; width: min(320px, 80vw); text-transform: none; }
input#code { width: 120px; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; opacity: .95; align-items: center; }
.row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.row.opts { gap: 18px; }
.row.opts label { flex-direction: row; font-size: 16px; gap: 8px; }
.hint { max-width: 420px; font-size: 13px; opacity: .7; margin: 0; }
.msg { min-height: 20px; color: #ff9b9b; font-size: 14px; }
.lobby-code { font-size: 22px; } .lobby-code b { color: #ffd84a; letter-spacing: .25em; font-size: 34px; }
#seats { list-style: none; padding: 0; margin: 6px 0; width: min(360px, 90vw); display: flex; flex-direction: column; gap: 8px; }
#seats li { padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; justify-content: space-between; }
#seats li.me { outline: 2px solid #ffd84a; }
#seats li .tag { opacity: .6; font-size: 13px; }

#topbar { position: fixed; top: 6px; right: 6px; z-index: 5; display: flex; gap: 6px; opacity: .55; }
#topbar button { padding: 6px 10px; font-size: 16px; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff; box-shadow: none; }
#topbar:hover { opacity: 1; }
#toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 16px;
  border-radius: 10px; z-index: 20; max-width: 90vw; font-size: 15px; }
#rotate { display: none; position: fixed; inset: 0; z-index: 30; background: #0a0f2c; align-items: center; justify-content: center;
  font-size: 22px; text-align: center; padding: 30px; }
@media (orientation: portrait) and (max-width: 700px) { #rotate { display: flex; } }

#menu, #online, #lobby, #loading { display: flex; flex-direction: column; align-items: center; gap: 14px; }
