:root {
  --bg: #100622;
  --bg-2: #20053c;
  --panel: rgba(18, 12, 36, 0.82);
  --panel-border: rgba(255, 193, 99, 0.24);
  --text: #f6e8ff;
  --muted: #d7bfdc;
  --gold: #ffca55;
  --gold-deep: #ff9f1c;
  --blue: #1a4fff;
  --blue-deep: #112d9d;
  --violet: #7f3fff;
  --pink: #ff4aa2;
  --danger: #ff5d6c;
  --green: #00c389;
  --shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
  --radius: 28px;
  --font-display: "Trebuchet MS", "Arial Black", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(123, 78, 255, 0.35), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(255, 74, 162, 0.22), transparent 20%),
    linear-gradient(180deg, #1e0840 0%, #11051f 45%, #08030f 100%);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

body.menu-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.main-menu-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  background:
    linear-gradient(90deg, rgba(4, 2, 12, 0.88) 0%, rgba(7, 4, 20, 0.58) 45%, rgba(5, 2, 12, 0.24) 100%),
    url("./assets/stage.png") center / cover no-repeat;
}

.main-menu-screen[hidden] {
  display: none;
}

.main-menu-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 2, 10, 0.18), rgba(4, 2, 10, 0.54)),
    radial-gradient(circle at 36% 50%, rgba(255, 202, 85, 0.18), transparent 24%);
  pointer-events: none;
}

.menu-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  background: rgba(12, 8, 30, 0.92);
  border-bottom: 1px solid rgba(255, 196, 64, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.menu-header-actions {
  display: flex;
  gap: 8px;
}

.menu-header-actions .button {
  padding: 5px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.main-menu-logo {
  max-height: 92px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.main-menu-content {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.main-menu-actions {
  position: absolute;
  bottom: clamp(32px, 5vh, 72px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
}

.name-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 2, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.name-modal-overlay[hidden] {
  display: none;
}

.alert-modal {
  max-width: 400px;
  text-align: center;
}

.alert-modal-message {
  color: #f7ddff;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.scoreboard-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scoreboard-screen[hidden] {
  display: none;
}

.scoreboard-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.scoreboard-menu-btn {
  position: absolute;
  top: 16px;
  left: 16px;
}

.name-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: linear-gradient(160deg, #1a0e3a, #0e0820);
  border: 1px solid rgba(255, 196, 64, 0.32);
  border-radius: 18px;
  padding: 36px 48px 40px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.04);
  min-width: 360px;
}

.name-modal-logo {
  max-width: 260px;
  height: auto;
}

.name-modal-input {
  width: 100%;
  padding: 12px 18px;
  font-size: 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 196, 64, 0.4);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  outline: none;
  text-align: center;
  box-sizing: border-box;
}

.name-modal-input:focus {
  border-color: rgba(255, 196, 64, 0.9);
  background: rgba(255, 255, 255, 0.11);
}

.name-modal-submit {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
}

@keyframes menu-btn-pulse {
  0%, 100% { box-shadow: 0 0 18px 4px rgba(255, 180, 30, 0.55), 0 0 48px 12px rgba(255, 140, 0, 0.28); }
  50%       { box-shadow: 0 0 36px 10px rgba(255, 200, 60, 0.85), 0 0 80px 24px rgba(255, 160, 0, 0.48); }
}

#start-game-btn {
  padding: 22px 56px;
  font-size: 2rem;
  animation: menu-btn-pulse 2s ease-in-out infinite;
}

.app-shell {
  width: min(1500px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.stage-shell {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 36px;
  border: 1px solid rgba(255, 202, 85, 0.24);
  background:
    radial-gradient(circle at top center, rgba(255, 215, 108, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(32, 8, 64, 0.96), rgba(11, 5, 23, 0.98));
  box-shadow: var(--shadow);
}

.stage-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.16;
  pointer-events: none;
}

.stage-lights {
  position: absolute;
  top: 110px;
  width: 180px;
  height: 440px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 74, 162, 0.95), rgba(118, 55, 255, 0.25)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7) 8px, transparent 8px, transparent 26px);
  filter: blur(0.2px);
  opacity: 0.28;
}

.stage-lights-left {
  left: -60px;
}

.stage-lights-right {
  right: -60px;
}

.show-header,
.show-actions,
.team-score-row,
.panel-heading,
.column-heading,
.fast-money-footer,
.board-modal-header,
.board-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.show-header {
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}

.eyebrow,
.panel-label,
.micro-label,
.panel-chip,
.monitor-label,
.family-side-label,
.faceoff-title {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffd47f;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 0.92;
}

.subtitle {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
}

.show-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  color: white;
  font-weight: 800;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.button:hover,
.button:focus-visible,
.answer-tile:hover,
.answer-tile:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.primary {
  background: linear-gradient(180deg, #ffca55, #ff9f1c);
  color: #251045;
}

.secondary {
  background: linear-gradient(180deg, #506dff, #2540cf);
}

.accent {
  background: linear-gradient(180deg, #8d4dff, #622df0);
}

.danger {
  background: linear-gradient(180deg, #ff7e7e, #ef3d56);
}

.ghost {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.main-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  align-items: end;
  gap: 18px;
  min-height: 760px;
}

.family-wing {
  display: grid;
  gap: 18px;
  align-self: stretch;
  align-content: center;
}

.family-score-panel,
.family-podium,
.control-panel,
.board-modal-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.family-score-panel {
  border-radius: 30px;
  padding: 16px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(20, 34, 110, 0.96), rgba(10, 15, 62, 0.98));
}

.family-score {
  display: block;
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-family: var(--font-display);
  color: #fff6bf;
}

.family-podium {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 26px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(37, 78, 255, 0.9), rgba(21, 36, 112, 0.96));
}

.podium-top {
  width: 86%;
  height: 10px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff1b0, #ffca55, #fff1b0);
}

.podium-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.podium-status {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff4c8;
  font-size: 0.82rem;
  font-weight: 700;
}

.board-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.board-halo {
  position: absolute;
  inset: 40px 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 202, 85, 0.18), transparent 60%);
  filter: blur(10px);
}

.main-board {
  position: relative;
  width: min(900px, 100%);
  padding: 28px 24px 24px;
  border-radius: 44px 44px 120px 120px;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #42106c 0%, #21063d 35%, #12061f 100%);
  border: 6px solid #ffca55;
  box-shadow:
    0 0 0 10px rgba(255, 159, 28, 0.2),
    inset 0 0 0 3px rgba(255, 240, 180, 0.24),
    var(--shadow);
}

.main-board::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 34px 34px 106px 106px;
  background-image: radial-gradient(rgba(255, 209, 91, 0.78) 1.4px, transparent 1.4px);
  background-size: 16px 16px;
  opacity: 0.34;
  pointer-events: none;
}

.board-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 140px 1fr 140px;
  gap: 18px;
  align-items: center;
}

.phase-chip,
.board-head-screen {
  border-radius: 20px;
  border: 2px solid rgba(255, 229, 157, 0.55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.phase-chip {
  padding: 16px 12px;
  text-align: center;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(32, 73, 255, 0.96), rgba(15, 27, 99, 0.98));
}

.board-head-screen {
  padding: 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(41, 82, 255, 0.98), rgba(8, 23, 102, 0.98));
}

.board-head-screen span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: #c5d6ff;
}

.board-head-screen strong {
  display: block;
  margin-top: 4px;
  font-size: 2.6rem;
  font-family: var(--font-display);
  color: #fff9cf;
}

.question-monitor {
  position: relative;
  z-index: 1;
  margin: 18px auto 22px;
  max-width: 620px;
  padding: 20px 24px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(27, 79, 255, 0.92), rgba(14, 31, 126, 0.98));
  border: 2px solid rgba(255, 232, 166, 0.56);
}

.question-monitor h2 {
  margin: 8px 0 8px;
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  color: #fffef5;
}

.monitor-note {
  margin: 0;
  color: #d2e3ff;
}

.faceoff-lane {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 120px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.faceoff-player,
.host-podium {
  min-height: 108px;
  padding: 16px;
  border-radius: 24px;
  text-align: center;
  background: rgba(12, 17, 48, 0.8);
  border: 1px solid rgba(255, 219, 119, 0.28);
}

.faceoff-player strong {
  display: block;
  margin-top: 10px;
  font-size: 1.08rem;
}

.host-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.host-console {
  width: 58px;
  height: 58px;
  margin: 14px auto 0;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffca55, #ff9f1c);
  color: #2a1147;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.survey-board {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.answer-tile {
  min-height: 96px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(78, 143, 255, 0.98), rgba(12, 41, 146, 1));
  color: white;
  border: 2px solid rgba(231, 238, 255, 0.48);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.28);
}

.answer-tile.revealed {
  background:
    linear-gradient(180deg, rgba(32, 114, 255, 0.98), rgba(12, 178, 131, 0.98));
}

.rank {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-family: var(--font-display);
}

.answer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  min-height: 42px;
  margin-top: 12px;
}

.answer-text {
  font-size: 1.25rem;
  font-family: var(--font-display);
  line-height: 1;
  text-transform: uppercase;
}

.answer-points {
  font-size: 1.8rem;
  font-family: var(--font-display);
  color: #fff6bf;
}

.floor-glow {
  position: relative;
  z-index: 1;
  width: min(420px, 72%);
  height: 110px;
  margin: 24px auto 0;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 68, 144, 0.94) 0%, rgba(255, 68, 144, 0.72) 35%, rgba(255, 142, 56, 0.38) 60%, transparent 75%);
  box-shadow: 0 0 50px rgba(255, 74, 162, 0.24);
}

.control-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.control-panel {
  padding: 20px;
  border-radius: 28px;
}

.fast-money-panel {
  grid-column: 1 / -1;
}

.panel-chip {
  color: #d5ccff;
}

.control-grid {
  display: grid;
  gap: 10px;
}

.control-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.strike-display {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 16px 0 18px;
}

.strike {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 2rem;
  font-family: var(--font-display);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 113, 138, 0.18);
  color: rgba(255, 121, 149, 0.34);
}

.strike.active {
  color: white;
  background: linear-gradient(180deg, #ff7e7e, #ef3d56);
  border-color: transparent;
}

.team-panel {
  display: grid;
  gap: 14px;
}

.team-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 202, 85, 0.18);
}

.team-card label {
  display: block;
  margin-bottom: 8px;
  color: #f0deff;
  font-size: 0.9rem;
}

.team-card input,
.fast-money-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(5, 3, 16, 0.42);
  color: white;
}

.team-card-a {
  box-shadow: inset 0 0 0 1px rgba(255, 170, 77, 0.08);
}

.team-card-b {
  box-shadow: inset 0 0 0 1px rgba(77, 175, 255, 0.08);
}

.team-score-row strong {
  font-size: 2rem;
  font-family: var(--font-display);
}

.team-points-label {
  color: var(--muted);
}

.fast-money-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.fast-money-column {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 202, 85, 0.18);
}

.column-heading strong,
.big-total,
.popup-score-box strong {
  font-family: var(--font-display);
}

.fast-money-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.fast-money-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fast-money-question {
  font-weight: 700;
}

.fast-money-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.big-total {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
}

.board-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.board-modal[hidden] {
  display: none;
}

.board-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 10, 0.78);
  backdrop-filter: blur(10px);
}

.board-modal-card {
  position: relative;
  width: min(1080px, calc(100% - 24px));
  margin: 24px auto;
  padding: 24px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(52, 14, 88, 0.98), rgba(12, 6, 24, 0.98));
}

.board-modal-header h3 {
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 2vw, 2.3rem);
}

.popup-score-box {
  padding: 12px 16px;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 202, 85, 0.2);
}

.popup-score-box strong {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
}

.popup-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.popup-board .answer-tile {
  min-height: 118px;
  padding: 18px 22px;
}

.popup-board .answer-text {
  font-size: 1.65rem;
}

.popup-board .answer-points {
  font-size: 2.4rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .main-stage {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
  }

  .family-wing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-wing-right {
    order: 3;
  }

  .board-stage {
    order: 2;
  }

  .control-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 12px, 100%);
    padding-top: 12px;
  }

  .stage-shell,
  .control-panel,
  .board-modal-card {
    padding: 18px;
    border-radius: 24px;
  }

  .show-header,
  .show-actions,
  .panel-heading,
  .fast-money-footer,
  .board-modal-header,
  .board-modal-actions {
    flex-wrap: wrap;
  }

  .show-actions {
    justify-content: flex-start;
  }

  .board-header,
  .faceoff-lane,
  .survey-board,
  .popup-board,
  .control-layout,
  .control-grid.two-up,
  .fast-money-layout,
  .family-wing {
    grid-template-columns: 1fr;
  }

  .answer-text {
    font-size: 1rem;
  }

  .popup-board .answer-text {
    font-size: 1.2rem;
  }

  .popup-board .answer-points {
    font-size: 1.8rem;
  }

  .fast-money-row {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PLAYER GAME SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.game-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  background: #060214;
}

.game-screen[hidden] { display: none; }

.gs-team-panel {
  width: clamp(110px, 14vw, 180px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 10px;
  background: rgba(10, 4, 30, 0.7);
  border-right: 1px solid rgba(255, 196, 64, 0.18);
}

#gs-panel-b {
  border-right: none;
  border-left: 1px solid rgba(255, 196, 64, 0.18);
}

.gs-team-name {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.6vw, 1.1rem);
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  word-break: break-word;
}

.gs-team-score {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 200, 80, 0.5);
}

.gs-team-strikes {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gs-persistent-strike {
  width: clamp(60px, 8vw, 100px);
  height: auto;
}

.gs-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 8px;
  min-width: 0;
}

.gs-board-wrap {
  position: relative;
  width: 100%;
  max-width: min(740px, calc((100vh - 110px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: url('assets/scoreboard.png') center / contain no-repeat;
  flex-shrink: 0;
}

.gs-tiles {
  position: absolute;
  top: 24%;
  left: 15.5%;
  right: 15.5%;
  bottom: 11%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  grid-auto-flow: column;
  gap: 0.5% 1%;
}

.gs-strike-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gs-strike-flash[hidden] { display: none; }

.gs-strike-flash img {
  max-width: 65%;
  max-height: 65%;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 60, 60, 0.8));
  animation: strike-pop 0.3s ease;
}

@keyframes strike-pop {
  0%   { transform: scale(1.5); opacity: 0; }
  50%  { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.gs-round-bank {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.5vw, 1rem);
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 28px;
  background: rgba(10, 4, 40, 0.9);
  border: 2px solid rgba(255, 196, 64, 0.5);
  border-radius: 8px;
  flex-shrink: 0;
}

.gs-round-bank-value {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  display: block;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 200, 80, 0.6);
  line-height: 1;
}

.gs-question {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.2vw, 1.4rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  max-width: 740px;
  width: 100%;
  margin: 0;
  padding: 12px 20px;
  background: rgba(10, 4, 40, 0.88);
  border: 2px solid rgba(255, 196, 64, 0.5);
  border-radius: 10px;
  box-sizing: border-box;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.gs-menu-btn {
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: 0.8rem;
  padding: 6px 14px;
  opacity: 0.5;
}

.gs-menu-btn:hover { opacity: 1; }

/* Flip tiles */
.gs-tile {
  perspective: 700px;
  min-height: 0;
  min-width: 0;
}

.gs-tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

@keyframes slot-roll {
  0%   { transform: rotateX(0deg); }
  100% { transform: rotateX(-900deg); }
}

.gs-tile-inner.rolling {
  animation: slot-roll 1.1s cubic-bezier(0.15, 0.8, 0.35, 1) forwards;
}

.gs-tile-front,
.gs-tile-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.gs-tile-front {
  background: linear-gradient(160deg, #0d2a7a, #061650);
  border: 1px solid rgba(80, 130, 255, 0.5);
}

.gs-tile-num {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.2vw, 1.8rem);
  font-weight: 900;
  color: #6fa8ff;
}

.gs-tile-back {
  background: linear-gradient(160deg, #2a1060, #180840);
  border: 1px solid var(--gold);
  transform: rotateX(180deg);
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
}

.gs-tile-text {
  font-family: var(--font-display);
  font-size: clamp(0.5rem, 1.1vw, 0.85rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.15;
}

.gs-tile-pts {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.7vw, 1.3rem);
  font-weight: 900;
  color: var(--gold);
}


/* ═══════════════════════════════════════════════════════════════════════════
   HOST SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

.host-body {
  min-height: 100vh;
}

.host-screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.host-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(8, 4, 24, 0.96);
  border-bottom: 1px solid rgba(255, 196, 64, 0.28);
  flex-wrap: wrap;
}

.host-header-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.host-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}

.host-team-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #bbb;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.host-team-btn.active-team {
  background: linear-gradient(180deg, #ffca55, #ff9f1c);
  color: #251045;
  border-color: transparent;
  font-weight: 800;
}

.host-big-strike {
  font-size: 1.1rem;
  font-weight: 900;
  padding: 10px 28px;
  letter-spacing: 0.04em;
}

.host-game-area {
  display: flex;
  flex: 1;
  align-items: stretch;
}

.host-team-panel {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 10px;
  background: rgba(10, 4, 30, 0.6);
  border-right: 1px solid rgba(255, 196, 64, 0.14);
}

#host-panel-b {
  border-right: none;
  border-left: 1px solid rgba(255, 196, 64, 0.14);
}

.host-team-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  text-transform: uppercase;
  word-break: break-word;
}

.host-team-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.host-team-strikes {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.host-persistent-strike {
  width: 80px;
  height: auto;
}

.host-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  gap: 14px;
  min-width: 0;
}

.host-board-wrap {
  width: 100%;
  max-width: 760px;
}

.host-no-question {
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  padding: 40px 0;
  font-style: italic;
}

.host-tiles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.host-tile {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(20, 10, 50, 0.8);
  border: 1px solid rgba(100, 80, 180, 0.4);
  border-radius: 8px;
  transition: opacity 0.3s, border-color 0.3s;
}

.host-tile.revealed {
  opacity: 0.42;
  border-color: rgba(0, 195, 137, 0.4);
}

.host-tile-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  color: #6fa8ff;
  text-align: center;
}

.host-tile-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0e8ff;
}

.host-tile-pts {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}

.host-tile-reveal {
  padding: 5px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
}

.host-tile-reveal:disabled {
  background: var(--green) !important;
  opacity: 1;
  color: #fff;
}

.host-question-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #f0d8ff;
  text-align: center;
  max-width: 700px;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  background: rgba(20, 8, 50, 0.6);
  border: 1px solid rgba(255, 196, 64, 0.2);
  border-radius: 10px;
  box-sizing: border-box;
}

/* Menu header left-side group */
.menu-header-left {
  display: flex;
  gap: 8px;
}

.menu-header-left .button {
  padding: 5px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}


/* ── PHASE CONTROLS ─────────────────────────────────────────────────────────── */

.host-phase-controls {
  width: 100%;
  max-width: 760px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phase-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(20, 10, 50, 0.7);
  border: 1px solid rgba(255, 196, 64, 0.25);
  border-radius: 12px;
}

.phase-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #e8d8ff;
  text-align: center;
}

.phase-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.phase-btn {
  min-width: 160px;
  font-size: 0.9rem;
}

/* Playing phase — gold accent border */
.phase-playing {
  border-color: rgba(255, 196, 64, 0.55);
  background: rgba(30, 16, 60, 0.8);
}

.bank-num {
  color: var(--gold);
  font-size: 1.1em;
}

/* Steal phase — red/orange highlight */
.phase-steal {
  border-color: rgba(255, 80, 60, 0.6);
  background: rgba(50, 10, 10, 0.85);
  animation: steal-pulse 1.2s ease-in-out infinite;
}

@keyframes steal-pulse {
  0%, 100% { box-shadow: 0 0 0   0 rgba(255, 80, 60, 0); }
  50%       { box-shadow: 0 0 18px 4px rgba(255, 80, 60, 0.45); }
}

.steal-label {
  color: #ff8060;
  font-size: 1.15rem;
}

/* Round-end */
.phase-round-end {
  border-color: rgba(0, 195, 137, 0.5);
  background: rgba(0, 30, 20, 0.8);
}

.round-end-msg {
  color: var(--green);
  font-size: 1.05rem;
}

/* Round bank in header */
.host-bank-group {
  gap: 8px;
}

.host-round-bank-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  min-width: 3ch;
  text-align: center;
}

/* Per-team strike button */
.host-team-strike {
  width: 100%;
  padding: 12px 8px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  border-radius: 10px;
  margin-top: 8px;
}

.host-team-strike:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Active / steal panel highlights */
.host-team-panel.active-panel {
  background: rgba(20, 8, 60, 0.85);
  border-color: rgba(255, 196, 64, 0.45);
  box-shadow: inset 0 0 24px rgba(255, 196, 64, 0.08);
}

.host-team-panel.steal-panel {
  background: rgba(40, 6, 6, 0.85);
  border-color: rgba(255, 80, 60, 0.5);
  box-shadow: inset 0 0 24px rgba(255, 80, 60, 0.1);
}

/* Locked tiles (non-playing phases) */
.host-tiles.tiles-locked .host-tile-reveal {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
