html, body { background: #0b6fb8; }

/* ---- scenery ---- */
#sea { position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(#bfe9ff 0, #bfe9ff 9%, #4fc3f7 9%, #1e88e5 55%, #0d47a1 100%); }
#waves { position: absolute; left: 0; right: 0; top: 7.5%; height: 3vh;
  background: radial-gradient(circle at 50% 100%, #4fc3f7 48%, transparent 50%) 0 0 / 6vh 3vh repeat-x;
  animation: wave 4s linear infinite; }
@keyframes wave { to { background-position: 6vh 0; } }
#seabed { position: absolute; left: 0; right: 0; bottom: 0; height: 9vh;
  background: #f2d28b; border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
.weed { position: absolute; bottom: 5vh; width: 6vh; height: 16vh; transform-origin: bottom center;
  animation: sway 3s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.bubble { position: absolute; bottom: -5vh; border-radius: 50%; border: .5vh solid #ffffff99;
  background: #ffffff33; animation: rise linear forwards; pointer-events: none; }
@keyframes rise { to { transform: translateY(-110vh); } }

/* ---- fish ---- */
.fish { position: absolute; left: 0; top: 0; cursor: pointer; will-change: transform; }
.fish .flip { width: 100%; height: 100%; }
.fish svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 .6vh .4vh #0004); }
.fish.target { z-index: 2; }  /* target fish are never blocked by others */
.fish.fadein { animation: fadein .6s both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.fish .body { width: 100%; height: 100%; }
.shake .body { animation: shake .5s; }
@keyframes shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }

/* ---- hook ---- */
.hook { position: absolute; top: 0; width: 0; height: 0; z-index: 5; pointer-events: none; }
.hook .line { position: absolute; left: -.3vh; top: 0; width: .6vh; height: 0; background: #fff; border-radius: .3vh;
  box-shadow: 0 0 .5vh #0006; }
.hook .hk { position: absolute; width: 5vh; height: 6vh; margin-left: -2.5vh; }
.hook .caught { position: absolute; transform-origin: 50% 0; }

.splash { position: absolute; z-index: 4; width: 1.6vh; height: 1.6vh; border-radius: 50%;
  background: #ffffffcc; pointer-events: none; }

/* ---- HUD ---- */
#hud { position: absolute; left: 0; right: 0; top: 0; padding: 1.2vh 2vw; display: flex; align-items: center;
  gap: 2vw; pointer-events: none; z-index: 10; }
#target { display: flex; align-items: center; gap: 1.5vw; background: #fffc; border-radius: 4vh; padding: .6vh 2vw .6vh 1vw;
  box-shadow: 0 .6vh 1.2vh #0003; }
#targetFish { width: 14vh; height: 9.4vh; }
#targetFish svg { width: 100%; height: 100%; }
#targetFish.pulse { animation: pulse 1s ease-in-out 3; }
@keyframes pulse { 50% { transform: scale(1.25); } }
#targetText { font-size: 5vh; font-weight: 800; color: #0d47a1; text-transform: uppercase; letter-spacing: .1vh; }
#slots { display: flex; flex-wrap: wrap; gap: .8vh; flex: 1; justify-content: center; max-width: 52vw; margin-left: auto; margin-right: 8vw; }
.slot { width: 6vh; height: 4vh; opacity: .35; filter: grayscale(1) brightness(1.6); transition: all .3s; }
.slot svg { width: 100%; height: 100%; }
.slot.on { opacity: 1; filter: none; animation: pop .5s; }
@keyframes pop { 40% { transform: scale(1.6) rotate(-10deg); } }

/* ---- fish end screen ---- */
#doneFish { display: flex; flex-wrap: wrap; gap: 1.5vh; justify-content: center; max-width: 80vw; }
#doneFish svg { width: 10vh; height: 6.7vh; animation: bounce 1s ease-in-out infinite alternate; }
#doneFish svg:nth-child(odd) { animation-delay: .25s; }
@keyframes bounce { to { transform: translateY(-1.5vh) rotate(6deg); } }

/* ---- portrait (phones): color label on top, progress fish in a row beneath ---- */
@media (max-aspect-ratio: 1/1) {
  #hud { flex-wrap: wrap; align-items: flex-start; gap: 1.5vw; padding: 2vw; }
  #target { padding: 1vw 4vw 1vw 2vw; gap: 2vw; }
  #targetFish { width: 22vw; height: 14.7vw; }
  #targetText { font-size: 8vw; }
  #slots { flex-basis: 100%; max-width: none; margin: 0; flex-wrap: nowrap; gap: 1vw; justify-content: center; }
  .slot { width: 8.6vw; height: 5.7vw; }
  #doneFish svg { width: 17vw; height: 11.3vw; }
}

