:root {
  --color-cream: #fff8e7;
  --color-ink: #1e2a33;
  --color-coral: #61b28e;
  --color-coral-dark: #4f8874;
  --color-sun: #ffce54;
  --color-teal: #1c8fa3;
  --shadow-soft: 0 8px 24px rgba(10, 40, 50, 0.25);
  --font-fun: "Baloo 2", "Trebuchet MS", sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d5f78;
  font-family: var(--font-fun);
  color: var(--color-ink);
}

#scene {
  position: fixed;
  inset: 0;
  display: block;
  /* Hotspot (0 16) lines up with the hook's point, not the image's corner,
     see media/svg/hook-cursor.svg. Elements with their own cursor rule
     (start panel buttons, mute toggle) override this naturally since
     they're more specific/topmost, no extra exception needed here. */
  cursor: url("../media/svg/hook-cursor.svg") 0 16, crosshair;
}

main {
  position: relative;
  z-index: 1;
}

/* start overlay */

#start-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(28, 143, 163, 0.55), rgba(6, 40, 52, 0.75));
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#footer {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

#footer p {
  font-family: "Schoolbell", "Trebuchet MS", sans-serif;
  font-size: 0.85rem;
  color: var(--color-cream);
  opacity: 0.5;
}

#start-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-panel {
  /* background: var(--color-cream); */
  border-radius: 28px;
  padding: 2.5rem 3rem;
  text-align: center;
  /* box-shadow: var(--shadow-soft); */
  max-width: min(90vw, 420px);
  /* border: 4px solid rgba(255, 255, 255, 0.6); */
}

.start-panel h1 {
  font-family: 'Barrio', 'Trebuchet MS', sans-serif;
  font-size: 10rem;
  font-weight: 800;
  color: var(--color-cream);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.start-panel p {
  font-family: 'Schoolbell', 'Trebuchet MS', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--color-cream);
  opacity: 0.85;
}

#start-button {
  font-family: 'Schoolbell', 'Trebuchet MS', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  background: transparent;
  color: var(--color-cream);
  border: solid 2px var(--color-cream);
  border-radius: 999px;
  padding: 0.85rem 2.2rem;
  cursor: pointer;
  box-shadow: 4px 6px 24px #111c4257, var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.15s ease;
}

#start-button:hover {
  transform: translateY(-2px);
  transform: scale(1.05);
  background-color: var(--color-teal);
  transition: all 0.3s ease;
}

#start-button:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #b5431f, var(--shadow-soft);
}

/* hud tray */

#hud-tray {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  /* flex-wrap: wrap; */
  width: 100%;
  justify-content: space-between;
  gap: 22px;
  max-width: min(90vw, 480px);
}

.tray-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-icon {
  display: block;
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 3px rgba(10, 40, 50, 0.45));
}

.tray-count {
  font-family: "Schoolbell", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-cream);
  min-width: 1ch;
  filter: drop-shadow(0 2px 3px rgba(10, 40, 50, 0.45));
}

/* mute button */

#mute-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: solid 2px var(--color-cream);
  background: transparent;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-teal);
  transition: transform 0.3s ease;
}

#mute-toggle:hover {
  transform: scale(1.08);
  transition: transform 0.3s ease;
}

#mute-toggle svg {
  width: 22px;
  height: 22px;
  fill: var(--color-cream)
}

/* catch effects layer */

#catch-fx-layer {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.catch-glow {
  position: fixed;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 255, 141, 0.95), rgba(255, 206, 84, 0));
  pointer-events: none;
  filter: blur(12px);
}

.catch-bubble {
  position: fixed;
  width: 220px;
  height: 140px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bubble-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--color-cream);
  /* stroke: var(--color-coral-dark);
  stroke-width: 3; */
  filter: drop-shadow(0 6px 10px rgba(10, 40, 50, 0.3));
}

.bubble-text {
  position: relative;
  z-index: 1;
  font-family: "Schoolbell", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-ink);
  padding: 0 1.6rem;
  line-height: 1.2;
}

.catch-fish-icon {
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(10, 40, 50, 0.35));
}

@media (max-width: 480px) {
  .start-panel {
    padding: 2rem 1.75rem;
  }

  .start-panel h1 {
    font-size: 7rem;
  }

  .start-panel p {
    font-size: 1.1rem;
  }

  #hud-tray {
    max-width: 90vw;
    bottom: 12px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    gap: 14px;
  }

  #mute-toggle {
    top: 12px;
    right: 12px;
  }
}