* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #0d3f74;
  font-family: 'Baloo 2', system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

/* #app is positioned + sized + (in portrait) rotated to landscape by the script.
   Its transform makes it the containing block for the fixed-position controls inside. */
#app {
  position: fixed;
  top: 0;
  left: 0;
  transform-origin: top left;
}

#tank {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#tank:active { cursor: grabbing; }

.studio-link {
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #0d3f74;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}
.studio-link:hover { transform: translateY(-2px) scale(1.04); background: #fff; }

.hud-hint {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 63, 116, 0.55);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: clamp(0.75rem, 2.2vw, 0.95rem);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(4px);
  animation: fade-hint 1s ease 8s forwards;
}
@keyframes fade-hint { to { opacity: 0; } }

/* a horizontal row of controls along the bottom, sitting on the sand so it keeps the
   water/fish area clear */
.controls-cluster {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 0 8px;
}
.ctrl {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0d3f74;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, background 0.12s ease;
}
.ctrl:hover { transform: scale(1.08); background: #fff; }
.ctrl:active { transform: scale(0.96); }
.ctrl.feed {
  width: auto;
  padding: 0 18px;
  border-radius: 999px;
  background: #ffd24a;
  font-size: 1rem;
}
.ctrl.feed:hover { background: #ffe27a; }
