body {
  font-family: Inter, sans-serif;
}
.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.score-pill {
  background: #1f2937;
  border-radius: 8px;
  padding: 5px 10px;
  text-align: center;
  min-width: 52px;
}
.score-pill .label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
}
.score-pill .value {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.mode-btn {
  border: 1px solid #e5e7eb;
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-btn:hover {
  border-color: #6ee7b7;
  color: #065f46;
  background: #f0fdf4;
}
.mode-btn.active {
  border-color: #059669;
  color: #065f46;
  background: #ecfdf5;
}

/* Simon board */
#simon-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.simon-btn {
  aspect-ratio: 1;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition:
    filter 0.05s,
    transform 0.05s;
  -webkit-tap-highlight-color: transparent;
  opacity: 0.45;
  position: relative;
}
.simon-btn.active {
  opacity: 1;
  filter: brightness(1.35);
  transform: scale(0.96);
}
.simon-btn.player-active {
  opacity: 1;
  filter: brightness(1.2);
  transform: scale(0.97);
}
.simon-btn:disabled {
  cursor: default;
}

.simon-btn.green {
  background: #16a34a;
}
.simon-btn.red {
  background: #dc2626;
}
.simon-btn.blue {
  background: #2563eb;
}
.simon-btn.yellow {
  background: #ca8a04;
}

/* Centre info */
#centre-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#status-text {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-top: 10px;
}

/* Progress dots */
.seq-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e7eb;
  display: inline-block;
}
.seq-dot.done {
  background: #059669;
}

/* Overlay for start / game over */
#board-wrap {
  position: relative;
}
#game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
#game-overlay.hidden {
  display: none;
}

@keyframes wrongShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  60% {
    transform: translateX(8px);
  }
}
.shake {
  animation: wrongShake 0.35s ease-in-out;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
.related-game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.related-game-card:hover {
  border-color: #6ee7b7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}
.related-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
