/* ========================================
   CORRIDA CHERNOBYL — Multiplayer Stylesheet
   ======================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-dark: #0a0b0e;
  --bg-panel: #111318;
  --bg-card: #1a1d24;
  --nuclear-yellow: #e6c700;
  --nuclear-yellow-dim: #b39d00;
  --olive: #5a7a2a;
  --olive-bright: #7da832;
  --alert-red: #dc143c;
  --alert-red-dim: #8b0a24;
  --industrial-blue: #2c6faa;
  --industrial-blue-dim: #1a3f66;
  --text-primary: #e8e8e8;
  --text-secondary: #9a9a9a;
  --text-dim: #555;
  --border-color: #2a2d35;
  --glow-yellow: 0 0 20px rgba(230,199,0,0.4);
  --glow-red: 0 0 20px rgba(220,20,60,0.5);
  --glow-green: 0 0 15px rgba(90,122,42,0.4);
  --glow-blue: 0 0 15px rgba(44,111,170,0.4);
  --transition-speed: 0.3s;
  --p1-color: #e74c3c;
  --p2-color: #3498db;
  --p3-color: #2ecc71;
  --p4-color: #f1c40f;
}

html, body { height: 100vh; height: 100dvh; overflow: hidden; }
html { font-size: 16px; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-width: 0;
}

/* ---------- SCREENS ---------- */
.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.active { display: flex; }

/* ---------- MENU SCREEN ---------- */
#menu-screen {
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at center, #1a0a0a 0%, var(--bg-dark) 70%);
  padding: 1rem;
  overflow-y: auto;
}
.menu-content {
  max-width: 700px;
  text-align: center;
  margin: auto 0;
  width: 100%;
}
.radiation-symbol {
  font-size: 3rem; color: var(--nuclear-yellow);
  text-shadow: var(--glow-yellow);
  animation: pulse-glow 2s ease-in-out infinite;
  margin-bottom: 0.3rem;
}
.game-title {
  font-family: 'Orbitron','Courier New',monospace;
  font-size: 2.8rem; font-weight: 900;
  color: var(--nuclear-yellow);
  text-shadow: 0 0 30px rgba(230,199,0,0.6), 0 0 60px rgba(230,199,0,0.3);
  letter-spacing: 0.1em; line-height: 1.1; margin-bottom: 0.3rem;
}
.subtitle {
  font-family: 'Share Tech Mono',monospace;
  color: var(--text-secondary); font-size: 0.85rem;
  margin-bottom: 0.6rem; letter-spacing: 0.05em;
}
.story-box {
  background: var(--bg-card);
  border: 1px solid var(--alert-red-dim);
  border-left: 4px solid var(--alert-red);
  padding: 0.7rem 1rem; border-radius: 4px;
  text-align: left; margin-bottom: 0.6rem;
  line-height: 1.5; font-size: 0.82rem;
}
.story-box p+p { margin-top: 0.4rem; }

/* Conditions */
.conditions { display: flex; gap: 0.6rem; margin-bottom: 0.6rem; }
.condition {
  flex: 1; display: flex; align-items: flex-start;
  gap: 0.5rem; padding: 0.6rem; border-radius: 6px;
  font-size: 0.78rem; text-align: left;
}
.condition.win { background: rgba(90,122,42,0.15); border: 1px solid var(--olive); }
.condition.lose { background: rgba(220,20,60,0.15); border: 1px solid var(--alert-red-dim); }
.cond-icon { font-size: 1.1rem; flex-shrink: 0; }
.condition.win .cond-icon { color: var(--olive-bright); }
.condition.lose .cond-icon { color: var(--alert-red); }
.condition p { margin-top: 0.15rem; color: var(--text-secondary); }

/* Rules */
.rules-summary { margin-bottom: 0.6rem; }
.rules-summary h3 {
  font-family: 'Orbitron',monospace; font-size: 0.85rem;
  color: var(--nuclear-yellow); margin-bottom: 0.4rem; letter-spacing: 0.05em;
}
.rule-cards { display: flex; gap: 0.5rem; }
.rule-card {
  flex: 1; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 6px;
  padding: 0.5rem; text-align: center;
}
.rule-card:hover { border-color: var(--nuclear-yellow-dim); }
.rule-icon { font-size: 1.3rem; margin-bottom: 0.2rem; }
.rule-card strong { display: block; color: var(--nuclear-yellow); margin-bottom: 0.15rem; font-size: 0.75rem; }
.rule-card p { font-size: 0.65rem; color: var(--text-secondary); line-height: 1.3; }
.footnote {
  margin-top: 0.6rem; font-size: 0.7rem;
  color: var(--text-dim); font-style: italic;
}

/* ---------- PLAYER SETUP ---------- */
.player-setup {
  margin-bottom: 0.8rem;
  padding: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.player-setup h3 {
  font-family: 'Orbitron',monospace; font-size: 0.85rem;
  color: var(--nuclear-yellow); margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}
.player-count-btns {
  display: flex; gap: 0.5rem; justify-content: center;
  margin-bottom: 0.6rem;
}
.count-btn {
  width: 48px; height: 48px;
  font-family: 'Orbitron',monospace; font-size: 1.2rem; font-weight: 700;
  background: var(--bg-dark); color: var(--text-secondary);
  border: 2px solid var(--border-color); border-radius: 8px;
  cursor: pointer; transition: all var(--transition-speed);
}
.count-btn:hover { border-color: var(--nuclear-yellow-dim); color: var(--text-primary); }
.count-btn.active {
  background: var(--nuclear-yellow); color: #000;
  border-color: var(--nuclear-yellow);
  box-shadow: var(--glow-yellow);
}
#player-inputs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.player-input {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-dark); border: 1px solid var(--border-color);
  border-radius: 6px; padding: 0.4rem 0.6rem;
  transition: opacity var(--transition-speed);
}
.player-input.hidden { display: none; }
.color-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}
.player-input input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-family: 'Share Tech Mono',monospace;
  font-size: 0.8rem; width: 100%;
}
.player-input input::placeholder { color: var(--text-dim); }

/* ---------- BUTTONS ---------- */
.btn-glow {
  font-family: 'Orbitron',monospace;
  font-size: 1rem; font-weight: 700;
  padding: 0.7rem 2rem;
  background: linear-gradient(135deg, var(--nuclear-yellow-dim), var(--nuclear-yellow));
  color: #000; border: none; border-radius: 6px;
  cursor: pointer; letter-spacing: 0.1em;
  transition: all var(--transition-speed); text-transform: uppercase;
}
.btn-glow:hover { box-shadow: var(--glow-yellow), 0 0 40px rgba(230,199,0,0.3); transform: translateY(-2px); }
.btn-glow:active { transform: translateY(0); }
.btn-glow:disabled { background: #333; color: #666; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary {
  font-family: 'Orbitron',monospace; font-size: 0.85rem; font-weight: 700;
  padding: 0.6rem 1.5rem; background: var(--bg-card);
  color: var(--text-secondary); border: 1px solid var(--border-color);
  border-radius: 6px; cursor: pointer; letter-spacing: 0.05em;
  transition: all var(--transition-speed);
}
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }

/* ---------- GAME SCREEN LAYOUT ---------- */
#game-screen { flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#game-layout {
  display: flex; flex: 1; height: 100vh; height: 100dvh; overflow: hidden;
  min-width: 0;
}

/* ---------- SIDE PANELS ---------- */
.side-panels {
  width: clamp(150px, 17vw, 220px);
  min-width: 0;
  flex-shrink: 1;
  display: flex; flex-direction: column;
  background: var(--bg-panel);
  overflow: hidden;
}
.side-panels.left { border-right: 1px solid var(--border-color); }
.side-panels.right { border-left: 1px solid var(--border-color); }
.side-panels .player-panel:first-child { border-bottom: 1px solid var(--border-color); }

/* ---------- PLAYER PANEL ---------- */
.player-panel {
  flex: 1; display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding: 0.5rem 0.6rem;
  transition: all 0.3s;
  overflow: hidden;
  border: 2px solid transparent;
}
.player-panel.active {
  background: rgba(255,255,255,0.05);
  border-color: var(--nuclear-yellow);
  box-shadow: inset 0 0 20px rgba(230,199,0,0.15), 0 0 15px rgba(230,199,0,0.3);
  animation: panel-pulse 2s ease-in-out infinite;
}
.player-panel.eliminated {
  opacity: 0.4; pointer-events: none;
}
.player-panel.hidden-panel { display: none; }

.panel-header {
  display: flex; align-items: center; gap: 0.4rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0.4rem;
  border-bottom: 2px solid var(--border-color);
}
.player-panel.active .panel-header {
  border-bottom-color: var(--nuclear-yellow);
}
.panel-header .color-dot {
  width: 12px; height: 12px;
}
.panel-header .player-name {
  font-family: 'Orbitron',monospace;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.05em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.panel-header .turn-indicator {
  margin-left: auto;
  font-family: 'Orbitron',monospace;
  font-size: 0.65rem; font-weight: 900;
  color: #000;
  background: var(--nuclear-yellow);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
  animation: turn-blink 1.5s ease-in-out infinite;
}

/* Panel Dice Result */
.panel-dice-result {
  text-align: center;
  margin-bottom: 0.3rem;
  padding: 0.2rem;
  border: 2px solid;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
}
.dice-result-label {
  display: block;
  font-family: 'Share Tech Mono',monospace;
  font-size: 0.5rem; color: var(--text-dim);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.dice-result-number {
  font-family: 'Orbitron',monospace;
  font-size: 2.2rem; font-weight: 900;
  text-shadow: 0 0 15px currentColor;
  line-height: 1;
}

/* Panel Timer */
.panel-timer {
  text-align: center; margin-bottom: 0.3rem;
}
.panel-timer .timer-value {
  font-family: 'Share Tech Mono',monospace;
  font-size: 1.8rem;
  text-shadow: var(--glow-yellow);
}
.panel-timer .timer-value.warning {
  color: var(--alert-red);
  text-shadow: var(--glow-red);
  animation: timer-blink 0.5s ease-in-out infinite;
}
.panel-timer .timer-label {
  font-family: 'Share Tech Mono',monospace;
  font-size: 0.55rem; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* Panel Dose */
.panel-dose { margin-bottom: 0.3rem; }
.mini-dose-bar {
  width: 100%; height: 10px;
  background: var(--bg-dark); border-radius: 3px;
  overflow: hidden; border: 1px solid var(--border-color);
}
.mini-dose-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--olive), var(--nuclear-yellow), var(--alert-red));
  transition: width 0.5s ease;
  border-radius: 2px;
}
.mini-dose-fill.danger {
  background: var(--alert-red);
  box-shadow: var(--glow-red);
}
.mini-dose-text {
  font-family: 'Share Tech Mono',monospace;
  font-size: 0.65rem; color: var(--text-secondary);
  display: block; text-align: center; margin-top: 0.15rem;
}
.mini-dose-text.danger { color: var(--alert-red); font-weight: bold; }

/* Panel Status */
.panel-status {
  display: flex; justify-content: space-between;
  font-size: 0.65rem; color: var(--text-secondary);
  font-family: 'Share Tech Mono',monospace;
  margin-bottom: 0.3rem;
}
.panel-status .status-skip {
  color: var(--alert-red); font-weight: bold;
}
.panel-status .status-high {
  color: var(--alert-red); font-weight: bold;
}

/* Panel Action */
.panel-action { margin-top: auto; min-height: 0; }
.btn-roll-mini {
  font-family: 'Orbitron',monospace;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.4rem 0.5rem; width: 100%;
  background: linear-gradient(135deg, var(--industrial-blue-dim), var(--industrial-blue));
  color: #fff; border: none; border-radius: 6px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center; gap: 0.3rem;
  transition: all var(--transition-speed);
  letter-spacing: 0.03em;
  min-width: 0; overflow: hidden; white-space: nowrap;
}
.btn-roll-mini span {
  overflow: hidden; text-overflow: ellipsis;
}
.btn-roll-mini:hover:not(:disabled) { box-shadow: var(--glow-blue); transform: translateY(-1px); }
.btn-roll-mini:disabled { background: #2a2d35; color: #555; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-roll-mini.rolling { animation: dice-shake 0.1s linear infinite; }
.panel-action .action-hint {
  font-size: 0.55rem; color: var(--text-dim);
  text-align: center; margin-top: 0.2rem;
}

/* Mini D4 */
.dice-d4-mini {
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 24px; height: 24px; position: relative;
}
.d4-inner-mini {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, #f0c040, #d4a800);
  color: #1a1a2e;
  font-family: 'Orbitron',monospace;
  font-size: 0.8rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(45deg); border-radius: 3px;
  border: 2px solid #b39d00;
  box-shadow: 0 0 6px rgba(230,199,0,0.4);
}
.d4-label-mini {
  font-family: 'Share Tech Mono',monospace;
  font-size: 0.4rem; color: rgba(255,255,255,0.5);
  margin-top: 1px;
}

/* ---------- BOARD ---------- */
#board-container {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0.3rem; overflow: hidden;
  min-width: 0; min-height: 0;
}
#board {
  position: relative; width: 100%; height: 100%;
  border: 2px solid var(--border-color);
  border-radius: 8px; overflow: hidden;
  background: var(--bg-dark);
}
#board-image {
  width: 100%; height: 100%; object-fit: contain;
  display: block; user-select: none; -webkit-user-drag: none;
}

/* House overlays — invisible but positioned for JS */
.house {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none;
  z-index: 1;
}

/* ---------- PLAYER TOKENS ---------- */
.player-token {
  position: absolute;
  font-size: 2.1rem;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: none;
  transition: left 0.6s cubic-bezier(0.34,1.56,0.64,1),
              top 0.6s cubic-bezier(0.34,1.56,0.64,1);
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.8));
  line-height: 1;
}
.player-token::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.6;
}
.player-token[data-player="0"] { color: var(--p1-color); }
.player-token[data-player="1"] { color: var(--p2-color); }
.player-token[data-player="2"] { color: var(--p3-color); }
.player-token[data-player="3"] { color: var(--p4-color); }
.player-token[data-player="0"]::after { border-color: var(--p1-color); }
.player-token[data-player="1"]::after { border-color: var(--p2-color); }
.player-token[data-player="2"]::after { border-color: var(--p3-color); }
.player-token[data-player="3"]::after { border-color: var(--p4-color); }

.player-token.arriving {
  animation: token-arrive 0.3s ease-out;
}

/* ---------- MODALS ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000; animation: fadeIn 0.3s ease; padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px; padding: 1.5rem;
  max-width: 440px; width: 100%; text-align: center;
  animation: modalSlideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-header { margin-bottom: 0.8rem; }
.modal-icon { font-size: 2.5rem; display: block; margin-bottom: 0.3rem; }
.modal-header h2 {
  font-family: 'Orbitron',monospace; font-size: 1.1rem;
  color: var(--nuclear-yellow); letter-spacing: 0.05em;
}
.modal-body p {
  font-size: 0.88rem; line-height: 1.5;
  color: var(--text-secondary); margin-bottom: 0.8rem;
}
.modal-footer {
  display: flex; gap: 0.6rem; justify-content: center; margin-top: 1rem;
}
.coin-player-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: 'Orbitron',monospace;
  font-size: 0.65rem; font-weight: 700;
  margin-bottom: 0.5rem;
}

.event-effect {
  font-family: 'Share Tech Mono',monospace;
  padding: 0.6rem; border-radius: 6px;
  margin: 0.6rem 0; font-size: 0.85rem;
}
.event-effect.dose { background: rgba(220,20,60,0.15); border: 1px solid var(--alert-red-dim); color: var(--alert-red); }
.event-effect.time { background: rgba(230,199,0,0.1); border: 1px solid var(--nuclear-yellow-dim); color: var(--nuclear-yellow); }
.event-effect.special { background: rgba(44,111,170,0.15); border: 1px solid var(--industrial-blue-dim); color: var(--industrial-blue); }

/* Coin Flip */
.coin-modal h2 { font-family: 'Orbitron',monospace; color: var(--nuclear-yellow); margin-bottom: 0.8rem; }
.coin-modal p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.4; font-size: 0.88rem; }
.coin-container {
  height: 100px; display: flex; justify-content: center;
  align-items: center; perspective: 600px; margin-bottom: 1rem;
}
.coin {
  width: 70px; height: 70px; border-radius: 50%;
  position: relative; transform-style: preserve-3d;
  transition: transform 0.1s;
}
.coin.flipping-heads { animation: coin-flip-heads 1s ease-out forwards; }
.coin.flipping-tails { animation: coin-flip-tails 1s ease-out forwards; }
.coin-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; backface-visibility: hidden;
}
.coin-heads { background: linear-gradient(135deg, #e6c700, #b39d00); color: #000; }
.coin-tails { background: linear-gradient(135deg, #888, #555); color: #000; transform: rotateY(180deg); }
.coin-result {
  font-family: 'Orbitron',monospace; font-size: 1rem;
  padding: 0.6rem; border-radius: 6px; margin-top: 0.8rem;
}
.coin-result.hidden { display: none; }
.coin-result.success { background: rgba(90,122,42,0.2); border: 1px solid var(--olive); color: var(--olive-bright); }
.coin-result.failure { background: rgba(220,20,60,0.2); border: 1px solid var(--alert-red-dim); color: var(--alert-red); }

/* End Game */
.end-modal h2 { font-family: 'Orbitron',monospace; font-size: 1.5rem; margin: 0.5rem 0; }
.end-icon { font-size: 3rem; }
.end-stats {
  display: flex; gap: 0.6rem; justify-content: center;
  margin: 1rem 0; flex-wrap: wrap;
}
.stat-box {
  background: var(--bg-dark); border: 1px solid var(--border-color);
  border-radius: 8px; padding: 0.6rem 1rem; text-align: center; min-width: 100px;
}
.stat-box .stat-label {
  font-size: 0.6rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em;
  display: block; margin-bottom: 0.2rem;
}
.stat-box .stat-value {
  font-family: 'Share Tech Mono',monospace; font-size: 1.3rem; font-weight: bold;
}
.end-modal.victory h2 { color: var(--olive-bright); }
.end-modal.victory .stat-value { color: var(--olive-bright); }
.end-modal.defeat h2 { color: var(--alert-red); }
.end-modal.defeat .stat-value { color: var(--alert-red); }

/* Leaderboard */
.end-leaderboard {
  margin: 0.8rem 0;
}
.end-leaderboard h3 {
  font-family: 'Orbitron',monospace; font-size: 0.8rem;
  color: var(--nuclear-yellow); margin-bottom: 0.5rem;
}
.lb-entry {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.6rem; margin-bottom: 0.3rem;
  background: var(--bg-dark); border-radius: 6px;
  border: 1px solid var(--border-color);
}
.lb-entry .lb-place {
  font-family: 'Orbitron',monospace; font-size: 0.9rem; font-weight: 900;
  width: 28px; text-align: center;
}
.lb-entry .lb-name {
  font-family: 'Share Tech Mono',monospace; font-size: 0.8rem;
  flex: 1; text-align: left;
}
.lb-entry .lb-result {
  font-family: 'Share Tech Mono',monospace; font-size: 0.7rem;
  padding: 0.15rem 0.4rem; border-radius: 3px;
}
.lb-entry .lb-result.won { background: rgba(90,122,42,0.2); color: var(--olive-bright); }
.lb-entry .lb-result.lost { background: rgba(220,20,60,0.2); color: var(--alert-red); }

/* ---------- GEIGER OVERLAY ---------- */
.geiger-overlay {
  position: fixed; inset: 0; pointer-events: none;
  z-index: 999; border: 3px solid var(--alert-red);
  animation: geiger-flash 0.3s ease-in-out;
}
.geiger-overlay.hidden { display: none; }
.geiger-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-family: 'Orbitron',monospace;
  color: var(--alert-red); font-size: 1rem;
  text-shadow: var(--glow-red);
  opacity: 0; animation: geiger-text-fade 1.5s ease-out forwards;
}

/* ---------- ANIMATIONS ---------- */
@keyframes pulse-glow {
  0%,100% { opacity: 1; text-shadow: 0 0 20px rgba(230,199,0,0.4); }
  50% { opacity: 0.7; text-shadow: 0 0 40px rgba(230,199,0,0.8); }
}
@keyframes timer-blink {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes dice-shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}
@keyframes coin-flip-heads {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(900deg); }
  100% { transform: rotateY(1800deg); }
}
@keyframes coin-flip-tails {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(900deg); }
  100% { transform: rotateY(1980deg); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes geiger-flash {
  0% { border-color: transparent; }
  50% { border-color: var(--alert-red); }
  100% { border-color: transparent; }
}
@keyframes geiger-text-fade {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%,-50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1); }
}
@keyframes token-arrive {
  0% { transform: translate(-50%,-50%) scale(1.5); }
  100% { transform: translate(-50%,-50%) scale(1); }
}
@keyframes panel-pulse {
  0%, 100% { box-shadow: inset 0 0 20px rgba(230,199,0,0.15), 0 0 15px rgba(230,199,0,0.3); }
  50% { box-shadow: inset 0 0 30px rgba(230,199,0,0.25), 0 0 25px rgba(230,199,0,0.5); }
}
@keyframes turn-blink {
  0%, 100% { opacity: 1; background: var(--nuclear-yellow); }
  50% { opacity: 0.6; background: var(--nuclear-yellow-dim); }
}

/* Dice rolled highlight */
.dice-d4-mini.dice-rolled .d4-inner-mini {
  background: linear-gradient(135deg, #ffe44d, #ffcc00);
  box-shadow: 0 0 15px rgba(230,199,0,0.8);
  animation: dice-result-flash 0.6s ease-out;
  transform: rotate(45deg) scale(1.15);
}
@keyframes dice-result-flash {
  0% { transform: rotate(45deg) scale(1.8); box-shadow: 0 0 25px rgba(230,199,0,1); }
  100% { transform: rotate(45deg) scale(1.15); box-shadow: 0 0 15px rgba(230,199,0,0.8); }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
