* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: transparent; color: #f4efe4; font-family: "Segoe UI", Arial, sans-serif; }
body { display: grid; }
#app {
  width: 1920px; height: 1080px; display: grid; grid-template-columns: 1fr 460px;
  grid-template-rows: 1fr 150px; gap: 16px; padding: 16px; position: relative;
  transform-origin: top left;
}
#center { grid-column: 1; grid-row: 1; }
#lobby { grid-column: 2; grid-row: 1; }
#bar { grid-column: 1 / -1; grid-row: 2; }
#lobby, #center, #bar {
  background: rgba(10, 12, 18, .82); border: 4px solid rgba(255, 255, 255, .18); border-radius: 22px;
}
#lobby { padding: 22px 22px 16px; display: flex; flex-direction: column; min-height: 0; }
#lobby header { display: flex; justify-content: space-between; align-items: baseline; font-size: 36px; font-weight: 800; }
#lobby-list { list-style: none; margin: 12px 0 0; padding: 0; overflow: hidden; }
#lobby-list li {
  display: flex; justify-content: space-between; gap: 12px; font-size: 32px; font-weight: 800;
  padding: 6px 0; border-bottom: 2px solid rgba(255,255,255,.08);
}
#lobby-list em { font-style: normal; color: #f5c518; }
#lobby-list .dead { opacity: .45; text-decoration: line-through; }
#lobby-more { margin: 10px 0 0; font-size: 28px; font-weight: 800; color: #f5c518; }
#center { position: relative; overflow: hidden; display: grid; }
#scene { padding: 36px 42px; }
#scene canvas { width: 100%; height: 100%; display: block; }
#result {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center;
  background: rgba(8, 10, 16, .55); text-align: center; pointer-events: none;
}
#result strong { font-size: 92px; line-height: .95; display: block; }
#result span { display: block; margin-top: 10px; font-size: 42px; font-weight: 800; color: #f5c518; }
#result.pop strong { animation: pop .45s ease; }
#bar { display: grid; grid-template-columns: 320px 140px 1fr; align-items: center; padding: 0 28px; gap: 16px; }
#game-name, #timer { font-size: 36px; font-weight: 800; }
#timer { color: #f5c518; }
#hint { margin: 0; font-size: 34px; font-weight: 800; }
#dot { position: absolute; top: 36px; right: 36px; width: 22px; height: 22px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 4px rgba(0,0,0,.35); }
#dot[data-state="on"] { background: #3dd68c; }
#dot[data-state="sim"] { background: #f5c518; }
#dot[data-state="connecting"] { background: #f08a24; }
.lead { font-size: 64px; font-weight: 800; line-height: 1.05; margin: 0 0 16px; }
.kicker { margin: 0 0 8px; letter-spacing: .14em; text-transform: uppercase; color: #f5c518; font-weight: 800; font-size: 28px; }
.alive, .choices, p { font-size: 32px; font-weight: 700; }
.choices { list-style: none; padding: 0; display: grid; gap: 10px; }
.finalists { font-size: 42px; font-weight: 800; }
.finalists .picked { color: #f5c518; }
.chest { min-height: 520px; display: grid; place-items: center; align-content: center; text-align: center; }
.chest span { font-size: 92px; font-weight: 900; }
.chest.shaking span { animation: shake .25s linear infinite; }
.boss .hp { height: 46px; border-radius: 999px; background: #2a3142; overflow: hidden; margin: 18px 0; }
.boss .hp span { display: block; height: 100%; background: #ef4d6a; }
#app.angry #center { background: rgba(120, 16, 24, .88); animation: rage .4s ease infinite alternate; }
#admin, #debug {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px;
}
#debug { margin-top: auto; padding: 12px; background: rgba(0, 0, 0, .28); border-radius: 14px; }
#admin button, #debug button, #debug input {
  font: inherit; font-weight: 800; border-radius: 10px; border: 0; padding: 8px 10px;
}
#admin button, #debug button { background: #f5c518; color: #15140f; cursor: pointer; }
#debug input { width: 140px; }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }
@keyframes shake { 50% { transform: rotate(2deg) translateX(4px); } }
@keyframes rage { to { filter: saturate(1.4); } }
