:root {
  --deep: #083344;
  --water: #0891b2;
  --foam: #cffafe;
  --mint: #67e8f9;
  --gold: #facc15;
  --coral: #fb7185;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  touch-action: manipulation;
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: 'Outfit', 'M PLUS Rounded 1c', sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at 22% 12%, rgba(103, 232, 249, 0.24), transparent 32%),
    radial-gradient(circle at 80% 12%, rgba(250, 204, 21, 0.18), transparent 28%),
    linear-gradient(160deg, #05202e, #083344 54%, #0e7490);
}

#app {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px;
}

.back-link {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 20;
  padding: 8px 14px;
  border: 1px solid rgba(207, 250, 254, 0.28);
  border-radius: 999px;
  color: var(--foam);
  background: rgba(5, 32, 46, 0.72);
  text-decoration: none;
  font-weight: 900;
  font-size: 0.78rem;
  backdrop-filter: blur(12px);
}

.game-shell {
  width: min(450px, 100%);
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding-top: 38px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

h1 {
  font-size: 2.24rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

h1 span {
  color: var(--mint);
}

.wallet {
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  text-align: right;
}

.wallet span,
.stats span {
  display: block;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stats div {
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.stats b {
  display: block;
  margin-top: 3px;
  font-size: 1.16rem;
}

.pond {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(207, 250, 254, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(207, 250, 254, 0.1), rgba(8, 145, 178, 0.18)),
    rgba(0, 0, 0, 0.18);
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.24);
}

.pond::after {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -26px;
  height: 110px;
  background: repeating-radial-gradient(ellipse at center, rgba(103,232,249,.18) 0 12px, rgba(103,232,249,.05) 12px 24px);
  opacity: 0.72;
}

.skyline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  color: var(--foam);
  font-size: 3rem;
  font-weight: 900;
}

.timing-track {
  position: relative;
  z-index: 2;
  height: 42px;
  margin: 24px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.catch-zone {
  position: absolute;
  left: 41%;
  width: 18%;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(250,204,21,.2), rgba(250,204,21,.92), rgba(250,204,21,.2));
  box-shadow: 0 0 28px rgba(250, 204, 21, 0.62);
}

.bobber {
  position: absolute;
  top: 5px;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, var(--coral));
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.72);
  transform: translateX(0);
}

#message {
  position: relative;
  z-index: 2;
  min-height: 44px;
  color: rgba(255,255,255,.82);
  font-weight: 800;
  line-height: 1.45;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.actions button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  color: #04131d;
  background: var(--foam);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.24);
}

#start-btn {
  background: linear-gradient(135deg, var(--mint), var(--gold));
}

#claim-btn {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--gold), var(--coral));
}

.actions button:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.24);
}

.actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 390px) {
  #app {
    padding: 12px;
  }

  h1 {
    font-size: 1.85rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .pond {
    min-height: 224px;
    padding: 16px;
  }
}

@media (max-height: 700px) {
  .game-shell {
    justify-content: flex-start;
    gap: 10px;
    padding-top: 42px;
  }

  .pond {
    min-height: 220px;
  }

  .actions button {
    min-height: 48px;
  }
}
