/* «Большая игра»: всё поверх общих стилей FUNBASE (css/style.css) */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 12px; min-height: 0; position: relative; }
.stage.with-side { grid-template-columns: 400px minmax(0, 1fr); }

.side { background: var(--surface); border-radius: 14px; padding: 22px; overflow: auto; min-height: 0; }
.side h2 { margin-top: 18px; }
.side h2:first-child { margin-top: 0; }
.side .modes { grid-template-columns: 1fr; }
.rules-list { color: #c9c9cf; padding-left: 18px; display: grid; gap: 8px; }
.results-title { font: 900 30px/1.05 var(--font); text-transform: uppercase; letter-spacing: -.02em; margin: 10px 0 6px; }
.side .ranking { margin: 16px 0; }
.replays { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 18px; }
.replays figure { margin: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; cursor: pointer; position: relative; }
.replays img, .replays video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #000; }
.replays figcaption { padding: 6px 8px; font-size: 12px; color: var(--muted); }
.replays figcaption b { color: var(--text); }
.replays .card-mark { position: absolute; top: 8px; left: 8px; }

.arena { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.arena .tiles { flex: 1; min-height: 0; }

.chip.clock b, .chip.bank b { font-variant-numeric: tabular-nums; }
.chip.clock svg { width: 14px; height: 14px; }
.chip.clock.low { background: var(--accent); color: #fff; }
.chip.clock.low b { color: #fff; }

/* Мини-игра: плашка и «прожектор» на говорящего */
.event-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--accent); color: #fff; border-radius: 12px; padding: 12px 16px;
}
.event-bar .ev-title { font: 900 22px/1 var(--font); text-transform: uppercase; letter-spacing: -.01em; }
.event-bar .ev-text { flex: 1; min-width: 200px; font-weight: 600; }
.event-bar .ev-time { font: 900 26px/1 var(--font); font-variant-numeric: tabular-nums; }
.event-bar .ev-prompt { flex-basis: 100%; order: 5; font: 800 clamp(17px, 2.2vw, 24px)/1.3 var(--font); background: rgba(0,0,0,.28); border-radius: 10px; padding: 10px 14px; text-wrap: balance; }
.event-bar .btn { background: #fff; color: #111; }
.event-intro { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(17,17,19,.85); pointer-events: none; }
.event-intro div { text-align: center; max-width: 640px; padding: 20px; }
.event-intro b { display: block; font: 900 clamp(44px, 8vw, 96px)/.95 var(--font); text-transform: uppercase; color: var(--accent); letter-spacing: -.03em; animation: shake .5s ease-in-out; }
.event-intro p { font-size: 18px; color: #e6e6ea; margin-top: 18px; }
.spotlight { display: grid; grid-auto-flow: column; gap: 10px; height: 46%; min-height: 220px; justify-content: center; }
.spotlight .spot { position: relative; height: 100%; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: #000; border: 3px solid var(--accent); }
.spotlight video { width: 100%; height: 100%; object-fit: cover; display: block; }
.spotlight .spot.me video { transform: scaleX(-1); }
.spotlight .spot-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font: 800 20px/1 var(--font); }
.spotlight .spot .vs { position: absolute; }

.host-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.host-bar .muted { color: var(--muted); font-size: 13px; font-weight: 600; }
.host-bar .spacer { flex: 1; }

/* Карточки на плитках */
.cards { display: inline-flex; gap: 3px; }
.card-mark { display: inline-block; width: 12px; height: 16px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.card-mark.y { background: #ffd21f; }
.card-mark.r { background: #ff2e3f; }
.card-mark.big { width: 60px; height: 84px; border-radius: 8px; }
.tile .points { font: 900 clamp(11px, 3.4cqw, 16px)/1 var(--font); background: #fff; color: #111; border-radius: 99px; padding: 3px 7px; margin-right: 4px; }
.tile.chaos video { filter: saturate(.3) contrast(1.1); }
.tile.suspect { border-color: var(--accent); animation: flash .6s ease-in-out infinite; }
.tile .tag.chaos { background: #6b21a8; }

/* Разбор, голосование, вердикт */
.judge { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(10,10,12,.82); padding: 16px; }
.judge-card { background: var(--surface); border-radius: 16px; padding: 22px; width: min(640px, 100%); max-height: 100%; overflow: auto; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.judge-title { font: 900 clamp(28px, 5vw, 46px)/1 var(--font); text-transform: uppercase; letter-spacing: -.02em; }
.judge-title.siren { color: var(--accent); animation: blink .7s steps(2) infinite; }
@keyframes blink { 50% { opacity: .45; } }
.judge-sub { color: var(--muted); margin: 10px 0 14px; }
.judge-sub b { color: var(--text); }
.judge-media { margin-bottom: 16px; }
.judge-media video, .judge-media img { width: 100%; max-height: 46vh; object-fit: contain; background: #000; border-radius: 12px; display: block; }
.judge-media .wait { aspect-ratio: 4/3; max-height: 46vh; margin: 0 auto; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; color: var(--muted); }
.judge-actions { display: grid; gap: 10px; }
.judge-actions .row { flex-wrap: wrap; }
.judge-actions label { text-align: left; margin: 0; }
.btn.yellow { background: #ffd21f; color: #111; }
.btn.yellow:hover:not(:disabled) { background: #ffdd55; }
.verdict-card { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 14px; }
.verdict-card .card-mark { transform: rotate(-8deg); animation: pop .5s ease-out; }
.judge-card.v-yellow { box-shadow: 0 0 0 4px #ffd21f, 0 30px 80px rgba(0,0,0,.6); }
.judge-card.v-red { box-shadow: 0 0 0 4px #ff2e3f, 0 30px 80px rgba(0,0,0,.6); }
.vote-count { color: var(--muted); font-size: 14px; margin-top: 8px; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

@media (max-width: 900px) {
  #game { height: auto; min-height: 100dvh; }
  .stage, .stage.with-side { grid-template-columns: 1fr; }
  .spotlight { height: auto; grid-auto-flow: row; }
  .spotlight .spot { height: auto; width: 100%; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .judge { position: fixed; }
}
@media (max-width: 760px) { .arena .tiles { align-content: start; flex: none; } }

/* Эффекты на камерах и пакости хаоса */
.tile .fxtag { position: absolute; left: 50%; bottom: clamp(34px, 11cqw, 52px); transform: translateX(-50%); z-index: 1; white-space: nowrap; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,.7); color: #fff; animation: fxpop .35s ease-out; pointer-events: none; }
@keyframes fxpop { from { transform: translateX(-50%) scale(1.4); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.tile-btn.fx { background: #6b21a8; color: #fff; }
.tile-btn.fx:hover { background: #7e2fc4; }
.chaos-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: linear-gradient(90deg, #3b0f5c, var(--surface)); border: 1px solid #6b21a8; border-radius: 12px; padding: 10px 12px; }
.chaos-bar .chaos-title { font: 900 13px/1.2 var(--font); text-transform: uppercase; letter-spacing: .04em; color: #d8b4fe; }
.chaos-bar .muted { color: var(--muted); font-size: 13px; font-weight: 600; }
.chaos-sfx { display: flex; gap: 6px; flex-wrap: wrap; }
.chaos-cd { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.chaos-cd.ready { color: #d8b4fe; }
.fx-dialog { width: min(560px, calc(100% - 32px)); }
.fx-dialog h3 { margin: 16px 0 8px; }
.fx-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.fx-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; font-size: 12px; font-weight: 700; }
.fx-opt span { font-size: 26px; line-height: 1; }
.fx-opt:hover { border-color: #a855f7; background: var(--surface-3); }
.clown { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: -8px 0 16px; color: var(--muted); font-size: 13px; }
.clown b { color: var(--text); font-size: 15px; }
.clown-ico { font-size: 34px; line-height: 1; }

/* Отсчёт перед эфиром */
.countdown-big { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgba(10,10,12,.72); color: #fff; text-align: center; pointer-events: none; }
.countdown-big span { font: 800 18px/1 var(--font); text-transform: uppercase; letter-spacing: .14em; color: #ffb3bd; }
.countdown-big b { font: 900 clamp(120px, 26vw, 260px)/1 var(--font); letter-spacing: -.04em; text-shadow: 0 10px 50px rgba(224,40,60,.6); animation: cd-pop .9s ease-out; }
.countdown-big small { font: 700 16px/1.3 var(--font); color: #d4d4d8; }
@keyframes cd-pop { from { transform: scale(1.5); opacity: 0; } 25% { transform: scale(1); opacity: 1; } }
/* Красная рамка по краю окна, пока вас может поймать детектор */
body.no-laugh::after { content: ''; position: fixed; inset: 0; z-index: 70; pointer-events: none; border: 4px solid var(--accent); box-shadow: inset 0 0 28px rgba(224,40,60,.45); animation: nolaugh 2.4s ease-in-out infinite; }
@keyframes nolaugh { 50% { box-shadow: inset 0 0 12px rgba(224,40,60,.25); } }
@media (prefers-reduced-motion: reduce) { body.no-laugh::after, .countdown-big b { animation: none; } }

/* Громкость звуков хаоса в шапке (50–100%) */
.sfxchip { gap: 6px; cursor: default; }
.sfxchip svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.sfxchip input { width: 80px; }
.sfxchip b { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
@media (max-width: 760px) { .sfxchip span { display: none; } .sfxchip input { width: 60px; } }
