/* =============== */
/* 1. GENERELT */
/* =============== */

html, body {
  overflow: hidden;
  height: 100%;
}

:root {
  font-family: system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #020617, #0f172a 45%, #020617 100%);
}

/* =============== */
/* 2. AKVARIET CONTAINER */
/* =============== */

#tank {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  width: min(1000px, 100vw - 24px);
  height: min(650px, 80vh);

  background: radial-gradient(circle at 20% 0%, #e0faff 0, #0ea5e9 30%, #082f49 100%);
  box-shadow:
    inset 0 0 40px rgba(15, 23, 42, 0.95),
    0 10px 24px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(148, 163, 184, 0.4);

  /* 👇 NY slow drift animation */
  animation: slowDrift 22s ease-in-out infinite alternate;
}

@keyframes slowDrift {
  0%   { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.03) translate(-10px,-6px); }
}

/* Glans på glasset */
.glass-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 40%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.08), transparent 50%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.55;
}

/* =============== */
/* 3. BUND & STEN */
/* =============== */

/* Sand-bund */
.sand {
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 80px;
  background:
    radial-gradient(circle at 50% -40px, #fed7aa, #f97316),
    radial-gradient(circle at 10% -20px, rgba(255,255,255,0.3), transparent 55%);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.8);
}


/* =============== */
/* 4. KORALLER */
/* =============== */

.coral {
  position: absolute;
  bottom: 30px;
  width: 18px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(to top, #7c2d12, #f97316);
  box-shadow: 0 4px 8px rgba(15,23,42,0.8);
  transform-origin: bottom center;
  animation: coralWiggle 4.5s ease-in-out infinite alternate;
  z-index: 2;
}

/* “arme” på korallen */
.coral::before,
.coral::after {
  content: "";
  position: absolute;
  bottom: 12px;
  width: 14px;
  height: 32px;
  border-radius: 999px;
  background: inherit;
}

.coral::before {
  left: -10px;
  transform-origin: bottom right;
  transform: rotate(-18deg);
}

.coral::after {
  right: -10px;
  transform-origin: bottom left;
  transform: rotate(18deg);
}

/* Forskellige farver/placeringer */
.coral.c1 {
  left: 210px;
  background: linear-gradient(to top, #4c0519, #f94016);
}

.coral.c2 {
  left: 250px;
  height: 60px;
  background: linear-gradient(to top, #1f2937, #22d3ee);
}

.coral.c3 {
  right: 220px;
  background: linear-gradient(to top, #111827, #a855f7);
}

@keyframes coralWiggle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-6deg); }
}

/* =============== */
/* 5. PLANTER */
/* =============== */

.plant {
  position: absolute;
  bottom: 20px;
  width: 26px;
  height: 360px;
  border-radius: 999px;
  background: linear-gradient(#4ade80, #15803d);
  transform-origin: bottom center;
  animation: seaweed 3.5s ease-in-out infinite alternate;
  opacity: 0.9;
  filter:
    drop-shadow(0 0 10px rgba(74, 222, 128, 0.8))
    drop-shadow(0 6px 6px rgba(15, 23, 42, 0.9));
  z-index: 1;
}

/* Individuelle planter med forskellig højde/placering */
.plant.p1 { left: 40px; animation-delay: 0.1s; }
.plant.p2 { left: 90px; height: 280px; animation-delay: 0.6s; }
.plant.p3 { right: 40px; height: 275px; animation-delay: 0.3s; }
.plant.p4 { right: 90px; height: 260px; animation-delay: 0.9s; }

@keyframes seaweed {
  0% { transform: skewX(0deg); }
  100% { transform: skewX(-8deg); }
}

/* Sten */
.rock {
  position: absolute;
  bottom: 10px;
  width: 70px;
  height: 42px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 30% 20%, #e5e7eb, #4b5563);
  box-shadow: 0 6px 10px rgba(15, 23, 42, 0.8);
  z-index: 2;
}

/* Mindre sten */
.rock.small {
  width: 45px;
  height: 30px;
}

/* Placering af de enkelte sten */
.rock.r1 { left: 25px; }
.rock.r2 { left: 80px; bottom: 12px; }
.rock.r3 { right: 30px; }
.rock.r4 { right: 80px; bottom: 12px; }


/* =============== */
/* 6. REJER */
/* =============== */

.shrimp {
  position: absolute;
  bottom: 30px;
  width: 22px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 30%, #fecaca, #fb7185);
  box-shadow: 0 2px 4px rgba(15,23,42,0.7);
  animation: shrimp-wiggle 2.2s ease-in-out infinite alternate;
  z-index: 3;
}

/* Lille lys “hale” på rejen */
.shrimp::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.7);
}

/* Placering af rejerne */
.shrimp.s1 { left: 190px; animation-delay: 0.2s; }
.shrimp.s2 { left: 230px; bottom: 26px; animation-delay: 0.9s; }
.shrimp.s3 { right: 200px; animation-delay: 0.5s; }

@keyframes shrimp-wiggle {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(4px) translateY(-1px); }
}

/* =============== */
/* 7. FISK */
/* =============== */

.fish {
  position: absolute;
  width: 60px;
  height: 32px;
  pointer-events: none;
  transform-origin: center center;
}

.fish-body {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.6);
}

/* Halefinne */
.fish.tail-right::after,
.fish.tail-left::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 20px;
  height: 24px;


  /* NY FINNEFARVE - gennemsigtig hvid */
  background: radial-gradient(
    circle at 0% 50%,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.2)
  );

  backdrop-filter: blur(2px); /* gør den lidt glasagtig */
}


.fish.tail-right::after {
  right: -14px;
  transform:  scaleX(-1) rotate(10deg);
  transform-origin: left center;
  border-radius: 50% 6px 6px 50%; 
  animation: tail 0.45s ease-in-out infinite alternate;
}

.fish.tail-left::after {
  left: -14px;
  transform: rotate(10deg);
  transform-origin: right center;
  border-radius: 6px 50% 50% 6px;
  animation: tail 0.45s ease-in-out infinite alternate;
}

@keyframes tail {
  0% { transform: translateY(0) rotate(10deg); }
  100% { transform: translateY(2px) rotate(-10deg); }
}

/* Øjne */
.eye {
  position: absolute;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #e5f4ff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.7);
  overflow: visible;
}


.eye::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #020617;
}

.eye-right {
  right: 10px;
}

.eye-right::after {
  left: 4px;   /* Pupillen mod venstre */
}

.eye-left {
  left: 10px;
}

.eye-left::after {
  right: 4px;  /* Pupillen mod højre */
}

/* Blink-animation */
@keyframes blink {
  0%   { transform: scaleY(1); }
  50%  { transform: scaleY(0.1); }
  100% { transform: scaleY(1); }
}

.eye.blink {
  animation: blink 0.15s linear;
}


/* =============== */
/*  BOBLER & PARTIKLER */
/* =============== */

.bubble {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: radial-gradient(circle at 30% 30%,
    rgba(255, 255, 255, 0.9),
    rgba(148, 163, 184, 0.05)
  );
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.4);
  opacity: 0.8;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.35);
  box-shadow: 0 0 4px rgba(15, 23, 42, 0.5);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
