:root {
  --bg: #0a0a1a;
  --panel: #14142b;
  --accent: #ff2d78;
  --accent-2: #2dd4ff;
  --text: #f5f5ff;
  --muted: #8888aa;
  --slot-text: #0a0a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  padding: 20px;
}

#app {
  width: 100%;
  max-width: 600px;
}

.screen { display: none; }
.screen.active { display: block; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); }

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stepper button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}
#player-count-value { font-size: 24px; min-width: 30px; text-align: center; }

.player-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.player-name-input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--panel);
  background: var(--panel);
  color: var(--text);
}

#round-count {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--panel);
  background: var(--panel);
  color: var(--text);
  width: 100%;
}

.errors { color: var(--accent); min-height: 20px; margin-bottom: 12px; }

.primary-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.secondary-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--panel);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  margin-top: 10px;
  cursor: pointer;
}

.hud {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.drop-btn {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.drop-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.shake-btn {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--panel);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

@keyframes board-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.board-wrap.shaking {
  animation: board-shake 0.4s ease-in-out;
}

.board-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
#board-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  cursor: pointer;
}

.slot-labels {
  display: flex;
  width: 100%;
  gap: 2px;
  margin-top: 4px;
}
.slot-label {
  flex: 1;
  text-align: center;
  font-size: 11px;
  padding: 4px 2px;
  border-radius: 4px;
  color: var(--slot-text);
}
.slot-name { display: block; font-weight: 600; }
.slot-score { display: block; font-weight: bold; }

.notification {
  text-align: center;
  padding: 10px;
  color: var(--accent-2);
  font-weight: bold;
  min-height: 24px;
}
.notification.hidden { visibility: hidden; }

.results-list {
  list-style: none;
  padding: 0;
}
.results-list li {
  padding: 12px;
  background: var(--panel);
  margin-bottom: 8px;
  border-radius: 8px;
}
