:root {
  color-scheme: dark;
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: #111;
  color: #f5f5f5;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(900px, 90vw);
}

.panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.panel h1,
.panel h2 {
  margin: 0 0 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stats {
  display: flex;
  gap: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 4.5rem;
}

.label {
  font-size: 0.78rem;
  color: #9da3af;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.value {
  font-size: 1.6rem;
  font-weight: 700;
}

.playfield {
  display: grid;
  grid-template-columns: auto 220px;
  gap: 1rem;
  align-items: start;
}

#board {
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.6));
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.controls {
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

canvas {
  display: block;
}

@media (max-width: 780px) {
  .playfield {
    grid-template-columns: 1fr;
  }

  .side-panel {
    flex-direction: row;
    justify-content: space-between;
  }

  #next {
    width: 90px;
    height: 90px;
  }
}
