/* Comp Night: Icebreakers: shared look.
   Ink navy, cream type, the Comp Night accents. The signature is the wordmark's
   cream-on-cobalt offset shadow: question cards and headings borrow it. */
:root {
  --ink: #0F172A; --ink2: #16213B; --raised: #1E2A47; --line: #2B3A5E;
  --cream: #F7F1E8; --muted: #A9B4CC; --coral: #FF6B3D; --yellow: #FFCC4D;
  --lime: #C6E562; --cobalt: #2563EB; --ice: #BFE3FF; --teal: #35D7DA; --violet: #A879F4; --blush: #FFB8D1;
  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --voice: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  --pop: cubic-bezier(.3, 1.5, .6, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--cream); font-family: var(--display); -webkit-font-smoothing: antialiased; }
/* A soft cobalt glow at the top and a faint dot grid, so the navy isn't flat. */
body {
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgba(37, 99, 235, .28), transparent 60%),
    radial-gradient(rgba(247, 241, 232, .045) 1.2px, transparent 1.6px);
  background-size: 100% 100%, 22px 22px;
  background-attachment: fixed;
}
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
input { font: inherit; }
.hidden { display: none !important; }

/* Buttons: chunky, with a pressable lip. */
.btn { display: inline-block; background: var(--coral); color: var(--ink); font-weight: 800; border-radius: 16px; padding: 14px 24px; font-size: 18px; box-shadow: 0 5px 0 #B8431F; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #B8431F; }
.btn.ghost { background: var(--raised); color: var(--cream); box-shadow: 0 5px 0 #0A1020; }
.btn.ghost:active { box-shadow: 0 2px 0 #0A1020; }
.btn:disabled { opacity: .45; cursor: default; }

/* Answer tiles: solid colour AND a shape, so colour is never the only clue. */
.opt {
  --c: var(--coral); --cd: #B8431F;
  position: relative; display: flex; align-items: center; gap: .6em;
  background: var(--c); color: var(--ink); border-radius: .7em; font-weight: 800; text-align: left; line-height: 1.15;
  box-shadow: 0 .22em 0 var(--cd), 0 .5em 1em rgba(0, 0, 0, .25);
  transition: transform .08s, box-shadow .08s, opacity .25s, filter .25s;
}
.opt .shape { flex: none; width: 1.05em; height: 1.05em; background: var(--ink); opacity: .82; }
.opt[data-i="0"] { --c: var(--coral); --cd: #B8431F; } .opt[data-i="0"] .shape { clip-path: polygon(50% 4%, 96% 92%, 4% 92%); }
.opt[data-i="1"] { --c: var(--teal); --cd: #1D9396; }   .opt[data-i="1"] .shape { border-radius: 50%; }
.opt[data-i="2"] { --c: var(--yellow); --cd: #C4951C; } .opt[data-i="2"] .shape { border-radius: 3px; transform: scale(.9); }
.opt[data-i="3"] { --c: var(--violet); --cd: #7346C0; } .opt[data-i="3"] .shape { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
button.opt:active:not(:disabled) { transform: translateY(.15em); box-shadow: 0 .07em 0 var(--cd); }

/* The question card: cream, ink type, cobalt offset shadow (the wordmark's look). */
.qcard { background: var(--cream); color: var(--ink); border-radius: .5em; padding: .55em .75em .6em; font-weight: 800; line-height: 1.12; letter-spacing: -.015em; box-shadow: .16em .16em 0 var(--cobalt); text-wrap: balance; }
/* Points chips: how scoring works, always spelled out. */
.chips { display: flex; flex-wrap: wrap; gap: .5em; }
.chip { display: inline-flex; align-items: baseline; gap: .45em; background: var(--cream); color: var(--ink); font-weight: 700; padding: .35em .85em .4em; border-radius: 99px; box-shadow: .12em .12em 0 var(--cobalt); }
.chip b { font-weight: 800; color: #C2451F; white-space: nowrap; }
/* Display headings: cream with the cobalt offset. */
.display { font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--cream); text-shadow: .055em .055em 0 var(--cobalt); text-wrap: balance; }
/* The host's lines, in the game's voice. */
.voice { font-family: var(--voice); font-weight: 600; }

.tag { display: inline-flex; align-items: center; gap: .5em; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ice); }
.tag::before { content: ""; width: .7em; height: .7em; border-radius: 50%; background: var(--gc, var(--ice)); }
[data-game="match"] { --gc: var(--coral); } [data-game="guess"] { --gc: var(--yellow); } [data-game="common"] { --gc: var(--teal); }

.av { border-radius: 50%; display: block; }
.timerbar { height: 10px; background: rgba(247, 241, 232, .12); border-radius: 99px; overflow: hidden; }
.timerbar > i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transform-origin: left; transition: background-color .4s; }
.timerbar.low > i { background: var(--coral); }
.timerbar.paused > i { background: var(--yellow); }

@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes rise { from { transform: translateY(.8em); opacity: 0; } }
@keyframes drop { from { transform: translateY(-1.2em) scale(.9); opacity: 0; } }
.pop { animation: pop .45s var(--pop) both; }
.rise { animation: rise .45s var(--pop) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }
