:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1f2a36;
  background: #f4f5f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 32px 16px 48px;
}

.game-wrapper {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

header {
  text-align: center;
}

header h1 {
  margin: 0 0 8px;
  font-size: 2.5rem;
}

header p {
  margin: 0;
  color: #51606f;
}

.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(31, 42, 54, 0.08);
}

.hud .label {
  font-weight: 600;
}

#reset-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  background: #f26f4c;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#reset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(242, 111, 76, 0.3);
}

canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 520;
  border-radius: 16px;
  background: linear-gradient(180deg, #bee5ff 0%, #ffffff 55%, #e7f3ff 100%);
  border: 4px solid #ffffff;
  box-shadow: 0 12px 30px rgba(31, 42, 54, 0.12);
  touch-action: none;
}

.instructions {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 20px rgba(31, 42, 54, 0.08);
}

.instructions h2 {
  margin-top: 0;
}

.instructions ul {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 640px) {
  body {
    padding: 20px 12px 32px;
  }

  header h1 {
    font-size: 2rem;
  }

  .hud {
    flex-direction: column;
    align-items: flex-start;
  }

  #reset-btn {
    width: 100%;
    text-align: center;
  }
}
