:root {
  --bg-1: #0e1d3a;
  --bg-2: #1d3c6a;
  --bg-3: #f2a94d;
  --panel: rgba(11, 20, 39, 0.75);
  --text: #f8fafc;
  --green: #1fcd7a;
  --red: #ef4444;
  --yellow: #facc15;
  --blue: #3b82f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.2), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(248, 250, 252, 0.18), transparent 30%),
    linear-gradient(130deg, var(--bg-1), var(--bg-2) 40%, var(--bg-3));
}

.home-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #0b1328;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(5, 10, 20, 0.22);
}

.app {
  width: min(94vw, 460px);
  text-align: center;
  animation: intro 450ms ease-out;
}

h1 {
  margin: 0 0 8px;
  font-family: "Bungee", cursive;
  letter-spacing: 2px;
  font-size: clamp(2rem, 8vw, 3rem);
}

.subtitle {
  margin: 0 0 20px;
  font-size: 1rem;
  opacity: 0.92;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 38px rgba(5, 10, 20, 0.35);
}

.stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

#status {
  margin: 12px 0 16px;
  min-height: 22px;
}

#start-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  font: 700 1rem "Space Grotesk", sans-serif;
  color: #0b1328;
  background: #ffffff;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
}

#start-btn:hover {
  transform: translateY(-2px);
}

#start-btn:active {
  transform: translateY(0);
}

.board {
  margin: 20px auto 0;
  width: min(90vw, 380px);
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pad {
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  opacity: 0.88;
  filter: saturate(0.9);
  transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.25);
}

.pad:hover {
  transform: scale(1.01);
}

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

.green {
  background: linear-gradient(155deg, #4ef1a0, var(--green));
}

.red {
  background: linear-gradient(155deg, #ff7979, var(--red));
}

.yellow {
  background: linear-gradient(155deg, #ffe066, var(--yellow));
}

.blue {
  background: linear-gradient(155deg, #7eb4ff, var(--blue));
}

.pad.active {
  opacity: 1;
  filter: saturate(1.2) brightness(1.1);
  box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 0 26px rgba(255, 255, 255, 0.4);
}

.board.locked .pad {
  cursor: not-allowed;
}

@keyframes intro {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
