* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #111827;
  color: white;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

button,
input {
  font: inherit;
}

.app {
  width: min(520px, 94vw);
  background: #1f2937;
  padding: 22px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
}

.app-header h1 {
  margin: 0 0 8px;
}

#connectionStatus {
  color: #93c5fd;
  margin-top: 0;
  word-break: break-word;
}

.panel {
  background: #111827;
  padding: 18px;
  border-radius: 14px;
  margin-top: 18px;
}

.hidden {
  display: none;
}

label {
  display: block;
  text-align: left;
  margin: 12px 0 6px;
  color: #d1d5db;
}

input {
  width: 100%;
  padding: 14px;
  border: 2px solid #374151;
  border-radius: 12px;
  background: #030712;
  color: white;
  outline: none;
  text-align: center;
}

input:focus {
  border-color: #60a5fa;
}

#roomCodeInput {
  text-transform: uppercase;
  letter-spacing: 6px;
  font-weight: bold;
}

button {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-button {
  background: #4b5563;
}

.divider {
  margin: 20px 0 6px;
  color: #9ca3af;
}

.status {
  min-height: 24px;
  color: #facc15;
}

.status.error {
  color: #f87171;
}

.room-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.room-info div {
  background: #030712;
  padding: 12px;
  border-radius: 12px;
}

.label {
  display: block;
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 4px;
}

#roomCodeDisplay,
#playerSymbolDisplay {
  font-size: 28px;
  letter-spacing: 2px;
}

.players {
  background: #030712;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.players p {
  margin: 4px 0;
}

.turn-display {
  min-height: 32px;
  font-size: 22px;
  font-weight: bold;
  color: #facc15;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cell {
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  font-size: clamp(44px, 16vw, 76px);
  border-radius: 14px;
  background: #374151;
  color: white;
}

.cell.x {
  color: #60a5fa;
}

.cell.o {
  color: #f87171;
}

.cell.win {
  background: #15803d;
  color: white;
}

.game-buttons {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.game-buttons button {
  margin-top: 0;
}
.menu-description {
  color: #d1d5db;
  margin-top: -4px;
  margin-bottom: 18px;
}

.coming-soon-button {
  background: #374151;
  color: #9ca3af;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title-row h2 {
  margin: 0;
}

.small-button {
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
  font-size: 14px;
}
.connect-four-board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  background: #1d4ed8;
  padding: 10px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.connect-four-cell {
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 3px solid #1e3a8a;
  border-radius: 50%;
  background: #030712;
  cursor: pointer;
}

.connect-four-cell.red {
  background: #ef4444;
}

.connect-four-cell.yellow {
  background: #facc15;
}

.connect-four-cell.win {
  box-shadow: 0 0 0 4px white inset, 0 0 12px white;
}

.connect-four-cell:disabled {
  cursor: not-allowed;
}

@media (max-width: 420px) {
  .connect-four-board {
    gap: 5px;
    padding: 7px;
  }

  .connect-four-cell {
    border-width: 2px;
  }
}
/* HANGMAN */

body {
  padding: 16px;
}

.hangman-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.hangman-drawing-box,
.hangman-info-box,
.hangman-controls {
  background: #030712;
  border-radius: 14px;
  padding: 14px;
}

.hangman-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.gallows-line {
  stroke: #d1d5db;
  stroke-width: 8;
  stroke-linecap: round;
}

.hangman-part {
  fill: none;
  stroke: #f87171;
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hangman-part.visible {
  opacity: 1;
}

.hangman-word {
  background: #030712;
  border-radius: 14px;
  padding: 18px 10px;
  margin: 14px 0;
  font-size: clamp(24px, 7vw, 42px);
  font-weight: bold;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 34px;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}

.hangman-word-group {
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 8px;
}

.hangman-info-box p {
  margin: 6px 0;
}

.hangman-hint {
  color: #93c5fd;
}

.hangman-wrong {
  color: #facc15;
}

.hangman-misses {
  color: #f87171;
  font-weight: bold;
}

.hangman-controls {
  margin-top: 14px;
  text-align: left;
}

.hangman-controls h3 {
  margin-top: 0;
  text-align: center;
}

.hangman-letter-buttons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 12px 0 18px;
}

.hangman-letter-button {
  margin: 0;
  padding: 10px 0;
  border-radius: 10px;
  font-size: 18px;
}

.hangman-letter-button.correct {
  background: #15803d;
}

.hangman-letter-button.wrong {
  background: #991b1b;
}

.hangman-letter-button:disabled {
  opacity: 0.65;
}

@media (min-width: 560px) {
  .hangman-layout {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  .hangman-letter-buttons {
    grid-template-columns: repeat(5, 1fr);
  }

  .hangman-word {
    letter-spacing: 5px;
  }
}
/* SNAKE */

.snake-canvas {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  background: #030712;
  border: 4px solid #374151;
  border-radius: 14px;
  display: block;
  margin: 12px auto;
  touch-action: none;
}

.snake-players {
  background: #030712;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
  text-align: left;
}

.snake-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #1f2937;
}

.snake-player-row:last-child {
  border-bottom: none;
}

.snake-player-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.snake-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.snake-controls {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  grid-template-rows: repeat(3, 60px);
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.snake-direction-button {
  width: 72px;
  height: 60px;
  margin: 0;
  padding: 0;
  font-size: 28px;
  border-radius: 14px;
  background: #2563eb;
}

.snake-up {
  grid-column: 2;
  grid-row: 1;
}

.snake-left {
  grid-column: 1;
  grid-row: 2;
}

.snake-right {
  grid-column: 3;
  grid-row: 2;
}

.snake-down {
  grid-column: 2;
  grid-row: 3;
}

@media (max-width: 420px) {
  .snake-controls {
    grid-template-columns: repeat(3, 64px);
    grid-template-rows: repeat(3, 54px);
  }

  .snake-direction-button {
    width: 64px;
    height: 54px;
    font-size: 24px;
  }
}
/* SNAKE JOYSTICK */

.snake-joystick-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 18px;
  user-select: none;
  touch-action: none;
}

.snake-joystick {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #111827;
  border: 4px solid #374151;
  position: relative;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
  touch-action: none;
}

.snake-joystick::before {
  content: "";
  position: absolute;
  inset: 50%;
  width: 12px;
  height: 12px;
  background: #4b5563;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.snake-joystick-knob {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #2563eb;
  border: 4px solid #93c5fd;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.snake-joystick.disabled {
  opacity: 0.45;
}

.snake-joystick-status {
  color: #9ca3af;
  margin: 8px 0 0;
  font-size: 14px;
}
/* CHECKERS */

.checkers-board {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  margin: 16px auto;
  border: 4px solid #111827;
  border-radius: 14px;
  overflow: hidden;
  background: #111827;
}

.checkers-square {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.checkers-square.light {
  background: #d6d3d1;
}

.checkers-square.dark {
  background: #78350f;
}

.checkers-square.selected {
  outline: 4px solid #60a5fa;
  outline-offset: -4px;
}

.checkers-square.forced {
  box-shadow: inset 0 0 0 4px #facc15;
}

.checkers-square.possible-target {
  box-shadow: inset 0 0 0 4px #22c55e;
}

.checkers-piece {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: white;
  font-size: clamp(14px, 4vw, 28px);
}

.checkers-piece.red {
  background: #dc2626;
}

.checkers-piece.black {
  background: #111827;
}

.checkers-piece.king::after {
  content: "K";
}

.checkers-square:disabled {
  cursor: default;
}

@media (max-width: 420px) {
  .checkers-board {
    width: 100%;
    max-width: 100%;
  }

  .checkers-piece {
    border-width: 2px;
  }
}
/* MARBLE RACE */

.marble-dice-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: center;
  margin: 14px 0;
}

.marble-dice {
  height: 72px;
  background: #030712;
  border: 3px solid #374151;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: bold;
  color: white;
}

.marble-board {
  position: relative;
  width: 100%;
  max-width: 590px;
  aspect-ratio: 1 / 1;
  margin: 16px auto;
  background: #c49a6c;
  border: 8px solid #5b341c;
  border-radius: 28px;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.marble-board::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(90, 52, 28, 0.35);
  border-radius: 20px;
  pointer-events: none;
}

.marble-space {
  --space-size: 3.5%;
  position: absolute;
  width: var(--space-size);
  height: var(--space-size);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #111827;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65);
}

.marble-space.base {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.3);
}

.marble-space.start {
  border-width: 4px;
}

.marble-space.home {
  background: rgba(255, 255, 255, 0.85);
  border-width: 3px;
}

.marble-space.center {
  --space-size: 5.2%;
  background: #020617;
  border: 4px solid #f8fafc;
  z-index: 3;
}

.marble-space.legal-target {
  box-shadow: 0 0 0 5px #22c55e, inset 0 2px 4px rgba(0, 0, 0, 0.65);
}

.marble-space.center-entry {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65);
}

.marble-piece {
  position: absolute;
  width: 2.8%;
  height: 2.8%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.35);
  z-index: 10;
  cursor: pointer;
}

.marble-piece::after {
  content: "";
  position: absolute;
  width: 28%;
  height: 28%;
  left: 18%;
  top: 14%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.marble-piece.selectable {
  box-shadow: 0 0 0 3px #facc15, 0 3px 5px rgba(0, 0, 0, 0.35);
}

.marble-piece.selected {
  box-shadow: 0 0 0 3px #22c55e, 0 3px 5px rgba(0, 0, 0, 0.35);
}

.marble-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #1f2937;
}

.marble-player-row:last-child {
  border-bottom: none;
}

.marble-player-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.marble-color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.marble-small-note {
  color: #9ca3af;
  font-size: 13px;
}

@media (max-width: 420px) {
  .marble-board {
    max-width: 100%;
    border-width: 5px;
    border-radius: 20px;
  }

  .marble-piece {
    border-width: 2px;
  }

  .marble-space.start {
    border-width: 3px;
  }
}
/* MARBLE RACE PIECE SIZE FIX */
/* Overrides the normal app button styling on marble pieces */

.marble-piece {
  width: 3.2% !important;
  height: 3.2% !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  line-height: 0 !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

.marble-piece::after {
  width: 28% !important;
  height: 28% !important;
  left: 18% !important;
  top: 14% !important;
}

.marble-piece.selectable {
  box-shadow: 0 0 0 3px #facc15, 0 3px 5px rgba(0, 0, 0, 0.35) !important;
}

.marble-piece.selected {
  box-shadow: 0 0 0 3px #22c55e, 0 3px 5px rgba(0, 0, 0, 0.35) !important;
}

.marble-space.legal-target {
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}
/* MARBLE RACE TOUCH / CLICK HITBOX FIX */

.marble-space:not(.legal-target) {
  pointer-events: none;
}

.marble-piece {
  width: 7.5% !important;
  height: 7.5% !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  line-height: 0 !important;
  font-size: 0 !important;
  overflow: visible !important;
  z-index: 30 !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.marble-piece::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 10%, rgba(255, 255, 255, 0.55) 11% 20%, transparent 21%),
    radial-gradient(circle at 70% 75%, rgba(0, 0, 0, 0.32) 0 22%, transparent 45%),
    radial-gradient(circle at 45% 40%, rgba(255, 255, 255, 0.18) 0 35%, transparent 60%),
    var(--piece-color, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset -2px -3px 4px rgba(0, 0, 0, 0.28),
    inset 2px 2px 4px rgba(255, 255, 255, 0.28),
    0 3px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.marble-piece::after {
  content: none;
}

.marble-piece.selectable {
  box-shadow: none !important;
}

.marble-piece.selectable::before {
  box-shadow:
    inset -2px -3px 4px rgba(0, 0, 0, 0.28),
    inset 2px 2px 4px rgba(255, 255, 255, 0.28),
    0 0 0 3px #facc15,
    0 3px 6px rgba(0, 0, 0, 0.45);
}

.marble-piece.selected {
  box-shadow: none !important;
}

.marble-piece.selected::before {
  box-shadow:
    inset -2px -3px 4px rgba(0, 0, 0, 0.28),
    inset 2px 2px 4px rgba(255, 255, 255, 0.28),
    0 0 0 3px #22c55e,
    0 3px 6px rgba(0, 0, 0, 0.45);
}

.marble-space.legal-target {
  width: 8% !important;
  height: 8% !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  z-index: 40 !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.marble-space.legal-target::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  border: 3px solid #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
  pointer-events: none;
}
.marble-board {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* MARBLE RACE DICE ANIMATION */

.marble-dice {
  position: relative;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}

.marble-dice.rolling {
  animation: marbleDiceShake 0.12s infinite;
  background: #111827;
  box-shadow:
    0 0 0 3px rgba(250, 204, 21, 0.35),
    0 0 18px rgba(250, 204, 21, 0.35);
}

.marble-dice.final-roll {
  animation: marbleDicePop 0.28s ease;
}

@keyframes marbleDiceShake {
  0% {
    transform: rotate(-4deg) scale(1.03);
  }

  50% {
    transform: rotate(4deg) scale(1.08);
  }

  100% {
    transform: rotate(-3deg) scale(1.03);
  }
}

@keyframes marbleDicePop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}
/* PEG SOLITAIRE */

.peg-board {
  position: relative;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1 / 1;
  margin: 18px auto;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(135deg, #c79a5b, #8b5a2b);
  border: 8px solid #5b341c;
  border-radius: 28px;
  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.25),
    0 10px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.peg-board::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(90, 52, 28, 0.35);
  border-radius: 20px;
  pointer-events: none;
}

.peg-hole {
  position: absolute;
  width: 16%;
  height: 16%;
  transform: translate(-50%, -50%);
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.peg-hole::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #111827;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.85),
    0 2px 4px rgba(0, 0, 0, 0.35);
}

.peg-hole.filled::before {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 10%, rgba(255, 255, 255, 0.55) 11% 20%, transparent 21%),
    radial-gradient(circle at 70% 75%, rgba(0, 0, 0, 0.32) 0 22%, transparent 45%),
    #ef4444;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset -2px -3px 4px rgba(0, 0, 0, 0.28),
    inset 2px 2px 4px rgba(255, 255, 255, 0.28),
    0 5px 8px rgba(0, 0, 0, 0.45);
}

.peg-hole.empty::before {
  background: #0f172a;
}

.peg-hole.selected::before {
  box-shadow:
    inset -2px -3px 4px rgba(0, 0, 0, 0.28),
    inset 2px 2px 4px rgba(255, 255, 255, 0.28),
    0 0 0 5px #facc15,
    0 5px 8px rgba(0, 0, 0, 0.45);
}

.peg-hole.legal-target::before {
  box-shadow:
    inset 0 3px 7px rgba(0, 0, 0, 0.85),
    0 0 0 5px #22c55e,
    0 2px 4px rgba(0, 0, 0, 0.35);
}

.small-note {
  color: #9ca3af;
  font-size: 14px;
  margin: 8px 0 0;
}

@media (max-width: 420px) {
  .peg-board {
    max-width: 100%;
    border-width: 5px;
    border-radius: 22px;
  }

  .peg-hole {
    width: 18%;
    height: 18%;
  }
}
/* PEG SOLITAIRE TOUCH / CLICK FIX */

.peg-board {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.peg-hole {
  pointer-events: none;
}
/* PEG SOLITAIRE SCORING */

.peg-score-card {
  background: #030712;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0 8px;
  text-align: left;
}

.peg-score-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  text-align: center;
}

.peg-score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #1f2937;
}

.peg-score-row:last-child {
  border-bottom: none;
}

.peg-hole.start-choice::before {
  box-shadow:
    inset -2px -3px 4px rgba(0, 0, 0, 0.28),
    inset 2px 2px 4px rgba(255, 255, 255, 0.28),
    0 0 0 4px rgba(250, 204, 21, 0.75),
    0 5px 8px rgba(0, 0, 0, 0.45);
}
/* BITCHRUMMY */

.bitch-players {
  background: #030712;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
  text-align: left;
}

.bitch-player-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #1f2937;
}

.bitch-player-row:last-child {
  border-bottom: none;
}

.bitch-player-name {
  font-weight: bold;
}

.bitch-player-meta {
  color: #9ca3af;
  font-size: 13px;
}

.bitch-mini-hand {
  display: flex;
  justify-content: flex-end;
  min-width: 90px;
}

.bitch-mini-card {
  width: 18px;
  height: 26px;
  background: #1d4ed8;
  border: 1px solid #93c5fd;
  border-radius: 4px;
  margin-left: -8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.bitch-table {
  background: #064e3b;
  border: 5px solid #052e16;
  border-radius: 18px;
  padding: 14px;
  margin: 16px 0;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.bitch-table-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
}

.bitch-pile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bitch-section-title {
  font-weight: bold;
  margin: 10px 0 6px;
  text-align: center;
}

.bitch-card-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px;
  min-height: 104px;
}

.hand-row {
  background: #030712;
  border-radius: 14px;
  margin-bottom: 12px;
}

.discard-row {
  justify-content: flex-start;
  min-height: 96px;
}

.playing-card {
  width: 58px;
  height: 82px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
  position: relative;
  user-select: none;
}

.playing-card.red-card {
  color: #dc2626;
}

.playing-card.black-card {
  color: #111827;
}

.playing-card.wild-card {
  box-shadow:
    0 0 0 3px #facc15,
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.playing-card.queen-spades {
  box-shadow:
    0 0 0 3px #a855f7,
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.playing-card.card-back {
  background:
    linear-gradient(135deg, #1d4ed8 25%, #2563eb 25% 50%, #1d4ed8 50% 75%, #2563eb 75%);
  background-size: 16px 16px;
  color: white;
  border-color: #93c5fd;
}

.playing-card.empty-card {
  background: #111827;
  color: #9ca3af;
  border-color: #374151;
  box-shadow: none;
}

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

.bitch-sort-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bitch-log {
  background: #030712;
  border-radius: 14px;
  padding: 10px;
  max-height: 160px;
  overflow-y: auto;
  text-align: left;
}

.bitch-log-row {
  padding: 5px 0;
  border-bottom: 1px solid #1f2937;
  color: #d1d5db;
  font-size: 14px;
}

.bitch-log-row:last-child {
  border-bottom: none;
}

@media (max-width: 420px) {
  .playing-card {
    width: 48px;
    height: 70px;
    font-size: 17px;
  }

  .bitch-card-row {
    min-height: 88px;
  }

  .bitch-hand-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .bitch-sort-buttons {
    justify-content: flex-start;
  }
}
/* BITCHRUMMY TURN ACTIONS */

.bitch-action-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.playing-card.clickable-card {
  cursor: pointer;
}

.playing-card.selected-card {
  transform: translateY(-8px);
  box-shadow:
    0 0 0 4px #22c55e,
    0 6px 12px rgba(0, 0, 0, 0.45);
}

.playing-card.cannot-discard-card {
  box-shadow:
    0 0 0 3px #f97316,
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.playing-card.must-play-card {
  box-shadow:
    0 0 0 3px #facc15,
    0 4px 8px rgba(0, 0, 0, 0.35);
}
.bitch-wild-display {
  min-width: 96px;
  padding: 12px 14px;
  background: #030712;
  color: #facc15;
  border: 2px solid #facc15;
  border-radius: 12px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

/* BITCHRUMMY MELDS */

.bitch-melds {
  background: #030712;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
  text-align: left;
}

.bitch-meld {
  background: #111827;
  border: 2px solid #374151;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}

.bitch-meld:last-child {
  margin-bottom: 0;
}

.bitch-meld.clickable-meld {
  cursor: pointer;
}

.bitch-meld.clickable-meld:hover {
  border-color: #22c55e;
}

.bitch-meld-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #d1d5db;
  font-size: 13px;
  margin-bottom: 8px;
}

.bitch-meld-cards {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.bitch-card-assignment {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 3px;
  border-radius: 5px;
  background: rgba(17, 24, 39, 0.82);
  color: #facc15;
  font-size: 10px;
  line-height: 1.1;
}

.bitch-card-owner {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 3px;
  color: #6b7280;
  font-size: 9px;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playing-card.selected-card {
  border-color: #22c55e;
}

@media (max-width: 420px) {
  .bitch-meld-cards {
    gap: 6px;
  }

  .bitch-card-assignment {
    font-size: 9px;
  }
}


/* BITCHRUMMY RUMMY CHOICE */

.bitch-rummy-choice-panel {
  background: #030712;
  border: 2px solid #374151;
  border-radius: 12px;
  padding: 10px;
  margin-top: 8px;
}

.bitch-rummy-choice-title {
  color: #facc15;
  font-weight: bold;
  margin-bottom: 8px;
}

.bitch-rummy-choice-button {
  width: 100%;
  margin-top: 8px;
  text-align: center;
}
/* BITCHRUMMY SCORE SUMMARY */

.bitch-score-summary-wrap {
  margin: 14px 0;
}

.bitch-score-summary {
  background: #030712;
  border: 2px solid #374151;
  border-radius: 14px;
  overflow-x: auto;
  text-align: left;
}

.bitch-score-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 430px;
}

.bitch-score-table th,
.bitch-score-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #1f2937;
  font-size: 13px;
  white-space: nowrap;
}

.bitch-score-table th {
  color: #facc15;
  background: #111827;
  font-weight: bold;
}

.bitch-score-table tr:last-child td {
  border-bottom: none;
}

.bitch-score-positive {
  color: #22c55e;
  font-weight: bold;
}

.bitch-score-negative {
  color: #f87171;
  font-weight: bold;
}

.bitch-score-went-out {
  color: #93c5fd;
  font-weight: bold;
}

/* BITCHRUMMY UNDO TURN */

.bitch-undo-turn-button:not(:disabled) {
  background: #92400e;
}


/* OPEN GAMES MAIN MENU */

.open-games-panel {
  margin-top: 20px;
  background: #030712;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}

.open-games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.open-games-header h3 {
  margin: 0;
  font-size: 18px;
}

.open-games-list {
  display: grid;
  gap: 10px;
}

.open-games-empty {
  margin: 8px 0;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

.open-game-card {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 10px;
}

.open-game-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.open-game-title {
  font-weight: bold;
  color: #f9fafb;
}

.open-game-room-code {
  margin-top: 2px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
}

.open-game-badge {
  flex: 0 0 auto;
  max-width: 46%;
  padding: 4px 7px;
  border-radius: 999px;
  background: #374151;
  color: #f9fafb;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.open-game-badge.running {
  background: #14532d;
  color: #bbf7d0;
}

.open-game-badge.waiting {
  background: #78350f;
  color: #fde68a;
}

.open-game-badge.game-over {
  background: #4c1d95;
  color: #ddd6fe;
}

.open-game-player-list {
  display: grid;
  gap: 6px;
}

.open-game-player-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  color: #d1d5db;
  font-size: 13px;
}

.open-game-player-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.open-game-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b7280;
  flex: 0 0 auto;
}

.open-game-status-dot.connected {
  background: #22c55e;
}

.open-game-status-dot.disconnected {
  background: #ef4444;
}

.open-game-player-detail {
  color: #9ca3af;
  font-size: 12px;
  text-align: right;
}

.open-game-spectators {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 12px;
  text-align: right;
}

@media (max-width: 420px) {
  .open-game-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .open-game-badge {
    max-width: none;
  }

  .open-game-player-row {
    grid-template-columns: 1fr;
  }

  .open-game-player-detail {
    text-align: left;
    padding-left: 15px;
  }
}

/* TOWERS OF HANOI */

.hanoi-info {
  grid-template-columns: repeat(3, 1fr);
}

.hanoi-select {
  width: 100%;
  padding: 14px;
  border: 2px solid #374151;
  border-radius: 12px;
  background: #030712;
  color: white;
  outline: none;
  text-align: center;
  font: inherit;
  font-weight: bold;
}

.hanoi-select:focus {
  border-color: #60a5fa;
}

.hanoi-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0 10px;
  background: #030712;
  border-radius: 16px;
  padding: 12px;
  min-height: 285px;
}

.hanoi-peg {
  position: relative;
  min-height: 250px;
  margin: 0;
  padding: 0 4px 34px;
  background: #111827;
  border: 2px solid #374151;
  border-radius: 14px;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hanoi-peg.selected {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.hanoi-peg.legal-target {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hanoi-pole {
  position: absolute;
  left: 50%;
  bottom: 37px;
  width: 10px;
  height: 78%;
  transform: translateX(-50%);
  border-radius: 999px 999px 0 0;
  background: #9ca3af;
  box-shadow: inset -2px 0 3px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hanoi-stack {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 37px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.hanoi-disk {
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
}

.hanoi-disk-1 { background: #60a5fa; }
.hanoi-disk-2 { background: #34d399; }
.hanoi-disk-3 { background: #facc15; }
.hanoi-disk-4 { background: #fb923c; }
.hanoi-disk-5 { background: #f87171; }
.hanoi-disk-6 { background: #c084fc; }
.hanoi-disk-7 { background: #f472b6; }
.hanoi-disk-8 { background: #38bdf8; }

.hanoi-peg-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  color: #d1d5db;
  font-size: 13px;
  font-weight: bold;
  z-index: 3;
}

@media (max-width: 420px) {
  .hanoi-board {
    gap: 6px;
    padding: 8px;
    min-height: 235px;
  }

  .hanoi-peg {
    min-height: 215px;
    padding-left: 2px;
    padding-right: 2px;
  }

  .hanoi-disk {
    height: 19px;
    font-size: 10px;
  }

  .hanoi-info {
    grid-template-columns: 1fr;
  }
}


/* MASTERMIND */

.mastermind-info {
  grid-template-columns: repeat(3, 1fr);
}

.mastermind-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.mastermind-select {
  width: 100%;
  padding: 14px;
  border: 2px solid #374151;
  border-radius: 12px;
  background: #030712;
  color: white;
  outline: none;
  text-align: center;
  font: inherit;
  font-weight: bold;
}

.mastermind-select:focus {
  border-color: #60a5fa;
}

.mastermind-toggle-button {
  margin-top: 8px;
}

.mastermind-secret-display {
  display: flex;
  justify-content: center;
  gap: 8px;
  background: #030712;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
  min-height: 58px;
}

.mastermind-board {
  display: grid;
  gap: 8px;
  background: #030712;
  border-radius: 16px;
  padding: 12px;
  margin: 14px 0;
}

.mastermind-row {
  display: grid;
  grid-template-columns: 34px 1fr 54px;
  gap: 8px;
  align-items: center;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 8px;
}

.mastermind-row.active {
  border-color: #facc15;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.18);
}

.mastermind-row-number {
  color: #9ca3af;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.mastermind-slots {
  display: flex;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.mastermind-code-peg,
.mastermind-slot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: var(--mastermind-color, #1f2937);
  box-shadow:
    inset -2px -3px 5px rgba(0, 0, 0, 0.3),
    inset 2px 2px 5px rgba(255, 255, 255, 0.22),
    0 2px 5px rgba(0, 0, 0, 0.35);
}

.mastermind-slot.empty,
.mastermind-code-peg.hidden-code {
  background: #1f2937;
  border-color: #4b5563;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55);
}

.mastermind-code-peg.hidden-code::after {
  content: "?";
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #d1d5db;
  font-weight: bold;
}

.mastermind-feedback {
  display: grid;
  grid-template-columns: repeat(2, 13px);
  grid-auto-rows: 13px;
  gap: 4px;
  justify-content: center;
}

.mastermind-feedback-peg {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid #6b7280;
  background: #1f2937;
  vertical-align: middle;
  margin-right: 6px;
}

.mastermind-feedback-peg.exact {
  background: #f9fafb;
  border-color: #f9fafb;
}

.mastermind-feedback-peg.color-only {
  background: #facc15;
  border-color: #facc15;
}

.mastermind-current-panel {
  background: #030712;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0;
}

.mastermind-section-title {
  font-weight: bold;
  color: #d1d5db;
  margin-bottom: 8px;
}

.mastermind-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.mastermind-color-button {
  aspect-ratio: 1 / 1;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--mastermind-color, #2563eb);
  border: 3px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset -3px -4px 6px rgba(0, 0, 0, 0.3),
    inset 3px 3px 6px rgba(255, 255, 255, 0.25),
    0 4px 8px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mastermind-color-button:disabled {
  opacity: 0.28;
}

.mastermind-help-card {
  background: #030712;
  border-radius: 14px;
  padding: 12px;
  margin-top: 14px;
  color: #d1d5db;
  font-size: 13px;
  text-align: left;
  display: grid;
  gap: 7px;
}

@media (max-width: 420px) {
  .mastermind-info {
    grid-template-columns: 1fr;
  }

  .mastermind-row {
    grid-template-columns: 26px 1fr 42px;
    gap: 5px;
    padding: 7px 5px;
  }

  .mastermind-slots {
    gap: 4px;
  }

  .mastermind-code-peg,
  .mastermind-slot {
    width: 24px;
    height: 24px;
    border-width: 2px;
  }

  .mastermind-feedback {
    grid-template-columns: repeat(2, 10px);
    grid-auto-rows: 10px;
    gap: 3px;
  }

  .mastermind-feedback-peg {
    width: 10px;
    height: 10px;
  }

  .mastermind-palette {
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
  }

  .mastermind-color-button {
    min-height: 42px;
  }
}


/* LUCKY SCRATCHERS */

.scratchers-info {
  grid-template-columns: 1fr 1fr;
}

#scratchersBalanceDisplay,
#scratchersTicketCostDisplay {
  font-size: 26px;
}

.scratchers-ticket-wrap {
  background:
    radial-gradient(circle at 25% 18%, rgba(250, 204, 21, 0.24), transparent 26%),
    linear-gradient(135deg, #7f1d1d, #991b1b 45%, #451a03);
  border: 4px solid #facc15;
  border-radius: 20px;
  padding: 12px;
  margin: 16px 0;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.38),
    0 8px 18px rgba(0, 0, 0, 0.35);
}

.scratchers-ticket-title {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
  color: #fef3c7;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.scratchers-ticket-title span {
  font-size: 24px;
}

.scratchers-ticket-title small {
  color: #fde68a;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.scratchers-ticket-area {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 38%),
    #111827;
  border: 3px solid rgba(254, 243, 199, 0.72);
  border-radius: 16px;
  padding: 10px;
  min-height: 272px;
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.scratchers-ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  min-height: 246px;
}

.scratchers-cell {
  min-height: 76px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), transparent 26%),
    #fef3c7;
  border: 2px solid #92400e;
  border-radius: 14px;
  color: #111827;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.38),
    inset 0 -3px 5px rgba(146, 64, 14, 0.22),
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.scratchers-cell-symbol {
  font-size: 30px;
  line-height: 1;
}

.scratchers-cell-prize {
  color: #14532d;
  font-size: 15px;
  font-weight: bold;
}

.scratchers-cell.winning-symbol {
  border-color: #22c55e;
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.45),
    inset 0 2px 5px rgba(255, 255, 255, 0.38),
    0 4px 8px rgba(0, 0, 0, 0.35);
}

.scratchers-placeholder {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fde68a;
  font-weight: bold;
  min-height: 246px;
  border: 2px dashed rgba(254, 243, 199, 0.45);
  border-radius: 14px;
}

.scratchers-overlay-canvas {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 14px;
  cursor: grab;
  touch-action: none;
}

.scratchers-overlay-canvas:active {
  cursor: grabbing;
}

.scratchers-prize-card {
  background: #030712;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0 8px;
  text-align: left;
}

.scratchers-prize-card h3 {
  margin: 0 0 8px;
  color: #facc15;
  text-align: center;
}

.scratchers-prize-table {
  display: grid;
  gap: 6px;
}

.scratchers-prize-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #1f2937;
  color: #d1d5db;
}

.scratchers-prize-row:last-child {
  border-bottom: none;
}

.scratchers-prize-symbols {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: 18px;
}

.scratchers-prize-amount {
  color: #22c55e;
  font-weight: bold;
}

@media (max-width: 420px) {
  .scratchers-ticket-wrap {
    padding: 9px;
    border-width: 3px;
  }

  .scratchers-ticket-area {
    padding: 8px;
    min-height: 242px;
  }

  .scratchers-ticket-grid {
    gap: 7px;
    min-height: 220px;
  }

  .scratchers-cell {
    min-height: 68px;
  }

  .scratchers-cell-symbol {
    font-size: 25px;
  }

  .scratchers-cell-prize {
    font-size: 13px;
  }
}

/* MEMORY LIGHTS */

.simon-info {
  grid-template-columns: repeat(3, 1fr);
}

#simonLevelDisplay,
#simonScoreDisplay,
#simonSpeedDisplay {
  font-size: 24px;
}

.simon-board {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1 / 1;
  margin: 18px auto;
  border-radius: 50%;
  background: #020617;
  border: 10px solid #030712;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  padding: 10px;
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.simon-pad {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  opacity: 0.78;
  box-shadow:
    inset -4px -5px 10px rgba(0, 0, 0, 0.45),
    inset 4px 5px 12px rgba(255, 255, 255, 0.18);
  transition:
    transform 0.08s ease,
    opacity 0.08s ease,
    filter 0.08s ease,
    box-shadow 0.08s ease;
}

.simon-pad:disabled {
  cursor: default;
  opacity: 0.72;
}

.simon-pad:active,
.simon-pad.active {
  opacity: 1;
  filter: brightness(1.65) saturate(1.5);
  transform: scale(0.98);
  box-shadow:
    inset -3px -4px 10px rgba(0, 0, 0, 0.25),
    inset 4px 5px 14px rgba(255, 255, 255, 0.35),
    0 0 24px rgba(255, 255, 255, 0.45);
}

.simon-pad.wrong {
  filter: grayscale(1) brightness(1.6);
  box-shadow: 0 0 0 5px #f87171, 0 0 22px #f87171;
}

.simon-green {
  background: #22c55e;
  border-radius: 100% 12px 12px 12px;
}

.simon-red {
  background: #ef4444;
  border-radius: 12px 100% 12px 12px;
}

.simon-yellow {
  background: #facc15;
  border-radius: 12px 12px 12px 100%;
}

.simon-blue {
  background: #3b82f6;
  border-radius: 12px 12px 100% 12px;
}

.simon-center-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  height: 34%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #030712;
  border: 8px solid #111827;
  color: #f9fafb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  text-transform: uppercase;
}

.simon-center-badge strong {
  font-size: clamp(16px, 5vw, 24px);
  line-height: 1;
}

.simon-center-badge span {
  color: #9ca3af;
  font-size: clamp(10px, 3vw, 13px);
  margin-top: 4px;
  letter-spacing: 1px;
}

.simon-score-card {
  background: #030712;
  border: 1px solid #374151;
  border-radius: 14px;
  padding: 12px;
  margin: 14px 0 8px;
  text-align: left;
}

.simon-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.simon-score-header h3 {
  margin: 0;
  color: #facc15;
  font-size: 18px;
}

.simon-high-scores {
  display: grid;
  gap: 7px;
}

.simon-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  color: #d1d5db;
  padding: 7px 0;
  border-bottom: 1px solid #1f2937;
}

.simon-score-row:last-child {
  border-bottom: none;
}

.simon-score-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.simon-score-left strong {
  color: #93c5fd;
}

.simon-score-right {
  color: #22c55e;
  font-weight: bold;
  text-align: right;
  white-space: nowrap;
}

.simon-score-empty {
  margin: 8px 0;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 420px) {
  .simon-info {
    grid-template-columns: 1fr;
  }

  .simon-board {
    gap: 7px;
    padding: 8px;
    border-width: 7px;
  }

  .simon-center-badge {
    width: 38%;
    height: 38%;
    border-width: 6px;
  }

  .simon-score-row {
    grid-template-columns: 1fr;
  }

  .simon-score-right {
    text-align: left;
    padding-left: 34px;
  }
}
