/* Dumb Charades - family game night at 3 AM: TV-glow violet, popcorn cream, clapperboard pink, correct-answer green */
:root { --night: #1F1147; --moon: #FFF4E0; --itch: #FFD23F; --sheet: #FF5DA2; --coil: #2EE59D; --bite: #FF4D4D; }
html, body { background: var(--night); }

/* Screens: a sprinkle of popcorn instead of Bzzz Off's coil */
.screen { background:
  radial-gradient(circle, rgba(255,244,224,.08) 0 6px, transparent 7px) 0 0 / 70px 70px,
  radial-gradient(circle, rgba(255,210,63,.06) 0 4px, transparent 5px) 35px 35px / 70px 70px,
  radial-gradient(circle at 50% 30%, #3d2585 0%, var(--night) 72%); }
.screen.dim { background: radial-gradient(circle at 50% 40%, rgba(61,37,133,.94) 0%, rgba(31,17,71,.97) 70%); }
.mascot svg { animation: clap 1.6s ease-in-out infinite; }
@keyframes clap { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-5deg) scale(1.04); } 90% { transform: rotate(3deg); } }
.menu-grid a.ghost { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; font-size: 18px; text-decoration: none; }
.logo { font-size: clamp(44px, 10.5vw, 96px); }
.page .room { font-size: 15px; }
.page .deck-icon { font-size: 34px; line-height: 1.1; }

/* ---------- A round ---------- */
#play { position: fixed; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; overflow-y: auto;
  padding: max(10px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at 50% 18%, #3d2585, var(--night) 70%); }
.top { width: 100%; max-width: 720px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
#pts { color: var(--itch); }
#streak { border-color: var(--sheet); color: var(--itch); }
.stage { width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: auto 0; padding-top: 10px; }
.actor { display: flex; align-items: center; gap: 10px; }
.actor .face { font-size: 46px; line-height: 1; display: inline-block; animation: act .9s ease-in-out infinite alternate; }
@keyframes act { from { transform: rotate(-10deg) translateY(2px); } to { transform: rotate(10deg) translateY(-4px); } }
#actorLine { font-weight: 800; font-size: 16px; opacity: .9; max-width: 24em; }
.clues { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 104px; align-items: center; padding: 10px 18px; width: 100%;
  background: var(--moon); border: 4px solid var(--night); border-radius: 24px; box-shadow: 0 8px 0 var(--night), 0 8px 0 4px var(--sheet); }
.clues span { font-size: clamp(46px, 11vw, 72px); line-height: 1.15; animation: pop .35s cubic-bezier(.3, 1.8, .5, 1); }
.clues .more { font-family: var(--comic); font-size: 40px; color: rgba(31,17,71,.25); animation: none; }
.timer { width: 100%; height: 12px; border: 3px solid var(--night); border-radius: 8px; background: rgba(255,244,224,.15); overflow: hidden; }
#timeFill { display: block; height: 100%; width: 100%; background: var(--coil); transition: width .1s linear; }
#timeFill.low { background: var(--bite); }
.hintline { font-weight: 800; color: var(--night); background: var(--itch); border: 3px solid var(--night); border-radius: 14px; padding: 4px 14px; transform: rotate(-1deg); }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.opt { font-family: var(--body); font-weight: 900; font-size: 17px; line-height: 1.25; color: var(--night); background: var(--moon); cursor: pointer;
  border: 3px solid var(--night); border-radius: 16px; padding: 12px 10px; min-height: 64px; box-shadow: 0 5px 0 var(--night); }
.opt:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--night); }
.opt kbd { font-family: inherit; font-size: 12px; opacity: .5; margin-right: 6px; }
.opt.right { background: var(--coil); animation: pop .35s cubic-bezier(.3, 1.8, .5, 1); }
.opt.wrong { background: var(--bite); color: #fff; animation: shake .35s; }
.opt.gone { visibility: hidden; }
.opt:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.react { font-weight: 800; font-size: 17px; min-height: 1.5em; text-align: center; }
.react.good { color: var(--coil); }
.react.bad { color: #ffb3c9; }
.lifelines { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lifelines .ghost { font-size: 15px; min-height: 40px; padding: 6px 14px; }
.lifelines .ghost:disabled { opacity: .45; background: var(--moon); cursor: default; transform: none; }
.missed { font-weight: 700; font-size: 15px; opacity: .9; }
.missed:empty { display: none; }

@media (max-width: 520px) {
  .options { grid-template-columns: 1fr; gap: 8px; }
  .opt { min-height: 50px; padding: 8px 10px; font-size: 16px; }
  .clues { min-height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot svg, .actor .face, .clues span, .opt.right, .opt.wrong { animation: none; }
}
