﻿/* ============================================
   黑洞主页 —— 玻璃磨砂 UI
   ============================================ */

:root {
  --text-primary: #f4f6fb;
  --text-secondary: rgba(244, 246, 251, 0.62);
  --accent: #d8b4fe;
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.16);
}

html, body {
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  padding: 0px;
  margin: 0px;
  overflow: hidden;
  display: flex;
  height: 100%;
  width: 100%;
  background-color: #000;
  color: var(--text-primary);
  font-family: "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  user-select: none;
  cursor: none; /* 自定义光标（黑洞主题） */
}

body,
* {
  cursor: none !important; /* global hide default cursor */
}

canvas {
  margin: auto auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------------- 信息层 ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 7vh, 72px);
  padding: 32px;
  pointer-events: none; /* 容器不挡背景，按钮单独开启 */
}

/* ---------------- 标题 ---------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  animation: hero-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.65em;
  text-indent: 0.65em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(1.6rem, 4.6vw, 6rem); /* 长站名：适配 16 字符不溢出 */
  font-weight: 200;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 20%, #d9c8ff 78%, #8f7bd8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(168, 140, 255, 0.28));
}

.hero__subtitle {
  display: none; /* 副标题已移至页脚上方 */
}

/* ---------------- 玻璃按钮 ---------------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 26px);
  pointer-events: auto;
  animation: hero-in 1.4s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 168px;
  padding: 15px 30px;
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  background-color: var(--glass-bg);
  /* 光带：按钮自身的多层背景渐变，扫过动画用 background-position（避免 overflow:hidden + 伪元素触发合成层裁剪 bug） */
  background-image: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.2) 48%,
    rgba(255, 255, 255, 0.36) 50%,
    rgba(255, 255, 255, 0.2) 52%,
    transparent 60%
  );
  background-size: 220% 100%;
  background-position: 180% 0;
  background-repeat: no-repeat;
  border: 1px solid var(--glass-border);
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(18px) saturate(150%) brightness(0.6); /* brightness 压暗背后亮光（如爱因斯坦环），保持暗玻璃质感 */
  -webkit-backdrop-filter: blur(18px) saturate(150%) brightness(0.6);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.35s ease,
    background-position 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.glass-btn:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.14);
  background-position: -80% 0;
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(180, 150, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.glass-btn:active {
  transform: translateY(-1px) scale(0.985);
}

.glass-btn__icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform 0.35s ease;
}

.glass-btn:hover .glass-btn__icon {
  transform: scale(1.12) translateY(-1px);
}

.glass-btn__label {
  white-space: nowrap;
}

/* 点击涟漪（从点击处扩散的柔和光波） */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  transform: scale(0);
  animation: ripple 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* 键盘导航焦点 */
.glass-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 系统开启"减少动态效果"：关掉动画与过渡 */
@media (prefers-reduced-motion: reduce) {
  .hero,
  .nav,
  .foot,
  .glass-btn,
  .glass-btn__icon,
  .cursor-ring__inner,
  .ripple {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------- 页脚 ---------------- */
.foot {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: rgba(255, 255, 255, 0.34);
  animation: hero-in 1.4s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 副标题（移至页脚上方，落在纯黑视界上，浅色清晰） */
.foot__subtitle {
  margin: 0;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--text-secondary);
}

.foot__line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(216, 180, 254, 0.9);
}

/* ICP 备案号 */
.foot__icp {
  color: rgba(255, 255, 255, 0.34);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  pointer-events: auto; /* overlay 是 pointer-events:none，需单独恢复链接可点击 */
  transition: color 0.3s ease;
}

.foot__icp:hover {
  color: var(--text-secondary);
}

/* 备案号组（ICP + 公安） */
.foot__beian {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

/* 公安备案号链接（图标 + 文字） */
.foot__gongan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.foot__gongan-icon {
  display: block;
  height: 15px;
  width: auto;
  opacity: 0.72;
}

/* ---------------- 入场动画 ---------------- */
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ---------------- 自定义光标（黑洞主题） ---------------- */
.cursor-ring,
.cursor-dot {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
}

.cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px; /* 居中于鼠标 */
}

.cursor-ring__inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.12);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停在交互元素上：环放大并变紫 */
.cursor-ring--active .cursor-ring__inner {
  transform: scale(1.45);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(216, 180, 254, 0.45);
}

.cursor-dot {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

/* 触摸设备：恢复系统光标 */
@media (hover: none), (pointer: coarse) {
  body,
  * {
    cursor: auto !important;
  }
  .cursor-ring,
  .cursor-dot {
    display: none;
  }
}

/* 移动端：按钮纵向堆叠 */
@media (max-width: 620px) {
  .nav {
    flex-direction: column;
  }
  .glass-btn {
    min-width: 220px;
  }
}
