*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(ellipse at top, #1a1a2e 0%, #0f0f1a 60%, #050508 100%);
  color: #f0f0f5;
  transition: background 0.3s ease;
}

body.game-over {
  background: radial-gradient(ellipse at center, #3d0a0a 0%, #1a0505 60%, #0a0202 100%);
}

.game-wrapper {
  padding: 1.5rem;
  text-align: center;
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 30%, #a8b4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #b0b8d0;
  min-height: 1.6em;
}

.stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.stat {
  font-size: 0.95rem;
  color: #8892b0;
}

.stat strong {
  color: #e2e8ff;
  font-size: 1.4rem;
  margin-left: 0.25rem;
}

.board {
  position: relative;
  width: min(90vw, 420px);
  height: min(90vw, 420px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  border-radius: 50%;
  padding: 12px;
  background: #0a0a14;
  box-shadow:
    0 0 0 6px #1e1e30,
    0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.pad {
  border: none;
  cursor: pointer;
  border-radius: 12px;
  transition: filter 0.1s ease, transform 0.1s ease;
  opacity: 0.75;
}

.pad:disabled {
  cursor: default;
}

.pad:not(:disabled):hover {
  filter: brightness(1.15);
}

.pad:active:not(:disabled) {
  transform: scale(0.97);
}

.pad.active {
  opacity: 1;
  filter: brightness(2.2) saturate(1.3);
  box-shadow: 0 0 30px currentColor;
}

.pad.wrong {
  animation: wrong-flash 0.4s ease;
}

@keyframes wrong-flash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(3) hue-rotate(-30deg); }
}

.green  { background: #2ecc71; color: #2ecc71; border-radius: 100% 12px 12px 12px; }
.red    { background: #e74c3c; color: #e74c3c; border-radius: 12px 100% 12px 12px; }
.yellow { background: #f1c40f; color: #f1c40f; border-radius: 12px 12px 12px 100%; }
.blue   { background: #3498db; color: #3498db; border-radius: 12px 12px 100% 12px; }

.board-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background: #12121f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px #1e1e30,
    inset 0 0 20px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.start-btn {
  background: linear-gradient(135deg, #5b6ee1, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 20px rgba(91, 110, 225, 0.4);
}

.start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(91, 110, 225, 0.6);
}

.start-btn:active {
  transform: scale(0.97);
}

.start-btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}
