:root {
  --sky-top: #66d9ff;
  --sky-bottom: #b6f7ff;
  --ground: #d6b36a;
  --pipe: #3da64b;
  --pipe-dark: #2b7633;
  --text: #0f2530;
  --panel: rgba(255, 255, 255, 0.78);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, #ffffff99, transparent 35%),
    radial-gradient(circle at 80% 10%, #ffffff80, transparent 30%),
    linear-gradient(180deg, #6ee7ff 0%, #b9f6ff 55%, #dffaff 100%);
}

.page {
  width: min(100%, 520px);
  padding: 16px;
}

h1 {
  margin: 0 0 10px;
  text-align: center;
  letter-spacing: 0.6px;
}

.game-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 3px solid #0f253055;
  border-radius: 12px;
  box-shadow: 0 10px 28px #0f253033;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
}

.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--panel);
  backdrop-filter: blur(2px);
}

.score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 90px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background: linear-gradient(180deg, #00000010, #00000030);
  border-radius: 12px;
  color: #fff;
  text-shadow: 0 2px 4px #00000066;
}

.overlay p {
  margin: 0;
}

#overlay-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.hint {
  font-size: 0.96rem;
}

.overlay.hidden {
  display: none;
}
