* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #111;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  display: grid;
  place-items: center;
}

.game-shell {
  position: relative;
  width: min(100vw, 480px);
  height: min(100vh, 800px);
  aspect-ratio: 3 / 5;
  overflow: hidden;
  background: #70c5ce;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .16);
}

.hidden {
  display: none !important;
}

.panel {
  width: min(90%, 330px);
  padding: 30px 24px 24px;
  text-align: center;
  color: #fff;
  background: rgba(20, 24, 28, .88);
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}

.bird-logo {
  font-size: 62px;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 5px 0 rgba(0,0,0,.15));
}

h1, h2 {
  margin: 0 0 12px;
  letter-spacing: 2px;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 30px;
}

p {
  margin: 0 auto 22px;
  max-width: 270px;
  line-height: 1.45;
  color: #d8dde1;
}

button {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  background: #f7c945;
  color: #241f0d;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), 0 7px 18px rgba(0,0,0,.22);
}

button:active {
  transform: translateY(2px);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.18);
}

button.secondary {
  margin-top: 10px;
  background: rgba(255,255,255,.1);
  color: #fff;
  box-shadow: none;
}

.best {
  margin-top: 18px;
  color: #bfc7cc;
  font-size: 14px;
}

.hud {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  color: white;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}

#score {
  font-size: 56px;
  line-height: 1;
  font-weight: 900;
}

.hint {
  margin-top: 6px;
  opacity: .65;
  font-size: 10px;
  letter-spacing: 1px;
}

.scores {
  display: flex;
  gap: 12px;
  margin: 22px 0;
}

.scores > div {
  flex: 1;
  padding: 13px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
}

.scores span {
  display: block;
  color: #aeb7bd;
  font-size: 11px;
  margin-bottom: 5px;
}

.scores strong {
  font-size: 27px;
}

@media (max-width: 480px), (max-height: 800px) {
  .game-shell {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
  }

  .panel {
    padding: 25px 20px 20px;
  }

  .hint {
    display: none;
  }
}
