
.progress-header {
  text-align: center;
  margin-bottom: 20px;
  color: #004d40;
}

.simulation-controls {
  display: none;
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 780px;
  position: relative;
}
.simulation-controls.visible {
  display: flex;
}
#closeControlsBtnAqua {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
}
#closeControlsBtnAqua:hover {
  color: #343a40;
}
.control-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.simulation-controls label {
  font-weight: bold;
  color: #343a40;
  font-size: 13px;
}
.simulation-controls select,
.simulation-controls input[type="range"],
.simulation-controls button {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ced4da;
  font-size: 14px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.simulation-controls select {
  min-width: 100px;
}
.simulation-controls input[type="range"] {
  flex-grow: 1;
  max-width: 200px;
  margin-top: 2px;
}
.simulation-controls button#overviewButtonAqua {
  background-color: #28a745;
  color: white;
  cursor: pointer;
  border: none;
  padding: 10px 15px;
  transition: background-color 0.2s ease;
}
.simulation-controls button#overviewButtonAqua:hover {
  background-color: #218838;
}
#performanceValueAqua {
  min-width: 40px;
  text-align: right;
  font-weight: bold;
  color: #495057;
  font-size: 14px;
  margin-left: 5px;
}
.slider-group {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
}

/* ============================================
   RESPONSIVE AQUARIUM SIZING
   Uses CSS calc() to smoothly fit available space below menu bar.
   The height adapts automatically on window resize without JS.
   ============================================ */
#aquarium {
  --menu-bar-height: 65px; /* Desktop menu bar height */
  --aquarium-padding: 20px; /* Space around aquarium */

  width: 100%;
  max-width: 1200px;

  /* Responsive height: fills available viewport minus menu and padding */
  height: calc(100vh - var(--menu-bar-height) - var(--aquarium-padding));
  height: calc(100dvh - var(--menu-bar-height) - var(--aquarium-padding)); /* Dynamic viewport for mobile */
  min-height: 400px; /* Minimum usable height */
  max-height: 1200px; /* Cap for very tall screens */

  background: linear-gradient(to bottom, #87CEEB 0%, #4682B4 70%, #3672A4 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;

  /* Smooth transitions for resize */
  transition: height 0.15s ease-out;
}

#aquarium::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      ellipse 50% 100% at 50% -10%,
      rgba(255, 255, 230, 0.35) 0%,
      rgba(255, 255, 230, 0.2) 20%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 90% at 25% -5%,
      rgba(255, 255, 230, 0.25) 0%,
      rgba(255, 255, 230, 0.15) 25%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 40% 90% at 75% -5%,
      rgba(255, 255, 230, 0.25) 0%,
      rgba(255, 255, 230, 0.15) 25%,
      transparent 65%
    );
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: soft-light;
  animation: swayTorchlight 15s ease-in-out infinite alternate;
}
@keyframes swayTorchlight {
  0% {
    transform: perspective(500px) rotateY(-1deg) rotateX(0.5deg)
      translateX(-2px);
    opacity: 0.8;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    transform: perspective(500px) rotateY(1deg) rotateX(-0.5deg) translateX(2px);
    opacity: 0.8;
  }
}

/* ============================================
   FULLSCREEN TOGGLE BUTTON
   ============================================ */
#aquariumFullscreenBtn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 55;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.35);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#aquariumFullscreenBtn:hover {
  background-color: rgba(0, 0, 0, 0.55);
  transform: scale(1.1);
}
#aquariumFullscreenBtn:active {
  transform: scale(0.95);
}

/* ============================================
   FULLSCREEN MODE — Native Fullscreen API
   ============================================ */
#aquarium:fullscreen,
#aquarium:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transition: none !important;
  background: linear-gradient(to bottom, #87CEEB 0%, #4682B4 70%, #3672A4 100%);
}
#aquarium:fullscreen #overviewOverlayAqua,
#aquarium:-webkit-full-screen #overviewOverlayAqua {
  height: 100%;
}
#aquarium:fullscreen #aquariumFullscreenBtn,
#aquarium:-webkit-full-screen #aquariumFullscreenBtn {
  bottom: 16px;
  right: 16px;
}

/* Fullscreen: scale up pills and text by ~20% */
#aquarium:fullscreen .clickable-pill,
#aquarium:-webkit-full-screen .clickable-pill {
  min-width: 53px !important;
  height: 36px !important;
  font-size: 16px !important;
  padding: 0 10px !important;
  border-radius: 14px !important;
}
#aquarium:fullscreen .game-stats-container,
#aquarium:-webkit-full-screen .game-stats-container {
  gap: 7px !important;
}
#aquarium:fullscreen .performance-display,
#aquarium:-webkit-full-screen .performance-display {
  max-width: 168px !important;
}
#aquarium:fullscreen .performance-display .percentage-text,
#aquarium:-webkit-full-screen .performance-display .percentage-text {
  font-size: 20px !important;
}

/* ============================================
   FULLSCREEN MODE — CSS fallback (fills browser window)
   ============================================ */
#aquarium.aquarium-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 9999 !important;
  transition: none !important;
}
#aquarium.aquarium-fullscreen #overviewOverlayAqua {
  height: 100%;
}
#aquarium.aquarium-fullscreen #aquariumFullscreenBtn {
  bottom: 16px;
  right: 16px;
}

/* CSS-fallback fullscreen: scale up pills and text by ~20% */
#aquarium.aquarium-fullscreen .clickable-pill {
  min-width: 53px !important;
  height: 36px !important;
  font-size: 16px !important;
  padding: 0 10px !important;
  border-radius: 14px !important;
}
#aquarium.aquarium-fullscreen .game-stats-container {
  gap: 7px !important;
}
#aquarium.aquarium-fullscreen .performance-display {
  max-width: 168px !important;
}
#aquarium.aquarium-fullscreen .performance-display .percentage-text {
  font-size: 20px !important;
}

/* On mobile in fullscreen, position above any safe area */
@media (max-width: 767px) {
  #aquarium.aquarium-fullscreen #aquariumFullscreenBtn,
  #aquarium:fullscreen #aquariumFullscreenBtn,
  #aquarium:-webkit-full-screen #aquariumFullscreenBtn {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
  }
}

#aquariumOverviewToggleBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 55;
  padding: 6px 10px;
  font-size: 12px;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#aquariumOverviewToggleBtn:hover {
  background-color: rgba(0, 0, 0, 0.5);
}
/* No longer hiding based on .overview-active for #aquarium, text will change */

/* Hide shop creatures when overview is active — keeps decorations and background visible.
   Uses CSS class so creatures rendered after forceShowOverview() are still hidden. */
#aquarium.overview-active .aquarium-creature {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#overviewOverlayAqua {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.35);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
#overviewFishContainerAqua {
  width: 95%;
  height: 95%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(6, auto);
  gap: 10px;
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
}
@media (min-width: 600px) and (min-height: 400px), (orientation: landscape) {
  #overviewFishContainerAqua {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 15px;
  }
}
.overview-fish-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 10px;
  margin-bottom: 5px;
  /*background-color: rgba(4, 53, 72, 0.287);*/
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);
  transition: transform 0.2s ease;
  contain: layout style; /* Isolate repaints for better performance */
}

.overview-fish-item .fish {
  position: static !important;
  margin-bottom: 8px;
}
.performance-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 90%;
  max-width: 140px; /* Increased to accommodate larger text and pills */
  margin-top: 8px;
}
/* Clickable pill hover effect (desktop) */
.game-stats-container > div.clickable-pill {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.game-stats-container > div.clickable-pill:hover {
  transform: scale(1.18);
  filter: brightness(1.25);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.performance-display .percentage-text {
  color: white;
  font-size: 17px; /* Increased from 14px (+20%) */
  font-weight: bold;
  text-shadow: 1px 1px 1px black;
  white-space: nowrap;
  line-height: 1;
}
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background-color: #e53e3e;
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease-out;
}

/* ============================================
   WELCOME SLIDER (Progress Overview onboarding)
   ============================================ */
#welcomeSliderOverlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  animation: wsOverlayFadeIn 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.ws-slider-card,
.ws-slider-card * { box-sizing: border-box; }
.ws-slider-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  width: calc(100% - 24px);
  max-width: 320px;
  height: 480px;
  max-height: calc(100% - 24px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25), 0 0 40px rgba(0,0,0,0.08);
  overflow: hidden;
  font-family: 'Nunito', Arial, sans-serif;
  color: #1a1a2e;
  animation: wsCardScaleIn 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes wsOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes wsCardScaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #welcomeSliderOverlay,
  .ws-slider-card { animation: none; }
}
.ws-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.06);
  color: #6b7280;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 10;
}
.ws-close-btn:hover { background: rgba(0,0,0,0.1); color: #1a1a2e; }

/* Slides viewport & track
   The viewport is position:relative so the track can be absolutely positioned.
   This gives the track a definite width (= viewport width) which the slide
   flex-basis 100% can resolve against — avoids circular sizing in nested flex. */
.ws-slides-viewport {
  overflow: hidden;
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
}
.ws-slides-track {
  display: flex;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.ws-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.ws-slide-emoji { font-size: 32px; margin-bottom: 8px; }
.ws-slide-title {
  font-family: 'Fredoka', 'Nunito', Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.ws-slide-text { font-size: 14px; line-height: 1.5; color: #6b7280; }
.ws-slide-text strong { color: #1a1a2e; font-weight: 700; }

/* Slide 1: Fish */
.ws-fish-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  margin-top: 6px;
  background: linear-gradient(180deg, #e8f4f8 0%, #d4eef7 100%);
  border-radius: 12px;
}
.ws-fish-container svg { display: block; }
@keyframes wsWagTail { 0%,100%{transform:rotate(-15deg)} 50%{transform:rotate(15deg)} }
@keyframes wsSwayDorsal { 0%,100%{transform:rotate(-4deg)} 50%{transform:rotate(4deg)} }
@keyframes wsFlapPec { 0%,100%{transform:rotate(-20deg) scaleY(0.9)} 50%{transform:rotate(15deg) scaleY(1)} }
@keyframes wsBlinkEye { 0%,90%,100%{transform:scaleY(1)} 95%{transform:scaleY(0.1)} }
@keyframes wsSwimBob { 0%,100%{transform:translate(0,0)} 25%{transform:translate(3px,-4px)} 75%{transform:translate(-3px,4px)} }
.ws-fish-tail { animation: wsWagTail 0.7s ease-in-out infinite; transform-origin: 0px 14px; }
.ws-fish-dorsal { animation: wsSwayDorsal 2.5s ease-in-out infinite alternate; transform-origin: 10px 12px; }
.ws-fish-pec { animation: wsFlapPec 1s ease-in-out infinite alternate; transform-origin: 0px 5px; }
.ws-fish-eye { animation: wsBlinkEye 5s ease-in-out infinite; transform-origin: 15.5px 14.5px; }
.ws-fish-anim-group { animation: wsSwimBob 4s ease-in-out infinite; }

/* Slide 2: Game list */
.ws-game-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: #f3f4f6;
  border-radius: 10px;
}
.ws-game-item { display: flex; align-items: center; gap: 12px; }
.ws-game-pill-wrap { flex-shrink: 0; width: 72px; }
.ws-game-pill {
  width: 100%; height: 18px;
  border-radius: 50px;
  background: rgba(0,0,0,0.9);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.ws-game-pill-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0;
  border-radius: 50px;
  transition: width 1.2s cubic-bezier(0.34,1.2,0.64,1);
}
.ws-game-pill-fill.ws-blue { background: linear-gradient(90deg, #4E81EE, #6a9bf5); }
.ws-game-pill-fill.ws-purple { background: linear-gradient(90deg, #9B59B6, #b07cc9); }
.ws-game-pill-fill.ws-red { background: linear-gradient(90deg, #E74C3C, #f06050); }
.ws-game-pill-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  z-index: 1;
  font-family: 'Fredoka', 'Nunito', Arial, sans-serif;
}
.ws-game-name { font-size: 14px; font-weight: 600; color: #374151; }

/* Slide 3: Tap demo */
.ws-tap-demo {
  position: relative;
  width: 100%;
  padding: 18px 10px 30px;
  background: #f3f4f6;
  border-radius: 10px;
}
.ws-tap-pills { display: flex; gap: 6px; width: 100%; }
.ws-tap-pill {
  flex: 1;
  height: 22px;
  border-radius: 50px;
  background: rgba(0,0,0,0.9);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.ws-tap-pill.ws-glow-red {
  border-color: #E74C3C;
  box-shadow: 0 0 12px rgba(231,76,60,0.5);
}
.ws-tap-pill-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.34,1.2,0.64,1);
}
.ws-tap-pill-fill.ws-blue { background: linear-gradient(90deg, #4E81EE, #6a9bf5); }
.ws-tap-pill-fill.ws-purple { background: linear-gradient(90deg, #9B59B6, #b07cc9); }
.ws-tap-pill-fill.ws-red { background: linear-gradient(90deg, #E74C3C, #f06050); }
.ws-tap-pill-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  z-index: 1;
  font-family: 'Fredoka', 'Nunito', Arial, sans-serif;
}
.ws-tap-cursor {
  position: absolute;
  font-size: 28px;
  bottom: -2px;
  left: 75%;
  opacity: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  pointer-events: none;
  z-index: 2;
}
.ws-tap-pill.ws-tap-ripple { animation: wsTapPulse 0.5s ease-out; }
@keyframes wsTapPulse { 0%{box-shadow:0 0 0 0 rgba(231,76,60,0.5)} 100%{box-shadow:0 0 0 12px rgba(231,76,60,0)} }

/* Controls */
.ws-slider-controls { padding: 14px 20px 20px; flex-shrink: 0; }
.ws-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; }
.ws-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.ws-dot.ws-active { background: #4E81EE; box-shadow: 0 0 8px rgba(78,129,238,0.4); }
.ws-dot:hover:not(.ws-active) { background: #9ca3af; }
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 50px;
  font-family: 'Fredoka', 'Nunito', Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  min-height: 48px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.ws-btn:active { transform: scale(0.96); }
.ws-btn-primary {
  background: linear-gradient(135deg, #4E81EE, #3a6fd8);
  color: #fff;
  width: 100%;
  font-size: 15px;
  padding: 12px;
}
.ws-btn-primary:hover { box-shadow: 0 6px 25px rgba(78,129,238,0.5); }
.ws-btn-green {
  background: linear-gradient(135deg, #2ECC71, #27ae60);
  color: #fff;
  width: 100%;
  font-size: 15px;
  padding: 12px;
}
.ws-btn-green:hover { box-shadow: 0 6px 25px rgba(46,204,113,0.5); }
.ws-btn-ghost {
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  padding: 10px 20px;
  box-shadow: none;
  border: 1px solid #d1d5db;
}
.ws-btn-ghost:hover { background: #f3f4f6; border-color: #9ca3af; color: #374151; }
.ws-btn-row { display: flex; gap: 8px; }
.ws-btn-row .ws-btn-ghost { flex: 1; }
.ws-btn-row .ws-btn-primary, .ws-btn-row .ws-btn-green { flex: 1.5; }

.ws-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
  cursor: pointer;
  user-select: none;
  transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}
.ws-checkbox-row:hover { color: #374151; }
.ws-custom-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 2px solid #d1d5db;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  font-size: 11px;
  color: #fff;
}
.ws-checkbox-row.ws-checked .ws-custom-check {
  background: #4E81EE;
  border-color: #4E81EE;
  box-shadow: 0 0 8px rgba(78,129,238,0.3);
}
/* END WELCOME SLIDER */

.sand {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 22%;
  background-color: #f4a460;
  z-index: 1;
  border-top: none;
  clip-path: url(#sandWaveClipPath);
}
.seaweed {
  position: absolute;
  bottom: 12%;
  width: 10px;
  background-color: #2e8b57;
  border-radius: 5px 5px 0 0;
  transform-origin: bottom center;
  animation: sway-gentle 5s ease-in-out infinite alternate;
  z-index: 5;
}
.seaweed::before,
.seaweed::after {
  content: "";
  position: absolute;
  bottom: 20px;
  width: 8px;
  height: 60%;
  background-color: #3cb371;
  border-radius: 4px 4px 0 0;
  transform-origin: bottom center;
}
.seaweed::before {
  left: -6px;
  transform: rotate(-15deg);
  animation: sway-gentle 6s ease-in-out infinite alternate-reverse -0.2s;
}
.seaweed::after {
  right: -6px;
  transform: rotate(15deg);
  animation: sway-gentle 5.5s ease-in-out infinite alternate -0.4s;
}
@keyframes sway-gentle {
  0% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(5deg);
  }
}
.ribbon-kelp {
  position: absolute;
  bottom: 10%;
  width: 6px;
  background: linear-gradient(to top, #006400, #228b22);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom center;
  animation: sway-ribbon 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite
    alternate;
  z-index: 5;
}
.ribbon-kelp::before,
.ribbon-kelp::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 80%;
  background: inherit;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom center;
}
.ribbon-kelp::before {
  left: -3px;
  transform: skewX(-5deg);
  animation: sway-ribbon-strand 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite
    alternate -0.3s;
  filter: brightness(0.9);
}
.ribbon-kelp::after {
  right: -3px;
  transform: skewX(5deg);
  animation: sway-ribbon-strand 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite
    alternate -0.6s;
  filter: brightness(1.1);
}
@keyframes sway-ribbon {
  0% {
    transform: rotate(-15deg) skewX(-10deg);
  }
  25% {
    transform: rotate(5deg) skewX(5deg);
  }
  50% {
    transform: rotate(-10deg) skewX(-5deg);
  }
  75% {
    transform: rotate(10deg) skewX(10deg);
  }
  100% {
    transform: rotate(0deg) skewX(0deg);
  }
}
@keyframes sway-ribbon-strand {
  0% {
    transform: rotate(-12deg) skewX(-8deg);
  }
  33% {
    transform: rotate(8deg) skewX(6deg);
  }
  66% {
    transform: rotate(-8deg) skewX(-4deg);
  }
  100% {
    transform: rotate(3deg) skewX(3deg);
  }
}

.fish {
  position: absolute;
  border-radius: 50% 35% 35% 50% / 60% 45% 45% 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
  transform-origin: center center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: default;
  --fish-hue: 0;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  background-image: linear-gradient(
    to bottom,
    hsl(var(--fish-hue), var(--fish-saturation), var(--fish-lightness)),
    hsl(
      var(--fish-hue),
      var(--fish-saturation),
      min(95%, calc(var(--fish-lightness) + 20%))
    )
  );
  transition: filter 0.5s ease-in-out;
}
.fish.fish-is-unwell {
  filter: grayscale(100%) brightness(0.8);
}
.fish.unwell-twitch-animation {
  animation: fishTwitchKeyframes 0.15s ease-in-out;
}
@keyframes fishTwitchKeyframes {
  0%,
  100% {
    transform: scaleX(var(--direction-scale, 1)) scale(var(--size-scale, 0.72))
      rotateZ(var(--unwell-rotation, 170deg));
  }
  25% {
    transform: scaleX(var(--direction-scale, 1))
      scale(var(--size-scale-twitch, 0.7))
      rotateZ(calc(var(--unwell-rotation, 170deg) - 8deg));
  }
  75% {
    transform: scaleX(var(--direction-scale, 1))
      scale(var(--size-scale-twitch, 0.7))
      rotateZ(calc(var(--unwell-rotation, 170deg) + 8deg));
  }
}
.fish-eye {
  position: absolute;
  width: 7px;
  height: 7px;
  background-color: #fff;
  border-radius: 50%;
  border: 1px solid #444;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  overflow: hidden;
}
.fish-eye::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: #000;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
@keyframes fishBlinkAnimation {
  0%,
  100% {
    height: 7px;
    background-color: #fff;
    border-color: #444;
  }
  40%,
  60% {
    height: 1.5px;
    background-color: #333;
    border-color: #222;
  }
}
.fish.fish-is-blinking .fish-eye {
  animation: fishBlinkAnimation 0.25s ease-in-out;
}
.fish::before {
  content: "";
  position: absolute;
  right: -26px;
  top: 50%;
  width: 26px;
  height: 28px;
  background-color: hsl(
    var(--fish-hue),
    var(--fish-saturation),
    var(--fish-lightness)
  );
  filter: brightness(0.8);
  clip-path: polygon(0% 50%, 100% 10%, 80% 50%, 100% 90%);
  transform: translateY(-50%);
  transform-origin: 0% 50%;
  animation-name: wag-tail;
  animation-duration: var(--tail-animation-duration, 0.7s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: var(--tail-animation-delay, 0s);
  z-index: 0;
}
.fish.has-distinct-tail::before {
  filter: brightness(1.25)
    drop-shadow(
      0 0 1px
        hsla(
          var(--fish-hue),
          var(--fish-saturation),
          calc(var(--fish-lightness) + 20%),
          0.7
        )
    );
}
.fish::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 40%;
  width: 20px;
  height: 12px;
  background-color: hsl(
    var(--fish-hue),
    var(--fish-saturation),
    var(--fish-lightness)
  );
  filter: brightness(0.9);
  border-radius: 30% 30% 50% 50% / 100% 100% 30% 30%;
  transform-origin: bottom center;
  animation: sway-fin 2.5s ease-in-out infinite alternate;
  animation-delay: var(--dorsal-fin-animation-delay, 0s);
  z-index: 0;
}
.fish.has-shark-fin::after {
  width: 18px;
  height: 18px;
  top: -18px;
  left: 38%;
  border-radius: 0;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: sway-fin-shark 3s ease-in-out infinite alternate;
}
@keyframes sway-fin-shark {
  0% {
    transform: rotateZ(-2deg) skewX(-1deg);
  }
  100% {
    transform: rotateZ(2deg) skewX(1deg);
  }
}
.fish-pectoral-fin {
  position: absolute;
  width: 14px;
  height: 10px;
  background-color: hsl(
    var(--fish-hue),
    var(--fish-saturation),
    var(--fish-lightness)
  );
  filter: brightness(0.85) opacity(0.75);
  left: 20px;
  top: 58%;
  border-radius: 50% 50% 20% 20% / 80% 80% 40% 40%;
  transform-origin: 0% 50%;
  animation: flap-pectoral-fin 1s ease-in-out infinite alternate;
  animation-delay: var(--pectoral-fin-animation-delay, 0s);
  z-index: 1;
}
.fish span {
  position: relative;
  z-index: 3;
  display: inline-block;
  transform-origin: center center;
}
.fish-stripe {
  position: absolute;
  width: 3px;
  height: 70%;
  top: 15%;
  background-color: hsla(
    var(--fish-hue),
    calc(var(--fish-saturation) - 20%),
    calc(var(--fish-lightness) - 20%),
    0.35
  );
  border-radius: 1px;
  z-index: 0;
}
.fish-freckle {
  position: absolute;
  background-color: hsla(
    var(--fish-hue),
    calc(var(--fish-saturation) - 25%),
    calc(var(--fish-lightness) - 35%),
    0.6
  );
  border-radius: 50%;
  z-index: 0;
}
.fish-wavy-line-container {
  position: absolute;
  z-index: 0;
}
.fish-wavy-line-container svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: hsla(
    var(--fish-hue),
    calc(var(--fish-saturation) - 15%),
    calc(var(--fish-lightness) - 25%),
    0.7
  );
  stroke-width: 1.5;
  fill: none;
}
@keyframes wag-tail {
  0% {
    transform: translateY(-50%) rotateZ(-15deg);
  }
  50% {
    transform: translateY(-50%) rotateZ(15deg);
  }
  100% {
    transform: translateY(-50%) rotateZ(-15deg);
  }
}
@keyframes sway-fin {
  0% {
    transform: rotateZ(-4deg);
  }
  100% {
    transform: rotateZ(4deg);
  }
}
@keyframes flap-pectoral-fin {
  0% {
    transform: rotateZ(-20deg) scaleY(0.9);
  }
  100% {
    transform: rotateZ(15deg) scaleY(1);
  }
}
.fish-type-1 {
  --fish-hue: 0;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-2 {
  --fish-hue: 30;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-3 {
  --fish-hue: 60;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-4 {
  --fish-hue: 90;
  --fish-saturation: 70%;
  --fish-lightness: 55%;
  width: 65px;
  height: 29px;
}
.fish-type-5 {
  --fish-hue: 120;
  --fish-saturation: 70%;
  --fish-lightness: 50%;
  width: 65px;
  height: 29px;
}
.fish-type-6 {
  --fish-hue: 150;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-7 {
  --fish-hue: 180;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-8 {
  --fish-hue: 210;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-9 {
  --fish-hue: 240;
  --fish-saturation: 70%;
  --fish-lightness: 65%;
  width: 65px;
  height: 29px;
}
.fish-type-10 {
  --fish-hue: 270;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-11 {
  --fish-hue: 300;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.fish-type-12 {
  --fish-hue: 330;
  --fish-saturation: 70%;
  --fish-lightness: 60%;
  width: 65px;
  height: 29px;
}
.bubbles {
  position: absolute;
  bottom: 5%;
  left: 0;
  width: 100%;
  height: 95%;
  pointer-events: none;
  z-index: 10;
}
.bubble {
  position: absolute;
  background-color: rgba(212, 238, 247, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: rise 10s linear infinite;
  opacity: 0;
  box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.3);
}
.bubble:nth-child(1) {
  width: 10px;
  height: 10px;
  left: 15%;
  animation-duration: 12s;
  animation-delay: 0s;
}
.bubble:nth-child(2) {
  width: 16px;
  height: 16px;
  left: 35%;
  animation-duration: 9s;
  animation-delay: 1.5s;
}
.bubble:nth-child(3) {
  width: 8px;
  height: 8px;
  left: 55%;
  animation-duration: 14s;
  animation-delay: 0.8s;
}
.bubble:nth-child(4) {
  width: 13px;
  height: 13px;
  left: 75%;
  animation-duration: 8s;
  animation-delay: 2.5s;
}
.bubble:nth-child(5) {
  width: 19px;
  height: 19px;
  left: 5%;
  animation-duration: 11s;
  animation-delay: 0.3s;
}
.bubble:nth-child(6) {
  width: 11px;
  height: 11px;
  left: 85%;
  animation-duration: 13s;
  animation-delay: 1s;
}
.bubble:nth-child(7) {
  width: 15px;
  height: 15px;
  left: 45%;
  animation-duration: 10s;
  animation-delay: 3s;
}
@keyframes rise {
  0% {
    bottom: 0%;
    opacity: 0;
    transform: translateX(0px) scale(0.8);
  }
  10% {
    opacity: 0.7;
    transform: translateX(5px) scale(1);
  }
  25% {
    transform: translateX(-10px);
  }
  50% {
    opacity: 0.9;
    transform: translateX(15px);
  }
  75% {
    transform: translateX(-5px);
  }
  90% {
    opacity: 0.4;
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: translateX(0px);
  }
}

/* ============================================
   RESPONSIVE AQUARIUM - MOBILE
   Height is handled by calc() in base rule.
   Only override CSS variables and non-height styles here.
   ============================================ */
@media (max-width: 767px) {
  #aquarium {
    --menu-bar-height: 60px; /* Mobile menu bar is shorter */
    --aquarium-padding: 10px;
    min-height: 350px;
    max-height: none; /* Allow full height on mobile */
    width: 100%;
  }

  /* Ensure overlay matches parent */
  #overviewOverlayAqua {
    height: 100%;
  }

  /* Better grid layout for mobile overview */
  #overviewFishContainerAqua {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 180px);
    gap: 12px 24px; /* Reduced row gap, increased column gap to prevent pill overlap */
    padding: 15px 20px;
    overflow-y: auto;
    max-height: 85%;
  }

  /* Mobile overview fish items */
  #overviewFishContainerAqua .overview-fish-item {
    height: 180px;
    padding: 15px 8px; /* Reduced horizontal padding */
    margin: 5px 0;
    justify-content: space-between;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* Constrain game pills container on mobile to prevent overlap */
  #overviewFishContainerAqua .game-stats-container {
    width: 110% !important; /* Reduced from 130% */
    margin-left: -5% !important; /* Reduced from -15% */
    gap: 3px !important; /* Tighter gap between pills */
  }

  /* Slightly smaller pills on mobile */
  #overviewFishContainerAqua .game-stats-container > div {
    min-width: 38px !important; /* Reduced from 44px */
    height: 26px !important; /* Reduced from 30px */
    font-size: 12px !important; /* Reduced from 13px */
    padding: 0 5px !important; /* Reduced from 8px */
    border-radius: 10px !important;
    -webkit-tap-highlight-color: transparent;
  }

  #overviewFishContainerAqua .overview-fish-item .performance-display,
  #overviewFishContainerAqua .overview-fish-item .progress-bar-container,
  #overviewFishContainerAqua .overview-fish-item .star-rating-container {
    background: transparent;
    border: none;
  }

  .overview-fish-item .fish {
    margin-bottom: 15px;
    flex-shrink: 0;
  }

  .performance-display {
    margin-top: 15px;
    flex-shrink: 0;
  }

  .overview-fish-item .fish span {
    font-size: 14px;
    font-weight: bold;
  }

  /* Mobile: active state instead of hover for pill tap */
  #overviewFishContainerAqua .game-stats-container > div.clickable-pill:active {
    transform: scale(1.18);
    filter: brightness(1.25);
  }

  /* Adjust sand height for mobile */
  .sand {
    height: 18%;
  }

  /* Slow down bubble animations for taller tank */
  .bubble:nth-child(1) { animation-duration: 18s; }
  .bubble:nth-child(2) { animation-duration: 15s; }
  .bubble:nth-child(3) { animation-duration: 20s; }
  .bubble:nth-child(4) { animation-duration: 14s; }
  .bubble:nth-child(5) { animation-duration: 17s; }
  .bubble:nth-child(6) { animation-duration: 19s; }
  .bubble:nth-child(7) { animation-duration: 16s; }
}

/* ============================================
   RESPONSIVE AQUARIUM - TABLET
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
  #aquarium {
    --aquarium-padding: 15px;
    width: 95%;
    min-height: 500px;
  }

  .sand {
    height: 20%;
  }

  /* Adjust bubble animations for tablet */
  .bubble:nth-child(1) { animation-duration: 15s; }
  .bubble:nth-child(2) { animation-duration: 13s; }
  .bubble:nth-child(3) { animation-duration: 17s; }
  .bubble:nth-child(4) { animation-duration: 12s; }
  .bubble:nth-child(5) { animation-duration: 14s; }
  .bubble:nth-child(6) { animation-duration: 16s; }
  .bubble:nth-child(7) { animation-duration: 13s; }

  /* Overview grid for tablets */
  #overviewFishContainerAqua {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 12px;
  }

  .performance-display {
    margin-top: 12px;
    flex-shrink: 0;
  }
}

/* Tablet landscape orientation */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  #aquarium {
    width: 98%;
    min-height: 450px;
  }
}

/* ============================================
   RESPONSIVE AQUARIUM - LARGE SCREENS
   ============================================ */
@media (min-width: 1025px) and (max-width: 1366px) {
  #aquarium {
    width: 90%;
    min-height: 600px;
  }
}

/* Very tall screens (like iPad Pro portrait) */
@media (min-width: 1000px) and (min-height: 1000px) {
  #aquarium {
    min-height: 700px;
    max-height: 1400px;
  }
}

/* ============================================
   SHOP ITEM BACKGROUNDS
   ============================================ */

/* Custom background themes */
#aquarium.has-custom-background {
  transition: background 0.5s ease;
}

#aquarium.bg-coral-reef {
  background: linear-gradient(to bottom,
    #38bdf8 0%,
    #0ea5e9 40%,
    #0284c7 70%,
    #f97316 100%
  );
}

#aquarium.bg-deep-ocean {
  background: linear-gradient(to bottom,
    #1e3a8a 0%,
    #1e40af 30%,
    #1d4ed8 60%,
    #0c4a6e 100%
  );
}

#aquarium.bg-sunset {
  background: linear-gradient(to bottom,
    #f97316 0%,
    #fb923c 20%,
    #fbbf24 40%,
    #38bdf8 70%,
    #0ea5e9 100%
  );
}

#aquarium.bg-night {
  background: linear-gradient(to bottom,
    #0f172a 0%,
    #1e293b 40%,
    #334155 70%,
    #475569 100%
  );
}

/* Stars effect for night background */
#aquarium.bg-night::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background-image:
    radial-gradient(white 1px, transparent 1px),
    radial-gradient(white 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px;
  background-position: 0 0, 25px 25px;
  opacity: 0.3;
  animation: twinkle 3s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

@keyframes twinkle {
  0% { opacity: 0.2; }
  100% { opacity: 0.4; }
}

/* Shipwreck background - image based */
#aquarium.bg-shipwreck {
  /* Reset all background properties to ensure gradient is removed */
  background: none;
  background-image: url('/shop-assets/backgrounds/shipwreck-bg.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-color: #1a3a5c; /* Fallback color matching shipwreck theme */
}

#aquarium.bg-shipwreck::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 40% 20%, rgba(100, 180, 220, 0.3) 0%, transparent 60%);
  animation: gentleLightRays 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes gentleLightRays {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 0.8; transform: translateX(5px); }
}

/* Atlantis background - image based */
#aquarium.bg-atlantis {
  /* Reset all background properties to ensure gradient is removed */
  background: none;
  background-image: url('/shop-assets/backgrounds/atlantis-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #38a3a5; /* Fallback color matching atlantis theme */
}

#aquarium.bg-atlantis::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 248, 200, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, rgba(255, 248, 200, 0.2) 0%, transparent 40%);
  animation: atlantisLightRays 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes atlantisLightRays {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(5px); }
}

/* ============================================
   KELP FOREST BACKGROUND
   ============================================ */
#aquarium.bg-kelp-forest {
  background: none;
  background-image: url('/shop-assets/backgrounds/kelp-forest-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #2d5a3d; /* Fallback color matching kelp forest theme */
}

#aquarium.bg-kelp-forest::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(150, 220, 150, 0.3) 0%, transparent 50%),
    linear-gradient(180deg, rgba(100, 180, 100, 0.15) 0%, transparent 50%);
  animation: kelpLightRays 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes kelpLightRays {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(3px); }
}

/* ============================================
   CORAL GARDENS BACKGROUND
   ============================================ */
#aquarium.bg-coral-gardens {
  background: none;
  background-image: url('/shop-assets/backgrounds/coral-gardens-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #ff7f50; /* Fallback color matching coral theme */
}

#aquarium.bg-coral-gardens::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 180, 200, 0.3) 0%, transparent 50%),
    linear-gradient(180deg, rgba(255, 200, 180, 0.15) 0%, transparent 40%);
  animation: coralGardensLight 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes coralGardensLight {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.75; transform: translateY(4px); }
}

/* ============================================
   CRYSTAL CANYON BACKGROUND
   ============================================ */
#aquarium.bg-crystal-canyon {
  background: none;
  background-image: url('/shop-assets/backgrounds/crystal-canyon-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a3a5c; /* Fallback color matching deep blue theme */
}

#aquarium.bg-crystal-canyon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(100, 180, 220, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, rgba(150, 200, 255, 0.15) 0%, transparent 40%);
  animation: canyonLightRays 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes canyonLightRays {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(3px); }
}

/* ============================================
   ARCTIC THEME BACKGROUND
   ============================================ */
#aquarium.bg-arctic-theme {
  background: none;
  background-image: url('/shop-assets/backgrounds/arctic-theme-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a4a6e; /* Fallback color matching icy blue theme */
}

#aquarium.bg-arctic-theme::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(200, 230, 255, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, rgba(173, 216, 230, 0.2) 0%, transparent 40%);
  animation: arcticShimmer 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes arcticShimmer {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.75; transform: translateY(2px); }
}

/* Hide default sand and plants for certain themes */
#aquarium.bg-arctic-theme .sand,
#aquarium.bg-arctic-theme .seaweed,
#aquarium.bg-arctic-theme .ribbon-kelp,
#aquarium.bg-pearl-palace .sand,
#aquarium.bg-pearl-palace .seaweed,
#aquarium.bg-pearl-palace .ribbon-kelp,
#aquarium.bg-volcano-valley .sand,
#aquarium.bg-volcano-valley .seaweed,
#aquarium.bg-volcano-valley .ribbon-kelp {
  display: none;
}

/* ============================================
   PEARL PALACE BACKGROUND
   ============================================ */
#aquarium.bg-pearl-palace {
  background: none;
  background-image: url('/shop-assets/backgrounds/pearl-palace-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #e8d0d8; /* Fallback color matching pearl/pink theme */
}

#aquarium.bg-pearl-palace::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 230, 240, 0.35) 0%, transparent 50%),
    linear-gradient(180deg, rgba(255, 220, 230, 0.2) 0%, transparent 40%);
  animation: pearlShimmer 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes pearlShimmer {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.8; transform: translateY(2px); }
}

/* ============================================
   VOLCANO VALLEY BACKGROUND
   ============================================ */
#aquarium.bg-volcano-valley {
  background: none;
  background-image: url('/shop-assets/backgrounds/volcano-valley-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a2a3a; /* Fallback dark blue-gray */
}

#aquarium.bg-volcano-valley::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(255, 100, 50, 0.3) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 85%, rgba(255, 80, 30, 0.25) 0%, transparent 35%),
    linear-gradient(180deg, rgba(20, 40, 60, 0.2) 0%, transparent 30%);
  animation: volcanoGlow 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes volcanoGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.9; }
}

/* Light rays effect for backgrounds */
#aquarium.bg-coral-reef::after,
#aquarium.bg-sunset::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  opacity: 0.5;
  animation: lightRays 4s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

@keyframes lightRays {
  0% { opacity: 0.3; transform: translateY(-10px); }
  100% { opacity: 0.5; transform: translateY(10px); }
}

/* ============================================
   SHOP ITEM DECORATIONS & CREATURES
   ============================================ */

.aquarium-shop-item {
  pointer-events: none;
}

.aquarium-decoration {
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
}

.aquarium-creature {
  filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.15));
}

/* Ensure shop items don't interfere with fish */
.aquarium-shop-item svg {
  display: block;
}