:root {
  --ink: #15324b;
  --coral: #ff6f61;
  --gold: #ffd166;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(#8be2ef 0%, #b9f4e4 44%, #fedf89 45%, #f6bd60 100%);
  display: grid;
  place-items: center;
  padding: 20px;
}

.game-shell { width: min(980px, 100%); }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--ink); font-weight: 800; }

.top-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.eyebrow { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: #0b7189; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 8vw, 4rem); line-height: 0.95; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 10px;
  min-width: min(360px, 100%);
}

.stats div {
  min-height: 70px;
  padding: 10px;
  border: 3px solid rgba(21, 50, 75, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
  text-align: center;
}

.stats span { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.stats strong { display: block; margin-top: 4px; font-size: 1.8rem; }

.game-board {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: min(68vh, 640px);
  min-height: 500px;
  border: 5px solid rgba(21, 50, 75, 0.25);
  border-radius: 8px;
  background: linear-gradient(180deg, #7ae1ee 0 22%, #16a7b8 22% 100%);
  box-shadow: 0 22px 60px rgba(13, 56, 87, 0.24);
}

.sun {
  position: absolute;
  top: 24px;
  right: 36px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 18px rgba(255, 209, 102, 0.27);
}

.lane {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 90px;
  border-radius: 50%;
  border-top: 9px solid rgba(255, 255, 255, 0.55);
  animation: water 2.3s linear infinite;
}

.lane-one { bottom: 190px; }
.lane-two { bottom: 70px; animation-delay: -1s; }

.surfer {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 8;
  width: 120px;
  height: 105px;
  transform: translateX(-50%);
  transition: left 0.16s ease;
  filter: drop-shadow(0 10px 10px rgba(0, 43, 74, 0.28));
}

.obstacle,
.bonus {
  position: absolute;
  top: -90px;
  z-index: 7;
  width: var(--size);
  height: var(--size);
  background: transparent var(--image) center / contain no-repeat;
  animation: slideDown var(--speed) linear forwards;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 26px;
  text-align: center;
  background: rgba(255, 253, 247, 0.78);
  backdrop-filter: blur(6px);
}

.overlay.hidden { display: none; }
.hero-icon { width: 130px; height: 130px; }
.overlay h2 { width: min(620px, 100%); margin-bottom: 0; font-size: clamp(1.55rem, 4vw, 2.6rem); line-height: 1.05; }
.overlay p { max-width: 560px; margin-bottom: 4px; font-weight: 700; }

button {
  min-width: 130px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--coral);
  box-shadow: 0 8px 0 #c54642;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
}

@keyframes slideDown {
  from { top: -90px; }
  to { top: calc(100% + 90px); }
}

@keyframes water {
  from { translate: -26px 0; }
  to { translate: 26px 0; }
}

@media (max-width: 720px) {
  body { padding: 12px; }
  .top-panel { display: block; }
  .stats { margin-top: 12px; }
  .game-board { min-height: 470px; height: 64vh; }
  .surfer { width: 98px; height: 88px; }
}
