* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #2b1055 0%, #0f0c29 70%, #000000 100%);
  font-family: 'Segoe UI', Verdana, sans-serif;
  overflow: hidden;
}

.game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.title {
  color: #fff;
  font-size: 4rem;
  letter-spacing: 1rem;
  margin: 0;
  text-shadow:
    0 0 10px #ff00de,
    0 0 20px #00d4ff,
    0 0 40px #ff00de;
  animation: glow 2.5s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 10px #ff00de, 0 0 20px #00d4ff, 0 0 30px #ff00de; }
  to   { text-shadow: 0 0 20px #00d4ff, 0 0 40px #ff00de, 0 0 60px #00d4ff; }
}

.board {
  position: relative;
  width: min(90vw, 560px);
  height: min(90vw, 560px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  border-radius: 50%;
  padding: 14px;
  background: #000;
  box-shadow:
    0 0 0 8px #1a1a1a,
    0 0 40px rgba(0,0,0,0.8),
    inset 0 0 30px rgba(0,0,0,0.9);
}

.pad {
  cursor: pointer;
  filter: brightness(0.65) saturate(0.9);
  transition: filter 0.08s ease, transform 0.08s ease;
  outline: none;
}

.pad:active {
  transform: scale(0.97);
}

.pad.lit {
  filter: brightness(1.9) saturate(1.4);
}

#green {
  background: #00ff5a;
  border-radius: 100% 0 0 0;
  box-shadow: -4px -4px 20px rgba(0,255,90,0.35);
}

#red {
  background: #ff2b2b;
  border-radius: 0 100% 0 0;
  box-shadow: 4px -4px 20px rgba(255,43,43,0.35);
}

#yellow {
  background: #ffe600;
  border-radius: 0 0 0 100%;
  box-shadow: -4px 4px 20px rgba(255,230,0,0.35);
}

#blue {
  background: #00b3ff;
  border-radius: 0 0 100% 0;
  box-shadow: 4px 4px 20px rgba(0,179,255,0.35);
}

#green.lit   { box-shadow: 0 0 60px 15px rgba(0,255,90,0.9); }
#red.lit     { box-shadow: 0 0 60px 15px rgba(255,43,43,0.9); }
#yellow.lit  { box-shadow: 0 0 60px 15px rgba(255,230,0,0.9); }
#blue.lit    { box-shadow: 0 0 60px 15px rgba(0,179,255,0.9); }

.center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42%;
  height: 42%;
  background: #111;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.9), inset 0 0 15px rgba(255,255,255,0.05);
  z-index: 2;
  padding: 10px;
  text-align: center;
}

.score-label {
  color: #888;
  font-size: 0.8rem;
  letter-spacing: 3px;
}

.score {
  color: #fff;
  font-size: 2.6rem;
  font-weight: bold;
  text-shadow: 0 0 10px #00d4ff;
}

.start-btn {
  margin-top: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, #ff00de, #00d4ff);
  color: #fff;
  font-weight: bold;
  letter-spacing: 2px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(0,212,255,0.7);
}

.start-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.message {
  color: #bbb;
  font-size: 0.75rem;
  margin-top: 4px;
  min-height: 1em;
}

.board.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 0); }
  40% { transform: translate(8px, 0); }
  60% { transform: translate(-6px, 0); }
  80% { transform: translate(6px, 0); }
}

@media (max-width: 480px) {
  .title { font-size: 2.4rem; letter-spacing: 0.5rem; }
  .score { font-size: 1.8rem; }
}
