/* ============================================================
   留白处的水中小动物：只出现在内容栏两侧的空白里
   ============================================================ */
#sea-layer {
  position: absolute;      /* 跟着页面滚动，不随视口移动 */
  left: 0;
  right: 0;
  top: 0;
  height: 0;               /* 由 JS 按内容区高度设定 */
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sea-creature {
  --sea-amp: 12px;
  position: absolute;
  opacity: 0.7;
  animation-name: sea-drift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  will-change: transform;
}

.sea-creature svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 像上面海浪那样，慢慢地左右漂 */
@keyframes sea-drift {
  from {
    transform: translateX(calc(var(--sea-amp) * -1)) translateY(0) rotate(-2deg);
  }
  to {
    transform: translateX(var(--sea-amp)) translateY(-5px) rotate(2deg);
  }
}

/* 暗色模式下稍微提亮，否则看不见 */
html[data-theme="dark"] .sea-creature {
  opacity: 0.75;
}

html[data-theme="dark"] .sea-creature svg path,
html[data-theme="dark"] .sea-creature svg circle,
html[data-theme="dark"] .sea-creature svg ellipse {
  stroke: #9fd0f0;
}
