* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #14121c; }
body, button, input {
  font-family: 'Courier New', ui-monospace, monospace;
  font-weight: bold;
  color: #f5efe0;
}
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- menu ---------- */
#menu {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #2a2440 0%, #14121c 70%);
  z-index: 20;
}
.menu-card { width: 340px; text-align: center; }
.title {
  font-size: 42px; line-height: 1.02; letter-spacing: 2px; color: #ffd9a0;
  text-shadow: 4px 4px 0 #000; margin-bottom: 10px;
}
.subtitle { font-size: 13px; color: #9a8fb8; margin-bottom: 26px; letter-spacing: 1px; }
#menu input, #menu button {
  border: 3px solid #000; border-radius: 6px; font-size: 16px; letter-spacing: 2px;
  padding: 12px; text-transform: uppercase; outline: none;
}
#menu input { width: 100%; background: #0d0b14; color: #f5efe0; text-align: center; }
#menu input::placeholder { color: #564f6e; }
.row { margin-top: 12px; display: flex; gap: 10px; }
.join-row #code { width: 110px; flex: none; }
.join-row #join { flex: 1; }
button.big {
  width: 100%; background: #e2b04a; color: #1a1408; cursor: pointer;
  box-shadow: 0 4px 0 #000; transition: transform .05s;
}
button.big:hover { transform: translateY(-1px); }
button.big:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
#menu-err { color: #ff7a6e; font-size: 13px; margin-top: 12px; min-height: 18px; }
.help { margin-top: 26px; font-size: 11px; color: #6e6590; line-height: 1.7; }

/* ---------- hud ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#topbar {
  position: absolute; top: 14px; left: 0; right: 0;
  display: flex; justify-content: center; align-items: flex-start;
}
#baby-wrap { display: flex; align-items: center; gap: 10px; }
#baby-face { font-size: 30px; filter: drop-shadow(2px 2px 0 #000); }
#baby-meter {
  width: 240px; height: 18px; background: #0d0b14; border: 3px solid #000;
  border-radius: 9px; overflow: hidden; position: relative;
}
#baby-stir {
  position: absolute; top: 0; bottom: 0; width: 2px; left: 60%;
  background: #e2b04a; opacity: .8;
}
#baby-fill {
  height: 100%; width: 0%; background: #6ecb63; transition: width .12s linear, background .3s;
}
#baby-label { font-size: 12px; letter-spacing: 2px; color: #bfb4d8; text-shadow: 2px 2px 0 #000; }
#roomcode {
  position: absolute; right: 16px; top: 2px; font-size: 13px; letter-spacing: 2px;
  color: #9a8fb8; text-shadow: 2px 2px 0 #000;
}
#clock {
  position: absolute; left: 16px; top: 0; font-size: 22px; letter-spacing: 2px;
  color: #ffd9a0; text-shadow: 3px 3px 0 #000;
}
#clock.urgent { color: #e25c4a; animation: clock-pulse .6s infinite; }
@keyframes clock-pulse { 50% { opacity: .45; } }
#mic {
  position: absolute; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px;
}
#mic-icon { font-size: 20px; filter: drop-shadow(2px 2px 0 #000); }
#mic-meter {
  width: 90px; height: 10px; background: #0d0b14; border: 2px solid #000; border-radius: 5px;
  overflow: hidden;
}
#mic-fill { height: 100%; width: 0%; background: #6ecb63; }
#tasks {
  position: absolute; left: 16px; bottom: 16px; font-size: 14px; line-height: 1.9;
  letter-spacing: 1px; text-shadow: 2px 2px 0 #000;
}
#tasks .done { color: #6ecb63; text-decoration: line-through; }
#tasks .todo { color: #f5efe0; }
#tasks .head { color: #9a8fb8; font-size: 11px; letter-spacing: 2px; }
#tasks .hint { color: #8a819f; font-size: 11px; }
#crosshair {
  position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2px 0 0 -2px;
  background: #f5efe0; border-radius: 50%; opacity: .8;
}
#noise-ring {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border: 3px solid #ff9d5c; border-radius: 50%; opacity: 0; transition: opacity .15s;
}
#prompt {
  position: absolute; left: 50%; bottom: 21%; transform: translateX(-50%);
  font-size: 17px; letter-spacing: 2px; text-shadow: 3px 3px 0 #000; color: #ffd9a0;
  background: rgba(13,11,20,.75); border: 3px solid #000; border-radius: 8px; padding: 9px 16px;
}
#prompt.dim { color: #8a819f; }
#progress-wrap {
  position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%);
  width: 260px; height: 20px; background: #0d0b14; border: 3px solid #000; border-radius: 10px;
}
#progress { height: 100%; width: 0%; background: #e2b04a; border-radius: 7px; }
#progress-label {
  position: absolute; top: -22px; width: 100%; text-align: center; font-size: 12px;
  letter-spacing: 2px; text-shadow: 2px 2px 0 #000;
}
#announce {
  position: absolute; left: 0; right: 0; top: 26%; text-align: center;
  font-size: 30px; letter-spacing: 3px; color: #ffd9a0; text-shadow: 4px 4px 0 #000;
  transition: opacity .4s; opacity: 0; white-space: pre-line;
}
#mg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%);
  border: 4px solid #000; border-radius: 14px; background: rgba(13,11,20,.9);
  box-shadow: 0 8px 0 rgba(0,0,0,.5);
}
#freeze {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%);
  font-size: 24px; letter-spacing: 3px; color: #ff6a5c; text-shadow: 4px 4px 0 #000;
  background: rgba(13,11,20,.85); border: 3px solid #ff6a5c; border-radius: 10px;
  padding: 10px 20px; animation: clock-pulse .5s infinite; white-space: nowrap;
}
#qte {
  position: absolute; left: 50%; top: 38%; transform: translateX(-50%);
  font-size: 34px; letter-spacing: 3px; color: #ff6a5c; text-shadow: 4px 4px 0 #000;
  background: rgba(13,11,20,.85); border: 4px solid #ff6a5c; border-radius: 12px;
  padding: 14px 26px; text-align: center; animation: qte-shake .1s infinite;
}
.qte-key { font-size: 22px; color: #ffd9a0; margin-top: 6px; }
@keyframes qte-shake {
  0% { transform: translateX(-50%) rotate(-1deg); }
  50% { transform: translateX(-50%) rotate(1.5deg); }
  100% { transform: translateX(-50%) rotate(-1deg); }
}
#report {
  position: absolute; left: 50%; top: 42%; transform: translateX(-50%);
  width: 440px; background: rgba(13,11,20,.88); border: 3px solid #000;
  border-radius: 12px; padding: 16px 20px; text-align: center;
}
#blame { font-size: 15px; letter-spacing: 1px; line-height: 1.7; margin-bottom: 10px; }
#blame .who { font-size: 12px; color: #9a8fb8; letter-spacing: 2px; }
#blame .cause { color: #f5efe0; }
#blame b { font-size: 19px; }
#report-lines { font-size: 13px; line-height: 2; letter-spacing: 1px; }
#report-lines .lbl { color: #9a8fb8; font-size: 11px; letter-spacing: 2px; }
#report-lines .note { color: #8a819f; font-size: 11px; }
#vignette {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(190,30,30,.55) 100%);
}

#hat-panel {
  position: absolute; left: 50%; top: 34%; transform: translateX(-50%);
  width: 300px; text-align: center; pointer-events: auto;
  background: rgba(13,11,20,.92); border: 3px solid #000; border-radius: 12px; padding: 18px;
}
.hat-title { font-size: 15px; letter-spacing: 2px; color: #ffd9a0; margin-bottom: 12px; }
#hat-name {
  width: 100%; border: 3px solid #000; border-radius: 6px; font-size: 16px;
  letter-spacing: 2px; padding: 10px; text-transform: uppercase; text-align: center;
  background: #0d0b14; color: #f5efe0; outline: none; margin-bottom: 10px;
}
#lobby-party { font-size: 12px; color: #bfb4d8; letter-spacing: 1px; margin-bottom: 8px; min-height: 15px; white-space: pre-line; line-height: 1.7; }

/* ---------- lobby ---------- */
#lobby-panel {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 290px; text-align: center; pointer-events: auto;
  background: rgba(13,11,20,.82); border: 3px solid #000; border-radius: 12px; padding: 16px;
}
#lobby-title { font-size: 17px; letter-spacing: 2px; color: #ffd9a0; margin-bottom: 4px; }
#lobby-best { font-size: 11px; color: #9a8fb8; letter-spacing: 1px; margin-bottom: 10px; min-height: 14px; }
#lobby-roster { font-size: 14px; line-height: 1.9; letter-spacing: 1px; margin-bottom: 12px; }
#lobby-roster .esc { color: #6ecb63; }
#lobby-wait { font-size: 12px; color: #9a8fb8; letter-spacing: 1px; }
#lobby-code { margin-top: 12px; font-size: 13px; color: #9a8fb8; letter-spacing: 2px; }
#lobby-code b { color: #ffd9a0; font-size: 17px; }
