/* Codenames AI - Styles */

:root {
  --red: #d32f2f;
  --red-light: #ef5350;
  --blue: #1976d2;
  --blue-light: #42a5f5;
  --neutral: #9e9e9e;
  --neutral-light: #bdbdbd;
  --assassin: #212121;
  --bg: #fafafa;
  --card-bg: #fff;
  --text: #212121;
  --text-light: #757575;
  --border: #e0e0e0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.header {
  background: var(--text);
  color: white;
  padding: 1rem;
  text-align: center;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Home Screen */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  gap: 2rem;
  padding: 2rem;
}

.home h1 {
  font-size: 3rem;
  color: var(--text);
}

.home-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn:active {
  transform: translateY(0);
}

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

.btn-blue {
  background: var(--blue);
  color: white;
}

.btn-green {
  background: #4caf50;
  color: white;
}

.btn-green:hover {
  background: #43a047;
}

.btn-neutral {
  background: var(--neutral);
  color: white;
}

.btn-outline {
  background: white;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
}

/* Radio Toggle */
.radio-toggle {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.radio-option {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  font-weight: 600;
}

.radio-option input[type="radio"] {
  margin: 0;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
}

/* Room Code Display */
.room-code {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.5rem;
  font-family: monospace;
  background: var(--text);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
}

/* Game Board */
.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

.card {
  aspect-ratio: 1.85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  background: var(--card-bg);
  border: 2px solid var(--border);
  word-break: break-word;
}

.card:hover:not(.revealed):not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card.revealed {
  cursor: default;
  color: white;
}

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

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

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

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

/* Spymaster view - show colors before reveal */
.card.spymaster-view.red {
  border-color: var(--red);
  box-shadow: inset 0 0 0 3px var(--red-light);
}

.card.spymaster-view.blue {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 3px var(--blue-light);
}

.card.spymaster-view.neutral {
  border-color: var(--neutral);
  box-shadow: inset 0 0 0 3px var(--neutral-light);
}

.card.spymaster-view.assassin {
  border-color: var(--assassin);
  box-shadow: inset 0 0 0 3px var(--assassin);
  color: var(--red);
}

.card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Game Info */
.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.team-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.team-score.red {
  color: var(--red);
}

.team-score.blue {
  color: var(--blue);
}

.current-turn {
  text-align: center;
}

.turn-indicator {
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.turn-indicator.red {
  background: var(--red-light);
  color: white;
}

.turn-indicator.blue {
  background: var(--blue-light);
  color: white;
}

/* Clue Display */
.clue-display {
  text-align: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  margin: 1rem auto;
  max-width: 400px;
}

.clue-word {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.clue-number {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-light);
}

.guesses-remaining {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Clue Input */
.clue-input {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 1rem auto;
}

.clue-input input {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
}

.clue-input input[type="number"] {
  width: 80px;
  flex: none;
}

/* Setup Screen */
.setup {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.setup h2 {
  margin-bottom: 1.5rem;
}

.role-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.role-item {
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 2px solid var(--border);
}

.role-item.red {
  border-color: var(--red-light);
}

.role-item.blue {
  border-color: var(--blue-light);
}

.role-item h4 {
  margin-bottom: 0.5rem;
}

/* Join Screen */
.join-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.join-card {
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 3px solid;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s;
}

.join-card:hover {
  transform: translateY(-4px);
}

.join-card.red {
  border-color: var(--red);
}

.join-card.blue {
  border-color: var(--blue);
}

.join-card h3 {
  margin-bottom: 1rem;
}

.join-card.taken {
  opacity: 0.5;
  cursor: not-allowed;
}

.join-card.taken:hover {
  transform: none;
}

/* History */
.history {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}

.history h3 {
  margin-bottom: 1rem;
}

.history-item {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: block;
}

.history-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.history-guesses {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.guess-chip {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  background: var(--neutral);
}

.guess-chip.red {
  background: var(--red);
}

.guess-chip.blue {
  background: var(--blue);
}

.guess-chip.neutral {
  background: var(--neutral);
}

.guess-chip.assassin {
  background: #111;
}

.history-item .team-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.history-item .team-badge.red {
  background: var(--red);
}

.history-item .team-badge.blue {
  background: var(--blue);
}

/* Actions */
.actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

/* Winner Overlay */
.winner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.winner-modal {
  background: white;
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
}

.winner-modal h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.winner-modal.red h2 {
  color: var(--red);
}

.winner-modal.blue h2 {
  color: var(--blue);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.5rem;
  line-height: 1;
  border-radius: 50%;
  transition: background 0.15s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.winner-modal {
  position: relative;
}

.winner-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Winner Banner (shown after dismissing modal) */
.winner-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  margin: 0 auto 1rem;
  max-width: 600px;
  border-radius: 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.winner-banner.red {
  background: linear-gradient(135deg, var(--red-light), var(--red));
  color: white;
}

.winner-banner.blue {
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  color: white;
}

.winner-banner .btn-outline {
  background: white;
  color: var(--text);
}

/* Host View */
.host-view {
  padding: 2rem;
}

.host-view .board {
  max-width: 1150px;
}

.host-view .card {
  font-size: 1.5rem;
  aspect-ratio: 1.65;
}

/* Mobile */
@media (max-width: 600px) {
  .board {
    gap: 0.25rem;
  }

  .card {
    font-size: 0.7rem;
    padding: 0.25rem;
  }

  .home h1 {
    font-size: 2rem;
  }

  .room-code {
    font-size: 2rem;
  }

  .role-config,
  .join-options {
    grid-template-columns: 1fr;
  }
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-size: 1.2rem;
  color: var(--text-light);
}

/* Error */
.error {
  background: #ffebee;
  color: var(--red);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  text-align: center;
}

/* AI Thinking Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Live Games List */
.live-games {
  margin-top: 3rem;
  width: 100%;
  max-width: 600px;
}

.live-games h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text);
}

.loading-text,
.no-games {
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--blue);
}

.game-card.setup {
  border-left: 4px solid #ff9800;
}

.game-card.playing {
  border-left: 4px solid #4caf50;
}

.game-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.room-code-small {
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15rem;
  background: var(--text);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.game-phase {
  font-size: 0.85rem;
  font-weight: 500;
}

.game-phase.setup {
  color: #ff9800;
}

.game-phase.playing {
  color: #4caf50;
}

.game-card-body {
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
}

.game-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.stat-value {
  font-size: 1rem;
  font-weight: 600;
}

.stat-value.highlight {
  color: var(--blue);
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.time-ago {
  font-size: 0.8rem;
  color: var(--text-light);
}

.join-hint {
  font-size: 0.85rem;
  color: var(--blue);
  font-weight: 500;
}

/* Game History */
.game-history {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}

.game-history h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 4px solid var(--neutral);
}

.history-card.red {
  border-left-color: var(--red);
}

.history-card.blue {
  border-left-color: var(--blue);
}

.history-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.winner-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.winner-badge.red {
  background: var(--red);
  color: white;
}

.winner-badge.blue {
  background: var(--blue);
  color: white;
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.history-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-score {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-weight: 600;
}

.score-team {
  font-size: 1.1rem;
}

.score-team.red {
  color: var(--red);
}

.score-team.blue {
  color: var(--blue);
}

.score-divider {
  color: var(--text-light);
  font-size: 0.9rem;
}

.score-label {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
  margin-left: 0.25rem;
}

.history-stats-brief {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Matchup display for models (visible at top level) */
.history-matchup {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.5rem;
  background: rgba(0,0,0,0.02);
  border-radius: 6px;
}

.matchup-team {
  flex: 1;
  min-width: 0;
}

.matchup-team.red {
  text-align: left;
}

.matchup-team.blue {
  text-align: right;
}

.matchup-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.matchup-team.red .matchup-label {
  color: var(--red);
}

.matchup-team.blue .matchup-label {
  color: var(--blue);
}

.matchup-models {
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-role {
  color: var(--text-light);
  font-weight: 500;
}

.model-name {
  color: var(--text);
  font-weight: 400;
}

.matchup-vs {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  padding: 0 0.25rem;
  flex-shrink: 0;
}

.history-details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.team-details {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: var(--bg);
}

.team-details.red {
  border-left: 3px solid var(--red);
}

.team-details.blue {
  border-left: 3px solid var(--blue);
}

.team-details h4 {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.detail-row {
  display: flex;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.detail-label {
  color: var(--text-light);
  width: 60px;
  flex-shrink: 0;
}

.detail-value {
  color: var(--text);
  word-break: break-word;
}

.end-reason {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.expand-hint {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* Timing Display */
.timing-display {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem auto;
  max-width: 600px;
}

.timing-team {
  flex: 1;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.timing-team.red {
  border-top: 3px solid var(--red);
}

.timing-team.blue {
  border-top: 3px solid var(--blue);
}

.timing-team-label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.timing-team.red .timing-team-label {
  color: var(--red);
}

.timing-team.blue .timing-team-label {
  color: var(--blue);
}

.timing-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.timing-row.active {
  background: #e8f5e9;
  margin: 0 -0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.timing-row.active .timing-value {
  font-weight: 700;
  color: #2e7d32;
}

.timing-row.total {
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  font-weight: 600;
}

.timing-label {
  color: var(--text-light);
}

.timing-value {
  font-family: 'Monaco', 'Consolas', monospace;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Turn Timer Countdown */
.turn-timer-countdown {
  max-width: 400px;
  margin: 1rem auto;
  text-align: center;
}

.timer-bar-container {
  height: 12px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  border-radius: 6px;
  transition: width 1s linear;
}

.turn-timer-countdown.warning .timer-bar {
  background: linear-gradient(90deg, #ff9800, #ffb74d);
}

.turn-timer-countdown.low .timer-bar {
  background: linear-gradient(90deg, #f44336, #ef5350);
  animation: pulse 0.5s ease-in-out infinite;
}

.timer-text {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Monaco', 'Consolas', monospace;
  color: var(--text);
}

.turn-timer-countdown.warning .timer-text {
  color: #ff9800;
}

.turn-timer-countdown.low .timer-text {
  color: #f44336;
  animation: pulse 0.5s ease-in-out infinite;
}

.turn-timer-countdown.paused .timer-bar {
  background: linear-gradient(90deg, #9e9e9e, #bdbdbd);
  animation: none;
}

.turn-timer-countdown.paused .timer-text {
  color: #9e9e9e;
  animation: none;
}

/* Paused timing display */
.timing-display.paused {
  opacity: 0.7;
}

/* Winner Modal Team Display */
.winner-teams {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  justify-content: center;
}

.winner-team {
  flex: 1;
  max-width: 200px;
  padding: 1rem;
  border-radius: 8px;
  text-align: left;
}

.winner-team.red {
  background: rgba(244, 67, 54, 0.1);
  border: 2px solid var(--red);
}

.winner-team.blue {
  background: rgba(25, 118, 210, 0.1);
  border: 2px solid var(--blue);
}

.winner-team.winning {
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

.winner-team.losing {
  opacity: 0.7;
}

.winner-team-header {
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.winner-team.red .winner-team-header {
  color: var(--red);
}

.winner-team.blue .winner-team-header {
  color: var(--blue);
}

.winner-team-members {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.member-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.member-role {
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.member-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.ai-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Model arena */
.site-tabs { display:flex; justify-content:center; gap:8px; padding:18px; border-bottom:1px solid #e6e7eb; }
.site-tabs button { background:transparent; color:#626879; border:0; border-radius:8px; padding:10px 24px; cursor:pointer; font:inherit; font-weight:600; }
.site-tabs button.selected { background:#152337; color:white; }
.arena { --ink:#152337; --muted:#657184; max-width:1180px; margin:0 auto; padding:44px 24px 70px; color:var(--ink); }
.arena-hero { display:flex; align-items:center; justify-content:space-between; gap:40px; padding:16px 0 34px; }
.arena-eyebrow { letter-spacing:.18em; font-size:11px; font-weight:800; color:#677689; }
.arena h1 { font-size:clamp(36px,5vw,60px); line-height:1.07; letter-spacing:-.045em; margin:18px 0; color:var(--ink); }
.arena-intro { max-width:510px; color:var(--muted); font-size:17px; line-height:1.6; }
.arena-status { display:flex; flex-direction:column; align-items:flex-start; gap:12px; background:#f2f5f8; border:1px solid #e2e8ef; border-radius:18px; padding:25px; min-width:235px; }
.arena-status>strong { font-size:48px; line-height:1; letter-spacing:-.04em; }
.arena-status>span:not(.arena-pill), .arena-status small { color:var(--muted); font-size:12px; max-width:220px; }
.arena-pill { border-radius:100px; padding:6px 10px; background:#fff0d8; color:#866019; font-size:11px; font-weight:700; white-space:nowrap; }
.arena-pill.muted { background:#eef2f7; color:#5d6e85; }
.arena-facts { display:flex; gap:24px; flex-wrap:wrap; border-top:1px solid #e3e8ee; border-bottom:1px solid #e3e8ee; padding:17px 0; font-size:12px; color:var(--muted); }
.arena-facts b { color:var(--ink); }
.arena-role-tabs { display:flex; gap:8px; margin:30px 0 22px; }
.arena-role-tabs button { font:inherit; font-weight:700; background:#edf1f6; color:#5c6b80; padding:12px 24px; border:0; border-radius:10px; cursor:pointer; }
.arena-role-tabs button.selected { background:#152337; color:white; }
.arena-section { padding:25px 0; border-bottom:1px solid #e3e8ee; }
.arena-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.arena h2 { font-size:23px; letter-spacing:-.025em; margin:0 0 8px; }
.arena h3 { font-size:16px; margin:24px 0 12px; }
.arena-section p { color:var(--muted); font-size:13px; line-height:1.65; margin:6px 0 16px; }
.arena-table-scroll { overflow-x:auto; }
.arena table { width:100%; border-collapse:collapse; font-size:12px; text-align:left; }
.arena th { font-weight:600; }
.arena-rankings th, .arena-rankings td { padding:17px 10px; border-bottom:1px solid #edf0f4; white-space:nowrap; }
.arena-rankings thead { background:#f5f7fa; color:#657184; font-size:10px; }
.arena-rankings tbody th { min-width:190px; }
.arena-rank { color:#98a4b3; font-size:11px; margin-right:12px; }
.arena-score { font-weight:800; font-size:17px; }
.arena .arena-footnote { font-size:11px; margin-top:14px; }
.arena-matrix { min-width:620px; }
.arena-matrix th { padding:12px; color:#657184; font-size:11px; }
.arena-matrix tbody th { min-width:150px; color:#152337; }
.arena-matrix td { padding:5px; text-align:center; }
.arena-match { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; min-height:75px; border:1px solid #e5e9ef; background:#f3f5f8; border-radius:10px; color:#617188; cursor:pointer; gap:8px; }
.arena-match strong { font-size:20px; }
.arena-match small { font-size:10px; }
.arena-match.positive { background:#e7f3ed; color:#277150; border-color:#d3eade; }
.arena-match.negative { background:#fcf0eb; color:#a05a40; border-color:#f0dfd6; }
.arena-match.active { outline:2px solid #152337; outline-offset:2px; }
.arena-match:disabled { cursor:default; opacity:.6; }
.arena-diagonal { color:#c1cbd6; }
.arena-clear { border:1px solid #d7dfe8; background:white; color:#657184; padding:8px 12px; border-radius:8px; cursor:pointer; }
.arena-partners { display:flex; gap:12px; flex-wrap:wrap; }
.arena-partners>div { display:flex; flex-direction:column; gap:10px; padding:20px; border-radius:12px; background:#f3f6f9; min-width:180px; }
.arena-partners strong { font-size:28px; }
.arena-partners small { color:#657184; }
.arena-replay-picker { display:flex; flex-direction:column; gap:10px; font-size:12px; }
.arena-replay-picker select { font:inherit; border:1px solid #d7dfe8; border-radius:9px; padding:13px; background:white; color:#152337; max-width:100%; }
.arena-teams { display:flex; gap:16px; margin:25px 0; }
.arena-teams>div { flex:1; display:flex; flex-direction:column; gap:9px; font-size:12px; background:#f4f6f9; padding:18px; border-radius:12px; }
.arena-board { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.arena-board>div { text-align:center; padding:16px 4px; border-radius:8px; font-size:12px; font-weight:700; }
.arena-board small { display:block; font-weight:400; font-size:9px; margin-top:7px; text-transform:uppercase; }
.arena-board .red { background:#fce2df; color:#9b443b; }
.arena-board .blue { background:#ddeafb; color:#326294; }
.arena-board .neutral { background:#ede9df; color:#786b51; }
.arena-board .assassin { background:#152337; color:white; }
.arena-turns { padding-left:22px; }
.arena-turns li { padding:16px 0; border-bottom:1px solid #edf0f4; }
.arena-team-label { text-transform:uppercase; font-size:10px; font-weight:800; margin-right:12px; }
.arena-team-label.red { color:#ab4b40; }.arena-team-label.blue { color:#3f6ea3; }
.arena-turns details { font-size:12px; color:#657184; }
.arena .arena-invalid { color:#ac5940; }
.arena-method summary { cursor:pointer; font-weight:600; }
.arena-method p:first-of-type { margin-top:20px; }
.arena-method a { color:#326294; font-size:13px; }
.arena-fingerprint { overflow-wrap:anywhere; font-family:monospace; font-size:10px!important; }
@media(max-width:700px) { .arena { padding:20px 16px 50px; }.arena-hero { flex-direction:column; align-items:stretch; gap:16px; }.arena-status { min-width:0; }.arena-section-head { align-items:flex-start; flex-direction:column; }.arena-teams { flex-direction:column; }.arena-board { gap:4px; }.arena-board>div { font-size:9px; padding:12px 2px; } }

.arena-role-tabs { flex-wrap:wrap; }
.arena-partner-leader { padding:16px 20px; background:#edf4f0; border-radius:10px; }
.arena-partner-detail { margin-top:24px; padding:20px; border:1px solid #d3eade; border-radius:10px; }

.arena-run-picker { display:flex; gap:16px; align-items:center; font-size:13px; font-weight:600; margin-top:24px; flex-wrap:wrap; }
.arena-run-picker select { font:inherit; padding:10px 14px; border:1px solid #d9e0e8; border-radius:8px; background:white; }
.arena-run-note, .arena-unavailable { color:#657184; font-size:12px; line-height:1.6; }
.arena-unavailable { background:#fff6e8; padding:12px 16px; border-radius:8px; }
