* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: #0C0D14;
  font-family: 'Courier New', monospace;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  max-width: 480px;
  width: 100%;
}

/* -- Header -------------------------------------------------- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #00ff88;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.scores {
  display: flex;
  gap: 10px;
}

.score-box {
  background: #1a1b26;
  border: 1px solid #2a2b3a;
  border-radius: 8px;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.score-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
}

.score-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

/* -- Status -------------------------------------------------- */

#status {
  font-size: 14px;
  color: #888;
  letter-spacing: 1px;
  min-height: 20px;
  text-align: center;
}

/* -- Board --------------------------------------------------- */

.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
}

.pad {
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  outline: none;
  position: relative;
  overflow: hidden;
}

.pad:active:not(:disabled) {
  transform: scale(0.96);
}

.pad:disabled {
  cursor: default;
}

#pad-green {
  background: #22664a;
}

#pad-red {
  background: #662233;
}

#pad-yellow {
  background: #665522;
}

#pad-blue {
  background: #223366;
}

/* Active / lit state */
#pad-green.lit {
  background: #00ff88;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

#pad-red.lit {
  background: #ff4466;
  box-shadow: 0 0 30px rgba(255, 68, 102, 0.5);
}

#pad-yellow.lit {
  background: #ffcc00;
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.5);
}

#pad-blue.lit {
  background: #4488ff;
  box-shadow: 0 0 30px rgba(68, 136, 255, 0.5);
}

/* -- Start Button -------------------------------------------- */

.start-btn {
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  background: #00ff88;
  color: #0C0D14;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-transform: uppercase;
}

.start-btn:hover {
  background: #33ffaa;
}

.start-btn:active {
  transform: scale(0.96);
}

.start-btn.hidden {
  display: none;
}

/* -- Overlay ------------------------------------------------- */

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(12, 13, 20, 0.85);
  border-radius: 12px;
  z-index: 100;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}

.overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-text {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -1px;
  color: #ff4466;
}

.overlay-sub {
  font-size: 16px;
  color: #aaa;
  text-align: center;
  line-height: 1.5;
}

.overlay-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  background: #00ff88;
  color: #0C0D14;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s, transform 0.1s;
}

.overlay-btn:hover {
  background: #33ffaa;
}

.overlay-btn:active {
  transform: scale(0.96);
}

/* -- Responsive ---------------------------------------------- */

@media (max-width: 420px) {
  .container {
    padding: 12px;
    gap: 12px;
  }
  .title {
    font-size: 22px;
  }
  .board {
    gap: 8px;
    max-width: 280px;
  }
  .pad {
    border-radius: 12px;
  }
}
