:root {
  --volt: #ffd400;
  --volt-dim: rgba(255, 212, 0, .25);
  --ink: #0b0b0b;
  --panel: #151515;
  --panel-2: #1e1e1e;
  --line: #2c2c2c;
  --ok: #2ecc71;
  --bad: #e74c3c;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(255, 212, 0, .10), transparent 70%),
    var(--ink);
  color: #eee;
  font-family: 'Rubik', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.metal-title, .brand-text {
  font-family: 'Metal Mania', 'Rubik', cursive;
  letter-spacing: .03em;
  color: #fff;
  text-shadow: 0 0 12px var(--volt-dim);
}
.brand-text { font-size: 1.35rem; color: #fff; }

.hero-logo {
  width: min(220px, 60vw);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 40px var(--volt-dim);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 4px #fff, 0 0 70px rgba(255, 212, 0, .45); }
}
.logo-spin:hover { animation: spin 1s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.card-metal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

.btn-warning { --bs-btn-bg: var(--volt); --bs-btn-border-color: var(--volt); color: #000; }
.btn-outline-warning { --bs-btn-color: var(--volt); --bs-btn-border-color: var(--volt-dim); --bs-btn-hover-bg: var(--volt); }
.btn-check:checked + .btn-outline-warning { background: var(--volt); color: #000; }
.btn-check:checked + .btn-outline-warning .text-secondary { color: #333 !important; }

.member-picker { display: grid; }
.mode-btn { white-space: normal; }
.code-input { letter-spacing: .4em; font-weight: 800; text-align: center; max-width: 220px; }

.stat-box { background: var(--panel-2); border-radius: .75rem; padding: .75rem; color: #aaa; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--volt); }

.player-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .25rem; }
.ranking td { border-bottom: 1px solid var(--line); }

/* ---------- Juego ---------- */
.timer-bar { height: .5rem; background: #222; }
.timer-bar .progress-bar { transition: width .1s linear; }

.question-prompt { font-weight: 800; font-size: clamp(1.2rem, 3.5vw, 1.8rem); line-height: 1.3; }

.question-img {
  display: block;
  max-width: 100%;
  max-height: 50vh;
  margin: 0 auto;
  border-radius: .75rem;
  border: 2px solid var(--line);
}

.tab-block {
  background: #000;
  color: var(--volt);
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: .75rem 1rem;
  font-size: clamp(.75rem, 2.4vw, 1rem);
  overflow-x: auto;
}

.option-btn {
  background: var(--panel-2);
  border: 2px solid var(--line);
  color: #fff;
  text-align: left;
  padding: .9rem 1rem;
  font-size: 1.05rem;
  border-radius: .75rem;
  min-height: 3.5rem;
  white-space: normal;
}
.option-btn:hover:not(:disabled) { border-color: var(--volt); color: #fff; background: #242424; }
.option-btn.selected { border-color: var(--volt); background: var(--volt-dim); color: #fff; }
.option-btn.correct { border-color: var(--ok) !important; background: rgba(46, 204, 113, .25) !important; opacity: 1 !important; }
.option-btn.wrong { border-color: var(--bad) !important; background: rgba(231, 76, 60, .25) !important; opacity: 1 !important; }
.option-btn:disabled { opacity: .75; color: #fff; }
.opt-letter {
  display: inline-grid; place-items: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: #000; color: var(--volt); font-weight: 800; margin-right: .5rem;
}

.reveal-box { background: var(--panel-2); border-left: 4px solid var(--volt); border-radius: .5rem; padding: .75rem 1rem; }
.zap { display: inline-block; animation: zap .6s ease-out; }
@keyframes zap {
  0% { transform: scale(.6); filter: brightness(3); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Jugadores */
.players-grid { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 576px) and (max-width: 991.98px) { .players-grid { grid-template-columns: 1fr 1fr; } }
.player-card {
  background: var(--panel-2);
  border-left: 4px solid var(--pc, var(--volt));
  border-radius: .6rem;
  padding: .5rem .75rem;
  transition: opacity .3s;
}
.player-card.is-me { box-shadow: inset 0 0 0 1px var(--volt-dim); }
.player-card.offline { opacity: .45; }
.player-icon { font-size: 1.6rem; }
.min-w-0 { min-width: 0; }
.score { font-weight: 800; color: var(--volt); font-size: 1.1rem; }
.streak { font-size: .85rem; }
.live-answer { color: #fff; font-weight: 600; }
.typing::after { content: '…'; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Media */
.media-player { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .5rem 0; }
.equalizer { display: flex; gap: 3px; align-items: flex-end; height: 32px; }
.equalizer span { width: 6px; height: 6px; background: var(--volt); border-radius: 2px; }
.equalizer.on span { animation: eq .8s ease-in-out infinite; }
.equalizer.on span:nth-child(2) { animation-delay: .1s; }
.equalizer.on span:nth-child(3) { animation-delay: .3s; }
.equalizer.on span:nth-child(4) { animation-delay: .15s; }
.equalizer.on span:nth-child(5) { animation-delay: .25s; }
@keyframes eq { 50% { height: 32px; } }

.yt-wrap { position: relative; width: 100%; max-width: 480px; aspect-ratio: 16 / 9; margin: .5rem auto 0; border-radius: .5rem; overflow: hidden; }
.yt-wrap iframe { width: 100%; height: 100%; }
.yt-cover {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: #000; color: var(--volt); font-weight: 800; font-size: 1.2rem;
}

/* Tap tempo */
.bpm-display { font-size: 3rem; font-weight: 800; color: var(--volt); font-variant-numeric: tabular-nums; }
.bpm-display small { font-size: 1rem; color: #aaa; }
.tap-btn {
  width: min(220px, 70vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #ddd 25%, #888 70%);
  border: 6px solid #000; box-shadow: 0 0 0 4px var(--volt), 0 10px 30px rgba(0, 0, 0, .6);
  font-weight: 800; font-size: 1.6rem; color: #000;
  touch-action: manipulation; user-select: none;
}
.tap-btn.hit { animation: hit .12s ease-out; }
@keyframes hit { 50% { transform: scale(.94); box-shadow: 0 0 0 8px var(--volt), 0 0 40px var(--volt); } }

/* Podio */
.podium-step { width: 30%; max-width: 160px; text-align: center; }
.podium-block {
  background: linear-gradient(var(--pc, var(--volt)), #111);
  border-radius: .5rem .5rem 0 0; margin-top: .5rem;
  display: grid; place-items: center; font-size: 2rem;
}
.step-1 .podium-block { height: 140px; }
.step-2 .podium-block { height: 100px; }
.step-3 .podium-block { height: 70px; }

/* Admin */
.admin-table td { vertical-align: middle; }
.admin-thumb { max-width: 80px; max-height: 50px; border-radius: .25rem; }
