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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #06142e 0%, #01010a 55%, #000 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #f8f8ff;
}

.wrapper {
  width: 100%;
  max-width: 620px;
  padding: 16px;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.title {
  font-size: 1.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

.scoreboard {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  font-size: 0.95rem;
}

.score-label,
.lives-label {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.restart-btn {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  background: #f5c33b;
  color: #1b1b1b;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease,
    background 0.15s ease;
}

.restart-btn:hover {
  background: #ffd54a;
}

.restart-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

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

canvas {
  border-radius: 8px;
  border: 2px solid #0ff;
  background: #000016;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.3);
  max-width: 100%;
}

.hint {
  font-size: 0.8rem;
  opacity: 0.75;
  text-align: center;
}

@media (max-width: 520px) {
  .title {
    font-size: 1.4rem;
  }

  canvas {
    width: 100%;
    height: auto;
  }
}

