/* ContrastPlay — Contrast Aquarium Styles */

/* Shared Mode Switcher Pill (used on both Cards & Aquarium pages) */
.mode-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(18, 20, 24, 0.84);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-pill {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  padding: 5px 13px;
  border-radius: 999px;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-pill:hover {
  color: var(--ink);
}

.nav-pill.active {
  background: var(--red);
  color: #ffffff;
}

/* Tank Background Themes */
.aq-body {
  background:
    radial-gradient(ellipse 75% 60% at 20% 12%, rgba(185, 22, 28, 0.16), transparent 62%),
    radial-gradient(ellipse 65% 55% at 82% 88%, rgba(155, 16, 22, 0.14), transparent 64%),
    radial-gradient(circle at 50% 45%, #0e0a0c 0%, #050608 82%);
  transition: background 0.3s ease;
}

.aq-body[data-theme="light"] {
  background: #ffffff;
}

.aq-body[data-theme="light"] .brand-name {
  color: #111113;
}

.aq-body[data-theme="light"] .icon-btn {
  background: rgba(17, 17, 19, 0.08);
  border-color: rgba(17, 17, 19, 0.18);
  color: #111113;
}

.aq-body[data-theme="light"] .icon-btn:hover {
  background: rgba(17, 17, 19, 0.14);
}

.aq-body[data-theme="light"] .mode-nav {
  background: rgba(17, 17, 19, 0.08);
  border-color: rgba(17, 17, 19, 0.18);
}

.aq-body[data-theme="light"] .nav-pill {
  color: #444752;
}

.aq-body[data-theme="light"] .nav-pill.active {
  color: #ffffff;
}

.aq-viewport {
  position: relative;
}

/* Auto-hiding HUD Controls for unobstructed viewing */
.aq-viewport .hud-top,
.aq-viewport .quick-rail,
.aq-viewport .hud-bottom {
  transition: opacity 0.45s ease;
}

.aq-viewport.hud-hidden .hud-top,
.aq-viewport.hud-hidden .quick-rail,
.aq-viewport.hud-hidden .hud-bottom {
  opacity: 0;
  pointer-events: none;
}

.aq-viewport.hud-hidden .hud-top > *,
.aq-viewport.hud-hidden .hud-bottom > *,
.aq-viewport.hud-hidden .quick-rail * {
  pointer-events: none;
}

/* Full-Viewport Aquarium Canvas */
.aq-tank {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  z-index: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.aq-bubbles,
.aq-creatures {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Gentle High-Contrast Bubbles */
.aq-bubble {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.38);
  background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.35), transparent 60%);
  will-change: transform;
}

.aq-bubble.accent {
  border-color: rgba(224, 36, 36, 0.6);
  background: radial-gradient(circle at 32% 32%, rgba(224, 36, 36, 0.35), transparent 62%);
}

.aq-body[data-theme="light"] .aq-bubble {
  border-color: rgba(0, 0, 0, 0.32);
  background: radial-gradient(circle at 32% 32%, rgba(0, 0, 0, 0.08), transparent 60%);
}

/* Swimming Sea Creatures */
.aq-creature {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  transform-origin: center center;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.55));
}

.aq-body[data-theme="light"] .aq-creature {
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.14));
}

.aq-creature-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.28s cubic-bezier(0.22, 1.35, 0.36, 1);
  animation: aq-sway var(--sway-dur, 4.4s) ease-in-out infinite;
}

.aq-creature.flipped .aq-creature-inner {
  /* Flip horizontally when swimming right -> left (creatures face left by default) */
  transform: scaleX(-1);
}

.aq-creature.pop .aq-creature-inner {
  transform: scale(1.16);
}

.aq-creature.flipped.pop .aq-creature-inner {
  transform: scaleX(-1) scale(1.16);
}

.aq-creature svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes aq-sway {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* Subtle Seafloor Silhouette */
.aq-seafloor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(54px, 10dvh, 110px);
  pointer-events: none;
  z-index: 0;
}

.seafloor-wave-back {
  fill: rgba(255, 255, 255, 0.05);
}

.seafloor-wave-front {
  fill: rgba(224, 36, 36, 0.08);
}

.aq-body[data-theme="light"] .seafloor-wave-back {
  fill: rgba(0, 0, 0, 0.06);
}

.aq-body[data-theme="light"] .seafloor-wave-front {
  fill: rgba(217, 30, 24, 0.09);
}

@media (prefers-reduced-motion: reduce) {
  .aq-creature-inner {
    animation: none !important;
  }
}

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }
  .nav-pill {
    padding: 5px 11px;
    font-size: 0.76rem;
  }
}
