/* Familia Dev — estilos compartidos host + board */

:root {
  --bg-deep: #57356a;
  --bg-mid: #5d3a6f;
  --bg-light: #725483;
  --gold: #ffd600;
  --gold-soft: #ffe48a;
  --red: #d32525;
  --green: #2ecc71;
  --text: #ffffff;
  --text-mute: rgba(255, 255, 255, 0.65);
  --card-bg: #0f2f74;
  --card-revealed: linear-gradient(180deg, #5d3a6f 0%, #371c4b 100%);
  --card-hidden: linear-gradient(180deg, #4d2d61 0%, #371c4b 100%);
  --shadow-card: 0 6px 0 rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.45);
  --font-display: "Arial Black", "Helvetica Neue", Impact, sans-serif;
  --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --team-a: #2978c5;
  --team-b: #c52929;
  --bg-image-url: none;
}

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(ellipse at top, var(--bg-light) 0%, var(--bg-mid) 40%, var(--bg-deep) 100%);
  overflow: hidden;
  user-select: none;
}

body.has-bg-image {
  background:
    linear-gradient(180deg, rgba(6, 26, 58, 0.85) 0%, rgba(6, 26, 58, 0.75) 100%),
    var(--bg-image-url) center/cover no-repeat;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
}

/* ---------- VISTA ROLE-SWITCH ---------- */

.picker-only,
.board-only,
.host-only,
.player-only {
  display: none;
}

body[data-role="picker"] .picker-only { display: flex; }
body[data-role="board"]  .board-only  { display: flex; }
body[data-role="host"]   .host-only   { display: grid; }
body[data-role="player"] .player-only { display: flex; }

/* Sub-clases dependientes del modo (offline/online) dentro del host */
body[data-mode="online"]  .host-only-offline { display: none !important; }
body[data-mode="offline"] .host-only-online  { display: none !important; }

/* ---------- PANTALLA DE INICIO (picker) ---------- */

.role-picker {
  position: fixed;
  inset: 0;
  flex-direction: column;
  align-items: center;
  /*justify-content: center;*/
  gap: 18px;
  padding: 32px;
  overflow-y: auto;
}

.theme-app-title {
  padding-top: -16px;
}

.theme-logo {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.picker-logo {
  max-height: 120px;
  max-width: 320px;
  margin-bottom: 4px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.host-logo {
  max-height: 48px;
  max-width: 100px;
  margin-right: 12px;
}

.player-logo {
  max-height: 80px;
  max-width: 220px;
  margin: 0 auto 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.host-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: var(--text-mute);
}

.theme-selector select {
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  min-width: 180px;
}

.theme-selector select:focus {
  outline: none;
  border-color: var(--gold);
}

.role-picker h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 7vw, 96px);
  color: var(--gold);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 210, 63, 0.4);
  letter-spacing: 4px;
  text-align: center;
}

.role-picker p {
  font-size: 18px;
  color: var(--text-mute);
  max-width: 600px;
  text-align: center;
  line-height: 1.5;
}

.role-buttons {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.role-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--card-revealed);
  color: var(--text);
  border: 3px solid var(--gold);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 28px) clamp(20px, 4vw, 44px);
  font-family: var(--font-display);
  font-size: clamp(16px, 2.5vw, 22px);
  letter-spacing: 2px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-card);
  min-width: min(240px, 100%);
  max-width: 100%;
}

.role-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.5);
}

.role-button .icon {
  font-size: 56px;
}

.role-button .sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0;
  text-transform: none;
  max-width: 220px;
  line-height: 1.4;
}

/* ---------- BOARD ---------- */

.board-shell {
  position: fixed;
  inset: 0;
  flex-direction: column;
  padding: clamp(8px, 2vw, 24px) clamp(12px, 2.5vw, 32px);
  gap: clamp(8px, 1.5vw, 18px);
}

.board-question {
  background: linear-gradient(180deg, var(--gold) 0%, #f5b800 100%);
  color: #1a1a1a;
  padding: clamp(8px, 1.5vw, 14px) clamp(14px, 3vw, 32px);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.6vw, 38px);
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--shadow-card);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}

.board-question .multiplier {
  display: inline-block;
  margin-left: 16px;
  padding: 4px 14px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-size: 0.5em;
  vertical-align: middle;
  letter-spacing: 2px;
}

.board-pot {
  background: var(--bg-deep);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 8px 24px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 32px);
  color: var(--gold);
  text-align: center;
  letter-spacing: 2px;
}

.board-answers {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1vw, 14px);
  align-content: stretch;
  min-height: 0;
}

.board-answers.single-column {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.answer-card {
  display: flex;
  align-items: center;
  background: var(--card-hidden);
  border: 3px solid #371c4b;
  border-radius: 14px;
  padding: clamp(6px, 1vw, 10px) clamp(10px, 2vw, 22px);
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
  min-height: 0;
}

.answer-card .number {
  font-size: clamp(28px, 4vw, 68px);
  color: var(--gold);
  margin-right: clamp(8px, 1.5vw, 22px);
  flex-shrink: 0;
  width: clamp(36px, 5vw, 80px);
  text-align: center;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

.answer-card .text {
  flex: 1;
  font-size: clamp(14px, 2vw, 34px);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.answer-card .points {
  font-size: clamp(20px, 2.8vw, 48px);
  color: var(--gold);
  margin-left: clamp(8px, 1.5vw, 16px);
  min-width: clamp(48px, 6vw, 100px);
  text-align: right;
  background: var(--bg-deep);
  padding: 4px clamp(8px, 1.2vw, 16px);
  border-radius: 8px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s 0.2s;
}

.answer-card.revealed {
  background: var(--card-revealed);
  border-color: var(--gold);
}

/* Animación solo cuando se acaba de revelar (no en cada re-render). */
.answer-card.just-revealed {
  animation: revealFlip 0.6s ease;
}

.answer-card.revealed .text,
.answer-card.revealed .points {
  opacity: 1;
}

@keyframes revealFlip {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(90deg); background: var(--gold); }
  100% { transform: rotateX(0deg); }
}

/* Empty placeholder card */
.answer-card.placeholder {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

/* ---------- SCOREBOARD ---------- */

.board-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(8px, 1.5vw, 18px);
  align-items: stretch;
}

.team {
  background: var(--card-revealed);
  border: 3px solid var(--gold);
  border-radius: 14px;
  padding: clamp(6px, 1vw, 12px) clamp(12px, 2vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 1.5vw, 20px);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.team.active {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px var(--gold), var(--shadow-card);
}

.team .name {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.8vw, 32px);
  letter-spacing: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team .score {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 64px);
  color: var(--gold);
}

.team .strikes {
  display: flex;
  gap: clamp(4px, 0.8vw, 8px);
}

.strike-dot {
  width: clamp(14px, 1.6vw, 22px);
  height: clamp(14px, 1.6vw, 22px);
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s, transform 0.2s;
}

.strike-dot.on {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.15);
  animation: strikeDotPulse 0.5s ease;
}

@keyframes strikeDotPulse {
  0%   { transform: scale(0.3); box-shadow: 0 0 0 8px rgba(211, 37, 37, 0.6); }
  60%  { transform: scale(1.4); box-shadow: 0 0 0 16px rgba(211, 37, 37, 0); }
  100% { transform: scale(1.15); box-shadow: 0 0 0 0 rgba(211, 37, 37, 0); }
}

.board-pot-mid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: clamp(80px, 12vw, 160px);
  background: var(--bg-deep);
  border: 3px solid var(--gold);
  border-radius: 14px;
  padding: clamp(4px, 0.8vw, 8px) clamp(8px, 1.5vw, 16px);
}

.board-pot-mid .label {
  font-size: clamp(9px, 1vw, 12px);
  letter-spacing: 3px;
  color: var(--text-mute);
}

.board-pot-mid .amount {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 54px);
  color: var(--gold);
}

/* ---------- AUDIO UNLOCK HINT ---------- */

.audio-unlock-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid var(--gold);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--gold);
  z-index: 80;
  cursor: pointer;
  animation: audioHintPulse 1.5s ease-in-out infinite;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.audio-unlock-hint .icon {
  font-size: 32px;
}

@keyframes audioHintPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);     opacity: 1; }
  50%      { transform: translate(-50%, -50%) scale(1.05);  opacity: 0.85; }
}

/* ---------- STRIKE OVERLAY ---------- */

.strike-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(180, 20, 20, 0);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.strike-overlay.show {
  opacity: 1;
  background: rgba(180, 20, 20, 0.65);
  animation: shake 0.45s ease, redFlash 0.6s ease-out;
}

.strike-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: scale(0);
}

.strike-overlay.show .strike-content {
  animation: stampIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

.strike-overlay .x {
  font-family: var(--font-display);
  font-size: clamp(220px, 28vw, 440px);
  line-height: 0.85;
  color: var(--red);
  text-shadow: 0 0 0 #fff, 0 0 30px rgba(0, 0, 0, 0.6), -8px 0 0 #fff, 8px 0 0 #fff, 0 -8px 0 #fff, 0 8px 0 #fff;
  -webkit-text-stroke: 12px #fff;
}

.strike-overlay .strike-label {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  color: #fff;
  background: var(--red);
  padding: 8px 36px;
  border-radius: 12px;
  border: 4px solid #fff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  letter-spacing: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  line-height: 1.05;
}

.strike-overlay .strike-label-sub {
  font-size: 0.55em;
  letter-spacing: 6px;
  opacity: 0.9;
  display: block;
  margin-top: 4px;
}

/* Variante 3er strike */
.strike-overlay.is-strikeout.show .strike-content {
  animation: stampIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) forwards,
             strikeOutPulse 1.2s ease 0.5s infinite;
}

.strike-overlay.is-strikeout .strike-label {
  background: #000;
  color: var(--red);
  border-color: var(--red);
  font-size: clamp(48px, 7vw, 96px);
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10%  { transform: translate(-16px, 8px); }
  20%  { transform: translate(16px, -8px); }
  30%  { transform: translate(-14px, -6px); }
  40%  { transform: translate(14px, 6px); }
  50%  { transform: translate(-10px, 4px); }
  60%  { transform: translate(10px, -4px); }
  70%  { transform: translate(-6px, -2px); }
  80%  { transform: translate(6px, 2px); }
  90%  { transform: translate(-2px, 0); }
}

@keyframes redFlash {
  0%   { background: rgba(255, 80, 80, 0.95); }
  30%  { background: rgba(180, 20, 20, 0.65); }
  100% { background: rgba(180, 20, 20, 0.65); }
}

@keyframes stampIn {
  0%   { transform: scale(6) rotate(-25deg); opacity: 0; }
  20%  { transform: scale(1.2) rotate(-5deg); opacity: 1; }
  35%  { transform: scale(0.95) rotate(2deg); }
  50%  { transform: scale(1.05) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes strikeOutPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* ---------- ROUND END OVERLAY ---------- */

.round-end {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 26, 58, 0.95);
  z-index: 90;
  text-align: center;
  gap: 12px;
}

.round-end.show {
  display: flex;
  animation: fadeIn 0.4s ease;
}

.round-end .winner {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 92px);
  color: var(--gold);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.4);
}

.round-end .pot-won {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 70px);
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
/* ---------- GAME END OVERLAY ---------- */
.game-end {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(255, 210, 63, 0.18) 0%, rgba(6, 26, 58, 0.97) 70%);
  z-index: 95;
  text-align: center;
  gap: 18px;
}

.game-end.show {
  display: flex;
  animation: fadeIn 0.5s ease;
}

/* Placa semitransparente que mejora el contraste del texto sobre el degradado. */
.game-end .game-end-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(24px, 4vw, 56px) clamp(36px, 6vw, 96px);
  background: rgba(6, 26, 58, 0.78);
  border: 3px solid rgba(255, 210, 63, 0.55);
  border-radius: 24px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  max-width: 92vw;
}

.game-end .trophy {
  font-size: clamp(80px, 12vw, 180px);
  animation: trophyBounce 1.2s ease-in-out infinite alternate;
}

.game-end .winner {
  font-family: var(--font-display);
  font-size: clamp(46px, 7vw, 110px);
  color: var(--gold);
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.game-end .game-end-scores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.game-end .game-end-scores .score-row {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 48px);
  color: #fff;
  opacity: 0.9;
}

.game-end .game-end-scores .score-row.is-winner {
  color: var(--gold);
  opacity: 1;
}

@keyframes trophyBounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-12px) scale(1.05); }
}

/* ---------- HOST ---------- */

.host-shell {
  position: fixed;
  inset: 0;
  grid-template-rows: auto 1fr auto;
  padding: clamp(8px, 1.5vw, 16px) clamp(10px, 2vw, 20px);
  gap: clamp(8px, 1vw, 14px);
  overflow: auto;
}

.host-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.host-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 2px;
}

.host-status {
  font-size: 13px;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.host-status .dot.live {
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.host-controls-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.host-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1vw, 14px);
  min-height: 0;
}

.host-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: clamp(10px, 1.5vw, 16px);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vw, 10px);
  overflow: auto;
  min-height: 0;
}

.host-panel h2 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--gold-soft);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.host-question-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  padding: 12px;
  background: rgba(255, 210, 63, 0.1);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
}

.host-answer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-answer {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 15px;
  transition: background 0.15s;
}

.host-answer.is-revealed {
  background: rgba(46, 204, 113, 0.18);
  border-color: rgba(46, 204, 113, 0.6);
  opacity: 0.7;
}

.host-answer .num {
  font-family: var(--font-display);
  color: var(--gold);
  text-align: center;
}

.host-answer .pts {
  font-family: var(--font-display);
  color: var(--gold);
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
}

.btn {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  transition: background 0.15s, transform 0.05s;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gold);
  color: #1a1a1a;
  border-color: var(--gold);
  font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-soft);
}

.btn-danger {
  background: var(--red);
  border-color: var(--red);
}

.btn-danger:hover:not(:disabled) {
  background: #ef4848;
}

.btn-success {
  background: var(--green);
  border-color: var(--green);
}

.btn-success:hover:not(:disabled) {
  background: #4ed886;
}

.btn-team-a { background: var(--team-a); border-color: var(--team-a); }
.btn-team-b { background: var(--team-b); border-color: var(--team-b); }
.btn-reveal { background: var(--green); border-color: var(--green); padding: 6px 10px; font-size: 13px; }
.btn-reveal:disabled { background: #2a4d36; border-color: #2a4d36; }

.host-team-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.host-team-card {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-team-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 210, 63, 0.3);
}

.host-team-card .name-input {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.host-team-card .score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.host-team-card .score {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold);
}

.host-team-card .strikes-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.host-team-card .strike-dot.host {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.host-team-card .action-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.host-team-card .action-row .btn {
  padding: 6px 10px;
  font-size: 12px;
}

/* Phase indicator */
.phase-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}

.phase-idle   { background: rgba(255, 255, 255, 0.15); color: var(--text-mute); }
.phase-playing { background: rgba(46, 204, 113, 0.25); color: var(--green); }
.phase-steal  { background: rgba(255, 210, 63, 0.25); color: var(--gold); }
.phase-roundEnd { background: rgba(211, 37, 37, 0.25); color: #ff8585; }

/* ---------- MODAL ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  background: var(--bg-deep);
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 20px;
  width: min(820px, 95vw);
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal h2 {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 2px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.editor-question {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-question .q-header {
  display: flex;
  gap: 8px;
  align-items: center;
}

.editor-question .q-header input[type="text"] {
  flex: 1;
}

.editor-question .q-header .mult {
  width: 60px;
}

.editor-question textarea,
.editor-question input[type="text"],
.editor-question input[type="number"] {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.editor-answer {
  display: grid;
  grid-template-columns: 1fr 80px auto;
  gap: 8px;
  align-items: center;
}

.editor-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.help-text {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.5;
}

/* Hidden file input */
.file-input {
  display: none;
}

/* ============================================================ */
/* ===================  MODO ONLINE  ========================== */
/* ============================================================ */

/* ---------- TABS DEL PICKER ---------- */

.mode-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
  margin-top: 16px;
  max-width: 100%;
}

.mode-tab {
  flex: 1;
  padding: 10px clamp(12px, 3vw, 24px);
  background: transparent;
  border: none;
  color: var(--text-mute);
  font-family: var(--font-display);
  font-size: clamp(11px, 2vw, 14px);
  letter-spacing: 2px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.mode-tab.is-active {
  background: var(--gold);
  color: #1a1a1a;
}

.mode-panel {
  margin-top: 18px;
  /*display: flex;*/
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 900px;
}

.mode-panel > p {
  font-size: 15px;
  color: var(--text-mute);
  text-align: center;
  line-height: 1.4;
  max-width: 100%;
}

.role-form {
  cursor: default !important;
}

.role-form:hover {
  transform: none !important;
  box-shadow: var(--shadow-card) !important;
}

.role-form input[type="text"] {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  text-align: center;
  letter-spacing: 4px;
  width: 100%;
  margin-top: 8px;
}

.role-form input[type="text"]:focus {
  border-color: var(--gold);
  outline: none;
}

.role-form .btn {
  width: 100%;
}

/* ---------- ROOM BADGE ---------- */

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-deep);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 6px 14px;
}

.room-badge .label {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-mute);
}

.room-badge .code {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 3px;
}


/* ---------- PLAYERS LIST (host) ---------- */

.host-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.host-players-list .empty-msg {
  color: var(--text-mute);
  font-size: 13px;
  text-align: center;
  padding: 10px;
  font-style: italic;
}

.player-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 14px;
}

.player-row.is-buzzed {
  background: rgba(255, 210, 63, 0.18);
  border-color: var(--gold);
}

.player-row .conn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.player-row .conn-dot.offline {
  background: var(--red);
}

.player-row .team-tag {
  font-family: var(--font-display);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 1px;
}

.team-tag.team-a-tag { background: var(--team-a); }
.team-tag.team-b-tag { background: var(--team-b); }

#playersCount {
  margin-left: 6px;
}

/* ---------- BUZZER PANEL (host) ---------- */

.host-buzz {
  background: rgba(255, 210, 63, 0.08);
  border: 1px solid rgba(255, 210, 63, 0.3);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.buzz-current {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold);
  text-align: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  letter-spacing: 2px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buzz-current .placeholder {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0;
}

.buzz-current .buzzed-team {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 4px;
  letter-spacing: 3px;
}

/* ---------- BOARD ADDITIONS ---------- */

.board-header {
  position: relative;
}

.buzz-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  background: var(--gold);
  color: #1a1a1a;
  padding: 32px 80px;
  border-radius: 24px;
  font-family: var(--font-display);
  text-align: center;
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.buzz-overlay.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.buzz-overlay .buzz-name {
  font-size: clamp(60px, 9vw, 130px);
  letter-spacing: 4px;
}

.buzz-overlay .buzz-sub {
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 5px;
  opacity: 0.7;
  margin-top: 10px;
}

/* ============================================================ */
/* ===================  VISTA PLAYER (mobile)  ================ */
/* ============================================================ */

.player-shell {
  position: fixed;
  inset: 0;
  flex-direction: column;
  padding: clamp(8px, 3vw, 16px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ---------- JOIN SCREEN ---------- */

.player-join {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 8px;
}

.player-join h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 10vw, 64px);
  color: var(--gold);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  letter-spacing: 4px;
  text-align: center;
}

.player-room-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 1px;
}

.player-room-info strong {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 3px;
}

.player-conn-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-mute);
}

.player-conn-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.player-conn-status.is-connected .dot {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.player-conn-status.compact .text {
  display: none;
}

#playerJoinName {
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 20px;
  text-align: center;
}

#playerJoinName:focus {
  border-color: var(--gold);
  outline: none;
}

.team-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.team-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 12px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 3px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
}

.team-button strong {
  font-size: 56px;
  line-height: 1;
  color: var(--gold);
}

.team-button.team-a-bg { background: var(--team-a); }
.team-button.team-b-bg { background: var(--team-b); }

.team-button.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.3), var(--shadow-card);
  transform: translateY(-2px);
}

.player-join-submit {
  padding: 16px 24px;
  font-size: 18px;
  letter-spacing: 3px;
  font-family: var(--font-display);
}

/* ---------- IN-GAME SCREEN ---------- */

.player-game {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.player-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.player-game-header .player-name {
  font-weight: 700;
}

.player-team-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
}

.player-team-badge.team-a { background: var(--team-a); }
.player-team-badge.team-b { background: var(--team-b); }

.player-question {
  background: linear-gradient(180deg, var(--gold) 0%, #f5b800 100%);
  color: #1a1a1a;
  padding: 14px 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: clamp(15px, 4.5vw, 20px);
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.3;
}

.player-answers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-answer-card {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-hidden);
  border: 2px solid #0a2154;
  border-radius: 8px;
  font-family: var(--font-display);
  transition: background 0.2s;
}

.player-answer-card.revealed {
  background: var(--card-revealed);
  border-color: var(--gold);
}

.player-answer-card .num {
  color: var(--gold);
  text-align: center;
  font-size: 18px;
}

.player-answer-card .text {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
}

.player-answer-card.revealed .text {
  opacity: 1;
}

.player-answer-card .pts {
  color: var(--gold);
  font-size: 16px;
  background: var(--bg-deep);
  padding: 2px 10px;
  border-radius: 5px;
  opacity: 0;
}

.player-answer-card.revealed .pts {
  opacity: 1;
}

.player-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.mini-team {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-team .mini-name {
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 2px;
}

.mini-team .mini-score {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--gold);
}

.mini-pot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-pot .mini-label {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 2px;
}

.mini-pot .mini-amount {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
}

/* ---------- BUZZER ---------- */

.buzzer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(8px, 2vw, 16px) 0 clamp(12px, 3vw, 24px);
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 26, 58, 0.9) 30%);
}

.buzzer {
  width: min(70vw, 60vh, 320px);
  height: min(70vw, 60vh, 320px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff6b6b 0%, var(--red) 50%, #7d1414 100%);
  border: 8px solid #fff;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(20px, 5vw, 28px);
  letter-spacing: 4px;
  box-shadow:
    0 12px 0 #6b1414,
    0 18px 40px rgba(0, 0, 0, 0.5),
    inset 0 -8px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s, box-shadow 0.08s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.buzzer-icon {
  font-size: clamp(32px, 8vw, 48px);
}

.buzzer:active:not(:disabled) {
  transform: translateY(8px);
  box-shadow:
    0 4px 0 #6b1414,
    0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.buzzer:disabled {
  background: radial-gradient(circle at 30% 30%, #555 0%, #333 50%, #1a1a1a 100%);
  color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 6px 0 #1a1a1a,
    0 10px 20px rgba(0, 0, 0, 0.3),
    inset 0 -4px 12px rgba(0, 0, 0, 0.3);
}

.buzzer.is-mine {
  background: radial-gradient(circle at 30% 30%, #f5e88a 0%, var(--gold) 50%, #c4a01a 100%);
  color: #1a1a1a;
  animation: buzzPulse 0.8s ease-in-out infinite;
}

@keyframes buzzPulse {
  0%, 100% { box-shadow: 0 12px 0 #6b5a0a, 0 18px 40px rgba(255, 210, 63, 0.4), inset 0 -8px 20px rgba(0, 0, 0, 0.2); }
  50%      { box-shadow: 0 12px 0 #6b5a0a, 0 18px 60px rgba(255, 210, 63, 0.8), inset 0 -8px 20px rgba(0, 0, 0, 0.2); }
}


.buzzer-state {
  font-size: 14px;
  color: var(--text-mute);
  letter-spacing: 2px;
  text-align: center;
  min-height: 20px;
}

.buzzer-state.is-mine {
  color: var(--gold);
  font-weight: 700;
}

.buzzer-state.is-other {
  color: var(--red);
}

/* ============================================================ */
/* ===================  MODE BAR + ALERTS  ==================== */
/* ============================================================ */

.host-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.host-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.mode-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  flex-wrap: wrap;
}

.mode-bar-status {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.mode-bar-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.mode-bar-dot.is-ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.15), 0 0 12px rgba(46, 204, 113, 0.6);
  animation: dotPulseOk 2s ease-in-out infinite;
}

.mode-bar-dot.is-waiting {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.15), 0 0 12px rgba(255, 210, 63, 0.6);
  animation: dotPulseWait 1.2s ease-in-out infinite;
}

.mode-bar-dot.is-error {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(211, 37, 37, 0.15), 0 0 12px rgba(211, 37, 37, 0.6);
  animation: dotPulseError 0.6s ease-in-out infinite;
}

@keyframes dotPulseOk {
  0%, 100% { box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.15), 0 0 12px rgba(46, 204, 113, 0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0.05), 0 0 20px rgba(46, 204, 113, 0.9); }
}

@keyframes dotPulseWait {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.15), 0 0 12px rgba(255, 210, 63, 0.4); }
  50%      { box-shadow: 0 0 0 10px rgba(255, 210, 63, 0.05), 0 0 24px rgba(255, 210, 63, 1); }
}

@keyframes dotPulseError {
  0%, 100% { box-shadow: 0 0 0 4px rgba(211, 37, 37, 0.15), 0 0 12px rgba(211, 37, 37, 0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(211, 37, 37, 0.05), 0 0 24px rgba(211, 37, 37, 1); }
}

.mode-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mode-bar-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--text);
}

.mode-bar-detail {
  font-size: 13px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 480px;
}

.mode-bar-room {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-deep);
  border: 2px solid var(--gold);
  padding: 4px 10px;
  border-radius: 8px;
}

.mode-bar-room .label {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-mute);
}

.mode-bar-room strong {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
  letter-spacing: 3px;
}

.btn-icon {
  padding: 4px 8px;
  background: rgba(255, 210, 63, 0.15);
  border: 1px solid rgba(255, 210, 63, 0.3);
}

.mode-bar-toggle {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--font-display);
  letter-spacing: 1px;
  padding: 10px 16px;
}

.mode-bar-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- ALERT BANNER (auto-fallback / info) ---------- */

.alert-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 14px;
}

.alert-banner.is-warning {
  background: rgba(255, 210, 63, 0.15);
  border-color: var(--gold);
  color: var(--gold-soft);
}

.alert-banner.is-info {
  background: rgba(46, 204, 113, 0.15);
  border-color: var(--green);
  color: #d6f5e1;
}

.alert-banner .alert-icon {
  font-size: 22px;
}

.alert-banner .alert-text {
  flex: 1;
}

.alert-banner .alert-actions {
  display: flex;
  gap: 6px;
}

/* ---------- RESPONSIVE ADJUSTMENTS ---------- */

/* Laptops chicas / tablets landscape — colapsa el grid principal */
@media (max-width: 1100px) {
  .host-main {
    grid-template-columns: 1fr;
  }
  .host-panel {
    max-height: none;
  }
}

/* Tablets / phones landscape */
@media (max-width: 720px) {
  .role-buttons {
    flex-direction: column;
  }
  .role-button {
    width: 100%;
  }
  .mode-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .mode-bar-detail {
    white-space: normal;
  }
  .host-header-top {
    flex-direction: column;
    align-items: stretch;
  }
  .host-controls-row {
    flex-wrap: wrap;
  }
  .host-controls-row .btn {
    flex: 1 1 auto;
  }
}

/* Phones */
@media (max-width: 480px) {
  body, html {
    font-size: 14px;
  }
  .modal {
    padding: 12px;
  }
  .editor-question .q-header {
    flex-wrap: wrap;
  }
  .editor-answer {
    grid-template-columns: 1fr 60px auto;
  }
  .host-team-card .action-row .btn {
    font-size: 11px;
    padding: 5px 8px;
  }
  .player-room-info {
    font-size: 12px;
  }
  .team-button {
    padding: 16px 8px;
  }
  .team-button strong {
    font-size: 44px;
  }
}

/* Board en pantallas chicas (laptop como tablero) */
@media (max-width: 900px) {
  .board-answers {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Tablero portrait / muy chico — score wraps */
@media (max-width: 600px) {
  .board-scoreboard {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .board-pot-mid {
    grid-column: 1 / -1;
    grid-row: 1;
    flex-direction: row;
    gap: 10px;
  }
  .team#teamABoard {
    grid-row: 2;
  }
  .team#teamBBoard {
    grid-row: 2;
  }
}

/* ---------- TIMER ---------- */
.timer-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 2px;
}

.timer-duration-input {
  width: 60px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  text-align: center;
}

.team-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--gold);
  letter-spacing: 1px;
}

.team-timer .label {
  font-size: 18px;
}

.team-timer.is-low {
  background: rgba(211, 37, 37, 0.45);
  border-color: #fff;
  color: #fff;
  animation: timerPulse 0.5s ease-in-out infinite alternate;
}

.board-timer {
  position: absolute;
  top: clamp(12px, 1.5vw, 22px);
  right: clamp(14px, 2vw, 28px);
  z-index: 60;
  min-width: clamp(90px, 9vw, 140px);
  padding: clamp(6px, 0.8vw, 12px) clamp(14px, 1.8vw, 26px);
  background: rgba(0, 0, 0, 0.55);
  border: 3px solid var(--gold);
  border-radius: 14px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(34px, 5.5vw, 72px);
  text-align: center;
  letter-spacing: 2px;
  box-shadow: var(--shadow-card);
}

.board-timer.is-low {
  background: var(--red);
  border-color: #fff;
  color: #fff;
  animation: timerPulse 0.5s ease-in-out infinite alternate;
}

@keyframes timerPulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* Click en strike-dot (solo en host card) */
.host-team-card .strike-dot {
  cursor: pointer;
}
.host-team-card .strike-dot:hover {
  transform: scale(1.2);
}