/* ========== Design System ========== */
:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222244;

  --color-primary: #00d4ff;
  --color-primary-dim: #007a99;
  --color-accent: #e94560;
  --color-accent-dim: #a8324a;
  --color-success: #2ecc71;
  --color-warning: #f39c12;

  --color-red: #e94560;
  --color-red-glow: rgba(233, 69, 96, 0.6);
  --color-yellow: #3b82f6;
  --color-yellow-glow: rgba(59, 130, 246, 0.6);

  --color-board: #1a237e;
  --color-board-light: #283593;
  --color-board-border: #0d1754;
  --color-cell-empty: #0d1117;

  --text-primary: #e0e0e0;
  --text-secondary: #9999aa;
  --text-muted: #6a6a7e;

  --border-color: #2a2a4a;
  --border-glow: rgba(0, 212, 255, 0.3);

  --radius: 8px;
  --radius-lg: 12px;

  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  --transition: 0.2s ease;

  --cell-size: 64px;
  --cell-gap: 6px;
}

[data-theme="light"] {
  --bg-primary: #f5f5f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #ecedf2;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f6;
  --color-primary: #0091b3;
  --color-primary-dim: #006680;
  --color-accent: #d63852;
  --color-accent-dim: #a8324a;
  --color-success: #16a34a;
  --color-warning: #ca8a04;
  --color-red: #d63852;
  --color-red-glow: rgba(214, 56, 82, 0.5);
  --color-yellow: #2563eb;
  --color-yellow-glow: rgba(37, 99, 235, 0.5);
  --color-board: #1e40af;
  --color-board-light: #2563eb;
  --color-board-border: #1e3a8a;
  --color-cell-empty: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #555566;
  --text-muted: #888899;
  --border-color: #d8d8e4;
  --border-glow: rgba(0, 145, 179, 0.3);
}

/* ========== Home Button ========== */
#home-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 999;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-family: inherit;
  transition: all 0.2s ease;
}
#home-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(233, 69, 96, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ========== Typography ========== */
h1, h2, h3 {
  color: var(--text-primary);
  font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  gap: 8px;
}

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

.btn-primary {
  background: var(--color-primary);
  color: var(--bg-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover:not(:disabled) {
  background: transparent;
  color: var(--color-primary);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-accent:hover:not(:disabled) {
  background: transparent;
  color: var(--color-accent);
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-success {
  background: var(--color-success);
  color: var(--bg-primary);
  border-color: var(--color-success);
}
.btn-success:hover:not(:disabled) {
  background: transparent;
  color: var(--color-success);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.1rem;
}

/* ========== Inputs ========== */
.input {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--border-glow);
}

.input::placeholder {
  color: var(--text-muted);
}

.input-code {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.2);
}

/* ========== Landing View ========== */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  animation: fadeIn 0.5s ease;
}

.landing-title {
  text-align: center;
}

.landing-title h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--color-red), #a855f7, var(--color-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.landing-title p {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 1.05rem;
}

.landing-cards {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-card {
  width: 320px;
  padding: 32px;
  text-align: center;
}

.landing-card h2 {
  margin-bottom: 20px;
  color: var(--color-primary);
}

.landing-card .form-group {
  margin-bottom: 16px;
}

.landing-card label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-align: left;
}

.disc-decoration {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  opacity: 0.4;
}

.disc-decoration .deco-disc {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.disc-decoration .deco-disc.red {
  background: var(--color-red);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), inset 0 -2px 4px rgba(0,0,0,0.3);
}

.disc-decoration .deco-disc.blue {
  background: var(--color-yellow);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), inset 0 -2px 4px rgba(0,0,0,0.3);
}

/* ========== Lobby View ========== */
.lobby {
  width: 100%;
  max-width: 600px;
  animation: fadeIn 0.5s ease;
}

.lobby-header {
  text-align: center;
  margin-bottom: 30px;
}

.lobby-header h1 {
  color: var(--color-primary);
  margin-bottom: 10px;
}

.room-code-display {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
}

.room-code-display:hover {
  border-color: var(--color-primary);
}

.room-code-display .code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-primary);
  letter-spacing: 4px;
}

.room-code-display .copy-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.player-slots {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.player-slot {
  flex: 1;
  min-width: 240px;
  padding: 20px;
  text-align: center;
}

.player-slot.empty {
  border-style: dashed;
  opacity: 0.5;
}

.player-slot .player-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.player-slot .player-label .color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.player-slot .player-label .color-dot.red {
  background: var(--color-red);
}

.player-slot .player-label .color-dot.yellow {
  background: var(--color-yellow);
}

.player-slot .player-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.player-slot .player-name.waiting {
  color: var(--text-muted);
  font-style: italic;
}

.ready-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ready-badge.ready {
  background: rgba(46, 204, 113, 0.2);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.ready-badge.not-ready {
  background: rgba(136, 136, 153, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

.spectator-section {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.spectator-section h3 {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.spectator-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.spectator-tag {
  padding: 4px 10px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.lobby-actions {
  text-align: center;
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========== Game View ========== */
.game-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 700px;
  animation: fadeIn 0.5s ease;
}

/* Turn Indicator */
.turn-indicator {
  text-align: center;
  padding: 12px 32px;
  border-radius: var(--radius-lg);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.turn-indicator .turn-disc {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.turn-indicator.your-turn {
  background: rgba(46, 204, 113, 0.15);
  color: var(--color-success);
  border: 2px solid var(--color-success);
  animation: borderGlow 2s ease infinite;
}

.turn-indicator.opponent-turn {
  background: rgba(243, 156, 18, 0.15);
  color: var(--color-warning);
  border: 2px solid var(--color-warning);
}

.turn-indicator.spectator-turn {
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

/* Player Info Bar */
.player-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 540px;
  gap: 16px;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}

.player-info.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--border-glow);
}

.player-info .info-disc {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.player-info .info-disc.red {
  background: var(--color-red);
  box-shadow: 0 0 6px var(--color-red-glow);
}

.player-info .info-disc.yellow {
  background: var(--color-yellow);
  box-shadow: 0 0 6px var(--color-yellow-glow);
}

.player-info .info-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.move-counter {
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========== Board ========== */
.board-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Ghost disc row above board */
.ghost-row {
  display: grid;
  grid-template-columns: repeat(7, var(--cell-size));
  gap: var(--cell-gap);
  margin-bottom: 4px;
  height: calc(var(--cell-size) * 0.6);
}

.ghost-cell {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ghost-disc {
  width: calc(var(--cell-size) - 12px);
  height: calc(var(--cell-size) - 12px);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ghost-disc.visible {
  opacity: 0.4;
}

.ghost-disc.red {
  background: var(--color-red);
}

.ghost-disc.yellow {
  background: var(--color-yellow);
}

/* Board frame */
.board-frame {
  background: var(--color-board);
  border: 3px solid var(--color-board-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(7, var(--cell-size));
  grid-template-rows: repeat(6, var(--cell-size));
  gap: var(--cell-gap);
}

/* Column overlay for hover/click */
.board-column-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}

.board-column-overlay:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Individual cell */
.board-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  background: var(--color-cell-empty);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: box-shadow 0.15s ease;
}

.board-cell .disc {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border-radius: 50%;
  transition: box-shadow 0.3s ease;
}

.board-cell .disc.red {
  background: radial-gradient(circle at 35% 35%, #ff6b81, var(--color-red) 60%, #b8303f);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Inner circle marker for red disc (colorblind aid) */
.board-cell .disc.red::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  height: 40%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.45);
}

.board-cell .disc.yellow {
  background: radial-gradient(circle at 35% 35%, #60a5fa, var(--color-yellow) 60%, #1d4ed8);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Cross marker for blue disc (colorblind aid) */
.board-cell .disc.yellow::before,
.board-cell .disc.yellow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 40%;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
}
.board-cell .disc.yellow::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.board-cell .disc.yellow::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Drop animation */
.board-cell .disc.dropping {
  animation: dropIn var(--drop-duration, 0.4s) cubic-bezier(0.25, 0.1, 0.25, 1.05) forwards;
}

@keyframes dropIn {
  0% {
    transform: translateY(calc(-100% - var(--drop-distance, 400px)));
    opacity: 0.8;
  }
  60% {
    opacity: 1;
  }
  80% {
    transform: translateY(4px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Winning cells glow */
.board-cell.winning {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 3px #fff;
  z-index: 1;
}

.board-cell.winning .disc {
  animation: winGlow 0.8s ease-in-out infinite alternate;
}

.board-cell.winning .disc.red {
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px var(--color-red-glow),
    0 0 40px var(--color-red-glow),
    0 0 60px var(--color-red-glow);
}

.board-cell.winning .disc.yellow {
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px var(--color-yellow-glow),
    0 0 40px var(--color-yellow-glow),
    0 0 60px var(--color-yellow-glow);
}

@keyframes winGlow {
  0% { filter: brightness(1); transform: scale(1); }
  100% { filter: brightness(1.5); transform: scale(1.08); }
}

/* Last move subtle highlight */
.board-cell.last-move {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(0, 212, 255, 0.4);
}

/* Column labels */
.col-labels {
  display: grid;
  grid-template-columns: repeat(7, var(--cell-size));
  gap: var(--cell-gap);
  margin-top: 6px;
}

.col-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Column hover highlight */
.board-cell.col-hover {
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Non-interactive board */
.board-frame.non-interactive {
  opacity: 0.95;
}

.board-frame.non-interactive .board-cell {
  cursor: default;
}

/* ========== Spectator View ========== */
.spectator-banner {
  text-align: center;
  padding: 10px 24px;
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius);
  color: var(--color-warning);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

/* ========== Game Over View ========== */
.game-over {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeIn 0.5s ease;
  width: 100%;
  max-width: 700px;
}

.victory-banner {
  text-align: center;
  padding: 24px 40px;
  border-radius: var(--radius-lg);
}

.victory-banner.winner {
  background: rgba(46, 204, 113, 0.1);
  border: 2px solid var(--color-success);
}

.victory-banner.loser {
  background: rgba(233, 69, 96, 0.1);
  border: 2px solid var(--color-accent);
}

.victory-banner.draw {
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid var(--color-primary);
}

.victory-banner.spectator-result {
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid var(--color-primary);
}

.victory-banner h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.victory-banner.winner h1 { color: var(--color-success); }
.victory-banner.loser h1 { color: var(--color-accent); }
.victory-banner.draw h1 { color: var(--color-primary); }
.victory-banner.spectator-result h1 { color: var(--color-primary); }

.victory-banner p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.game-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-card {
  padding: 16px 24px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  text-align: center;
  min-width: 120px;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.game-over-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.rematch-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

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

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 5px var(--border-glow); }
  50% { box-shadow: 0 0 20px var(--border-glow), 0 0 40px rgba(0,212,255,0.1); }
}

/* ========== Toasts ========== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto;
  animation: slideIn 0.3s ease;
  max-width: 350px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.toast.removing {
  animation: slideOut 0.3s ease forwards;
}

.toast.info {
  background: var(--bg-tertiary);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.toast.success {
  background: rgba(46, 204, 113, 0.15);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

.toast.error {
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.toast.warning {
  background: rgba(243, 156, 18, 0.15);
  border: 1px solid var(--color-warning);
  color: var(--color-warning);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  :root {
    --cell-size: 48px;
    --cell-gap: 4px;
  }

  #app {
    padding: 10px;
  }

  .landing-title h1 {
    font-size: 2rem;
  }

  .landing-cards {
    flex-direction: column;
    align-items: center;
  }

  .landing-card {
    width: 100%;
    max-width: 350px;
  }

  .turn-indicator {
    font-size: 1rem;
    padding: 10px 20px;
  }

  .player-info-bar {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  :root {
    --cell-size: 40px;
    --cell-gap: 3px;
  }

  .victory-banner h1 {
    font-size: 1.8rem;
  }

  .victory-banner {
    padding: 16px 24px;
  }

  .board-frame {
    padding: 6px;
  }
}

/* ========== Utility ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hidden { display: none !important; }
