/* 静海水族箱 — 标题覆盖层样式(纯本地,无外部字体/资源) */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #02161f;
}

#gl {
  position: fixed;
  inset: 0;
  display: block;
}

body.idle { cursor: none; }

/* ---------- 标题覆盖层 ---------- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.4s ease;
}

#overlay.show { opacity: 1; }

#overlay h1 {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-weight: 600;
  color: #ffffff;
  font-size: clamp(40px, 7.2vw, 96px);
  letter-spacing: 0.34em;
  text-indent: 0.34em; /* 抵消末字间距,视觉居中 */
  text-shadow:
    0 0 14px rgba(190, 230, 245, 0.45),
    0 0 46px rgba(130, 205, 225, 0.28),
    0 2px 6px rgba(0, 16, 26, 0.5);
  white-space: nowrap;
}

#overlay.show h1 { animation: rise 1.8s ease both; }

#overlay .wave {
  margin: 26px 0 18px;
  opacity: 0.9;
}

#overlay.show .wave { animation: rise 1.8s ease 0.2s both; }

#overlay .sub {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  color: rgba(232, 246, 251, 0.88);
  font-size: clamp(14px, 1.7vw, 21px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-shadow: 0 0 14px rgba(140, 210, 228, 0.4), 0 1px 6px rgba(0, 18, 28, 0.6);
  white-space: nowrap;
}

#overlay.show .sub { animation: rise 1.8s ease 0.35s both; }

#overlay .hint {
  position: absolute;
  bottom: 34px;
  right: 40px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(200, 230, 240, 0.35);
}

@keyframes rise {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}

/* ---------- 版本切换链接 ---------- */
.ver-link {
  position: fixed;
  bottom: 34px;
  left: 40px;
  z-index: 15;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(200, 230, 240, 0.35);
  text-decoration: none;
  transition: color 0.6s ease;
}

.ver-link:hover { color: rgba(200, 235, 245, 0.8); }

/* ---------- WebGL2 不可用提示 ---------- */
#nogl {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  color: rgba(220, 240, 248, 0.85);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  letter-spacing: 0.15em;
  background: radial-gradient(ellipse at center, #0a3d4f 0%, #03202c 100%);
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  #overlay { transition: opacity 0.8s linear; }
  #overlay.show h1,
  #overlay.show .wave,
  #overlay.show .sub { animation: none; }
}
