* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a2a3a;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

#game-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

#hud {
  position: absolute;
  top: 6%;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

#score {
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 3px 0 #2a4a6a,
    0 6px 16px rgba(0, 0, 0, 0.35);
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#score.show {
  opacity: 1;
}

#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 24, 40, 0.28);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

#panel {
  width: min(360px, 86vw);
  padding: 36px 28px 28px;
  background: linear-gradient(180deg, #fff8e8 0%, #f3e2c4 100%);
  border-radius: 28px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: center;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.3s ease;
}

#overlay.visible #panel {
  transform: translateY(0) scale(1);
}

#bird-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 38%, #fff 0 7px, transparent 8px),
    radial-gradient(circle at 64% 38%, #222 0 3.5px, transparent 4px),
    radial-gradient(circle at 50% 55%, #ffb347 0 28px, transparent 29px);
  box-shadow: 0 8px 0 #e8942a;
  position: relative;
}

#bird-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 34px;
  border-left: 16px solid #ff6b35;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

h1 {
  font-size: clamp(28px, 8vw, 38px);
  letter-spacing: 3px;
  color: #2b4c6f;
  margin-bottom: 8px;
}

#subtitle {
  color: #6b7c8d;
  font-size: 15px;
  margin-bottom: 22px;
}

#stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 22px;
}

#stats.hidden {
  display: none;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: #8a7a62;
}

#final-score,
#best-score {
  font-size: 32px;
  font-weight: 800;
  color: #2b4c6f;
}

#action-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 14px 0 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(180deg, #ffb347 0%, #ff8c42 100%);
  box-shadow: 0 6px 0 #d66b18;
  cursor: pointer;
  font-family: inherit;
}

#action-btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #d66b18;
}
