/* ============================================================
   丁汀设计 · 首页宇宙封面 v18 · 莫兰迪深空
   深灰蓝 × 雾紫 × 雾青 × 雾白 · 单屏不滚动
   ============================================================ */

html.cosmos-on,
body.cosmos {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0A0D12;
}

body.cosmos {
  color: #F2F4F8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* 紫粉（默认）：紫罗兰 / 玫粉 / 深紫 —— 夜空里的紫粉极光 */
  --a1: 188, 132, 244;   /* 主色 · 紫罗兰 */
  --a2: 244, 168, 212;   /* 副色 · 玫粉 */
  --a3: 132, 84, 196;    /* 深 · 深紫 */
  --a4: 250, 238, 252;   /* 近白 */
  --bg1: #1C1826;
  --bg2: #15121E;
  --bg3: #0E0C15;
  --bg4: #08070D;
  --bg5: #040407;
}

/* 备选：自然绿（备用，body 加 theme-mint 切换） */
body.cosmos.theme-mint {
  --a1: 122, 196, 138;
  --a2: 184, 224, 184;
  --a3: 62, 132, 96;
  --a4: 234, 250, 234;
  --bg1: #24382E;
  --bg2: #1B2B23;
  --bg3: #131F1A;
  --bg4: #0B1310;
  --bg5: #060A08;
}

@keyframes canvas-drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.055) translate3d(0, -1.2%, 0); }
}

/* ---------- 背景：深林深空 ---------- */
#cosmos-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  will-change: transform;
  animation: canvas-drift 62s ease-in-out infinite alternate;
  background:
    radial-gradient(126% 96% at 62% 16%,
      var(--bg1) 0%,
      var(--bg2) 24%,
      var(--bg3) 50%,
      var(--bg4) 76%,
      var(--bg5) 100%);
}

/* 星云：粉紫 / 薄荷玉 / 樱粉 / 风信子 —— 糖果感的莫兰迪深空 */
body.cosmos::before {
  content: "";
  position: fixed;
  inset: -24%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(var(--a1), .17), rgba(var(--a1),.06) 42%, transparent 72%) 22% 16% / 76vw 76vw no-repeat,
    radial-gradient(closest-side, rgba(var(--a1), .12), transparent 70%) 82% 24% / 62vw 62vw no-repeat,
    radial-gradient(closest-side, rgba(var(--a2), .09), transparent 72%) 58% 92% / 56vw 56vw no-repeat,
    radial-gradient(closest-side, rgba(var(--a3), .10), transparent 72%) 6% 74% / 48vw 48vw no-repeat;
  filter: blur(26px) saturate(102%);
  animation: nebula-drift 76s ease-in-out infinite alternate;
}
@keyframes nebula-drift {
  from { transform: translate3d(-1.2%, -.8%, 0) scale(1); }
  to   { transform: translate3d(1.6%, 1.2%, 0) scale(1.06); }
}

/* 银河带：一道斜跨画面的彩色星尘光 */
.cosmos-milky {
  position: fixed;
  left: -25%;
  right: -25%;
  top: 20%;
  height: 38vh;
  z-index: 1;
  pointer-events: none;
  transform: rotate(-13deg);
  opacity: .92;
  background:
    radial-gradient(46% 50% at 18% 52%, rgba(var(--a1), .34), transparent 72%),
    radial-gradient(36% 42% at 38% 40%, rgba(var(--a3), .22), transparent 74%),
    radial-gradient(42% 46% at 58% 56%, rgba(var(--a1), .30), transparent 73%),
    radial-gradient(44% 44% at 80% 46%, rgba(var(--a3), .28), transparent 72%);
  filter: blur(24px) saturate(115%);
  animation: milky-breathe 26s ease-in-out infinite alternate;
}
@keyframes milky-breathe {
  from { opacity: .62; transform: rotate(-13deg) scale(1); }
  to   { opacity: .95; transform: rotate(-13deg) scale(1.04); }
}

/* 暗角 */
.cosmos-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(76% 66% at 50% 44%, transparent 44%, rgba(6,8,16, .44) 100%),
    linear-gradient(180deg, rgba(6,8,16, .44) 0%, transparent 20%, transparent 78%, rgba(6,8,16, .76) 100%);
}

/* ---------- 事件地平线：极光带 + 锐利亮边（画面氛围核心） ---------- */
.cosmos-horizon {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 250vmax;
  height: 158vmax;
  transform: translate(-50%, 77%);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(12,15,24, .86), rgba(8,10,17, .97) 56%, #06080E 100%);
  box-shadow:
    0 -1px 0 rgba(var(--a4), .92),
    0 -2px 3px rgba(var(--a4), .62),
    0 -6px 26px rgba(var(--a1), .30),
    0 -14px 54px rgba(var(--a1), .24),
    0 -42px 130px rgba(var(--a3), .10),
    inset 0 50px 140px rgba(var(--a3), .06);
}
/* 地平线之上的极光：粉紫 → 薄荷玉 → 风信子 → 樱粉 */
.cosmos-horizon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 112%;
  height: 46vmax;
  transform: translate(-50%, -60%);
  background:
    radial-gradient(46% 42% at 18% 76%, rgba(var(--a1), .44), transparent 70%),
    radial-gradient(50% 40% at 42% 70%, rgba(var(--a1), .40), transparent 72%),
    radial-gradient(44% 38% at 62% 78%, rgba(var(--a3), .32), transparent 72%),
    radial-gradient(42% 34% at 82% 78%, rgba(var(--a3), .34), transparent 72%);
  filter: blur(24px);
  animation: horizon-aurora 18s ease-in-out infinite alternate;
}
@keyframes horizon-aurora {
  from { opacity: .78; transform: translate(-50%, -60%) scaleY(1); }
  to   { opacity: 1;   transform: translate(-50%, -66%) scaleY(1.14); }
}
/* 紧贴弧线的亮边：让地平线"立"起来 */
.cosmos-horizon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 62%;
  height: 9vmax;
  transform: translate(-50%, -44%);
  background:
    radial-gradient(50% 50% at 50% 100%, rgba(var(--a4), .55), rgba(var(--a1), .18) 46%, transparent 74%);
  filter: blur(9px);
}

/* ---------- 星表坐标网格 ---------- */
.cosmos-grid {
  position: fixed;
  left: -60%;
  right: -60%;
  bottom: 0;
  height: 46vh;
  z-index: 4;
  pointer-events: none;
  opacity: .55;
  background-image:
    repeating-linear-gradient(90deg, rgba(var(--a1), .16) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(var(--a1), .11) 0 1px, transparent 1px 84px);
  transform: perspective(460px) rotateX(74deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0, .55) 42%, transparent 76%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0, .55) 42%, transparent 76%);
  animation: grid-breathe 9s ease-in-out infinite alternate;
  will-change: opacity;
}
@keyframes grid-breathe {
  from { opacity: .34; }
  to   { opacity: .58; }
}

/* ---------- HUD 四角 ---------- */
.cosmos-hud {
  position: fixed;
  inset: 92px 26px 54px;
  z-index: 5;
  pointer-events: none;
}
.cosmos-hud i {
  position: absolute;
  width: 15px;
  height: 15px;
  opacity: .5;
}
.cosmos-hud i::before,
.cosmos-hud i::after {
  content: "";
  position: absolute;
  background: rgba(232,196,110, .8);
}
.cosmos-hud i::before { width: 15px; height: 1px; }
.cosmos-hud i::after { width: 1px; height: 15px; }
.cosmos-hud i:nth-child(1) { top: 0; left: 0; }
.cosmos-hud i:nth-child(2) { top: 0; right: 0; }
.cosmos-hud i:nth-child(2)::before { right: 0; }
.cosmos-hud i:nth-child(2)::after { right: 0; }
.cosmos-hud i:nth-child(3) { bottom: 0; left: 0; }
.cosmos-hud i:nth-child(3)::before { bottom: 0; }
.cosmos-hud i:nth-child(3)::after { bottom: 0; }
.cosmos-hud i:nth-child(4) { bottom: 0; right: 0; }
.cosmos-hud i:nth-child(4)::before { right: 0; bottom: 0; }
.cosmos-hud i:nth-child(4)::after { right: 0; bottom: 0; }

/* ---------- 导航 ---------- */
body.cosmos .nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}
body.cosmos .nav .container { height: 78px; }
body.cosmos .brand { color: #fff; }
body.cosmos .brand img { filter: brightness(0) invert(1); opacity: .93; }
body.cosmos .brand .logo-fallback { background: #fff; color: #000000; }
body.cosmos .nav-links a { color: rgba(255,255,255, .62); font-weight: 400; letter-spacing: .04em; }
body.cosmos .nav-links a:hover { color: rgb(var(--a4)); }
body.cosmos .nav-links a::after {
  background: linear-gradient(90deg, rgba(var(--a1),.9), rgba(var(--a1),.9));
  height: 1px;
}
body.cosmos .nav-links a.active { color: rgb(var(--a4)); }
/* 导航主按钮：磨砂玻璃 + 粉紫→薄荷玉渐变描边（克制但有色） */
body.cosmos .nav-cta {
  position: relative;
  background: rgba(255,255,255, .055) !important;
  color: rgb(var(--a4)) !important;
  padding: 9px 22px;
  letter-spacing: .08em;
  border: 1px solid transparent;
  border-radius: 999px;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255, .26),
    inset 0 -1px 0 rgba(var(--a1), .14),
    0 6px 22px rgba(6,8,16, .55);
  transition: background .5s, box-shadow .5s, transform .45s cubic-bezier(.16,1,.3,1);
}
body.cosmos .nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(118deg,
    rgba(var(--a1), .95) 0%,
    rgba(var(--a3), .55) 28%,
    rgba(var(--a1), .85) 62%,
    rgba(var(--a3), .9) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .9;
  transition: opacity .45s;
  pointer-events: none;
}
body.cosmos .nav-cta:hover {
  background: linear-gradient(118deg,
    rgba(var(--a1), .26),
    rgba(var(--a3), .18) 40%,
    rgba(var(--a1), .24) 100%) !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255, .34),
    0 0 0 1px rgba(var(--a1), .26),
    0 10px 32px rgba(var(--a1), .18),
    0 6px 24px rgba(6,8,16, .5);
}
body.cosmos .hamburger span { background: rgb(var(--a4)); }
@media (max-width: 860px) {
  body.cosmos .nav-links {
    background: rgba(8,9,16, .96);
    border-bottom: 1px solid rgba(var(--a1), .10);
    box-shadow: 0 24px 60px rgba(0,0,0, .7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  body.cosmos .nav-links a { color: rgba(255,255,255, .74); }
  body.cosmos .nav-links a.active { color: rgb(var(--a4)); }
  body.cosmos .nav-cta { color: rgb(var(--a4)) !important; }
}

/* ---------- 主舞台 ---------- */
.cosmos-stage {
  position: relative;
  z-index: 6;
  height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 88px;
  text-align: center;
  transform: translate3d(calc(var(--mx, 0) * -6px), calc(var(--my, 0) * -4px), 0);
  transition: transform 1s cubic-bezier(.16, 1, .3, 1);
}

/* 轨道仪 */
.cx-orbits {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: -1;
}
.cx-orbits i {
  position: absolute;
  border: 1px solid rgba(255,255,255, .045);
  border-radius: 50%;
  animation: orbit-spin 80s linear infinite;
}
.cx-orbits i:nth-child(1) {
  width: min(70vw, 680px); height: min(70vw, 680px);
  border-color: rgba(var(--a1), .13);
  box-shadow: 0 0 44px rgba(var(--a1), .06) inset;
}
.cx-orbits i:nth-child(2) {
  width: min(92vw, 900px); height: min(92vw, 900px);
  border-color: rgba(var(--a1), .20);
  animation-duration: 150s; animation-direction: reverse;
}
.cx-orbits i:nth-child(3) {
  width: min(120vw, 1200px); height: min(120vw, 1200px);
  border-color: rgba(var(--a2), .08);
  animation-duration: 240s;
}
.cx-orbits i::after {
  content: "";
  position: absolute;
  top: -2px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #FFF7FB;
  box-shadow: 0 0 12px 4px rgba(var(--a3), .55), 0 0 26px 10px rgba(var(--a2), .28);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* ---------- 顶部小字 ---------- */
.cx-kicker {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 clamp(20px, 2.8vw, 32px);
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Menlo, monospace);
  font-size: 10px;
  letter-spacing: .34em;
  color: rgba(var(--a2), .60);
  opacity: 0;
  animation: cx-fade .9s ease-out .15s forwards;
}
.cx-kicker::before,
.cx-kicker::after {
  content: "";
  width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--a1), .38));
}
.cx-kicker::after { background: linear-gradient(270deg, transparent, rgba(var(--a1), .38)); }
.cx-kicker b { font-weight: 400; color: rgba(var(--a2), .34); }

/* ---------- 主标题：银白金属 + 身后一抹马卡龙柔光 ---------- */
.cx-title {
  position: relative;
  margin: 0;
  font-size: clamp(30px, 4.4vw, 64px);
  line-height: 1.2;
  letter-spacing: .05em;
  font-weight: 900;
}
.cx-title::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 128%; height: 300%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(var(--a1), .40), transparent 68%) 44% 50% / 96% 104% no-repeat,
    radial-gradient(closest-side, rgba(var(--a1), .24), transparent 70%) 78% 58% / 66% 90% no-repeat,
    radial-gradient(closest-side, rgba(var(--a3), .22), transparent 70%) 18% 44% / 62% 84% no-repeat;
  filter: blur(34px);
  animation: title-aura 15s ease-in-out infinite alternate;
}
@keyframes title-aura {
  from { opacity: .75; transform: translate(-50%, -50%) scale(.96); }
  to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.05); }
}
.cx-title span { display: block; overflow: hidden; padding: 0 .06em; }
.cx-title span i {
  display: block;
  font-style: normal;
  /* 黑白 logo 同源的银白：纯白高光 + 极轻银灰收底，靠清晰度取胜 */
  background-image: linear-gradient(180deg,
      #FFFFFF 0%,
      #FBFAFF 34%,
      #E6E6F2 68%,
      #C4C8DE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(var(--a4), .16));
  transform: translateY(112%);
  opacity: 0;
  animation: cx-line-up 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}
.cx-title span:nth-child(1) i { animation-delay: .30s; }
.cx-title span:nth-child(2) i { animation-delay: .44s; }
@keyframes cx-line-up {
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- 英文副标 ---------- */
.cx-en {
  margin: clamp(16px, 2vw, 24px) 0 0;
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Menlo, monospace);
  font-size: clamp(8.5px, .8vw, 10px);
  letter-spacing: .46em;
  text-indent: .46em;
  color: rgba(206,200,236, .70);
  font-weight: 400;
  opacity: 0;
  animation: cx-fade 1.1s ease-out .95s forwards;
}

/* ∞ */
.cx-infinite {
  display: block;
  margin: clamp(12px, 1.6vw, 18px) auto 0;
  width: 32px; height: 16px;
  opacity: 0;
  animation: cx-fade 1.2s ease-out 1.1s forwards;
}
.cx-infinite path {
  fill: none;
  stroke: rgba(var(--a2), .68);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: cx-draw 1.6s ease-out 1.2s forwards;
}

/* ---------- 五个站点通道 ---------- */
.cx-ports {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(24px, 4.6vw, 68px);
  margin: clamp(38px, 5.4vh, 64px) 0 0;
}
.cx-ports::before {
  content: "";
  position: absolute;
  left: -70px;
  right: -70px;
  top: calc(clamp(54px, 4.4vw, 66px) / 2);
  height: 1px;
  background-image: linear-gradient(90deg,
    rgba(var(--a2), 0) 0%,
    rgba(var(--a1), .40) 12%,
    rgba(var(--a1), .40) 34%,
    rgba(var(--a3), .40) 56%,
    rgba(var(--a3), .40) 78%,
    rgba(var(--a2), 0) 100%);
  pointer-events: none;
}

.cx-port {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 92px;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: cx-port-in .9s cubic-bezier(.16, 1, .3, 1) forwards;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.cx-port:nth-child(1) { animation-delay: 1.15s; }
.cx-port:nth-child(2) { animation-delay: 1.28s; }
.cx-port:nth-child(3) { animation-delay: 1.41s; }
.cx-port:nth-child(4) { animation-delay: 1.54s; }
.cx-port:nth-child(5) { animation-delay: 1.67s; }
@keyframes cx-port-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 五个行星：紫粉家族里的五种色调 —— 紫罗兰 / 玫粉 / 藕荷 / 珊瑚 / 淡紫 */
.cx-port:nth-child(1) { --acc: 188, 132, 244; --acc-l: 238, 220, 255; --ra: .70; --sp: 14s; }
.cx-port:nth-child(2) { --acc: 240, 140, 190; --acc-l: 255, 222, 238; --ra: .62; --sp: 18s; }
.cx-port:nth-child(3) { --acc: 168, 148, 222; --acc-l: 230, 222, 250; --ra: .64; --sp: 22s; }
.cx-port:nth-child(4) { --acc: 246, 160, 152; --acc-l: 255, 226, 220; --ra: .56; --sp: 16s; }
.cx-port:nth-child(5) { --acc: 210, 170, 246; --acc-l: 246, 232, 255; --ra: .66; --sp: 20s; }

.cx-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(54px, 4.4vw, 66px);
  height: clamp(54px, 4.4vw, 66px);
  border-radius: 50%;
  border: 1px solid rgba(var(--acc), var(--ra, .58));
  background:
    radial-gradient(closest-side, rgba(var(--acc), .22), rgba(var(--acc), .06) 62%, transparent 80%);
  box-shadow:
    inset 0 1px 0 rgba(var(--acc-l), .48),
    inset 0 -1px 0 rgba(var(--acc), .28),
    0 0 5px rgba(var(--acc), .45),
    0 0 28px rgba(var(--acc), .55),
    0 0 70px rgba(var(--acc), .26);
  transition: border-color .5s, box-shadow .5s, background .5s;
  backdrop-filter: blur(1px);
}
.cx-ring::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--acc), calc(var(--ra, .58) * .62));
  transition: border-color .5s, transform .8s cubic-bezier(.16, 1, .3, 1);
}
.cx-ring::after {
  content: "";
  position: absolute;
  top: -2.5px; left: 50%;
  width: 3px; height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: rgb(var(--acc-l));
  box-shadow: 0 0 10px 3px rgba(var(--acc), .7);
  animation: cx-sat var(--sp, 14s) linear infinite;
  transform-origin: 1.5px calc(clamp(54px, 4.4vw, 66px) / 2 + 2.5px);
}
@keyframes cx-sat { to { transform: rotate(360deg); } }
.cx-port:nth-child(even) .cx-ring::after { animation-direction: reverse; }
.cx-port:nth-child(odd) .cx-ring::before { animation: cx-dash 36s linear infinite; }
@keyframes cx-dash { to { transform: rotate(360deg); } }

.cx-ring svg {
  width: 25px; height: 25px;
  overflow: visible;
  fill: none;
  stroke: rgba(var(--acc-l), 1);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .4s, transform .6s cubic-bezier(.16, 1, .3, 1);
}

.cx-label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: .24em;
  color: rgba(255,255,255, .68);
  transition: color .4s;
}
.cx-label b {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .12em;
  color: rgba(var(--acc), .48);
  transition: color .4s;
}

.cx-port:hover,
.cx-port:focus-visible { transform: translateY(-5px); outline: none; }
.cx-port:hover .cx-ring,
.cx-port:focus-visible .cx-ring {
  border-color: rgba(var(--acc-l), .92);
  background: radial-gradient(closest-side, rgba(var(--acc), .34), rgba(var(--acc), .10) 66%, transparent 84%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255, .28),
    0 0 0 1px rgba(var(--acc), .22),
    0 0 34px rgba(var(--acc), .42),
    0 0 74px rgba(var(--acc), .16);
}
.cx-port:hover .cx-ring::before,
.cx-port:focus-visible .cx-ring::before {
  border-color: rgba(var(--acc), .5);
  transform: scale(1.07) rotate(12deg);
}
.cx-port:hover .cx-ring svg,
.cx-port:focus-visible .cx-ring svg { stroke: #fff; transform: scale(1.04); }
.cx-port:hover .cx-label,
.cx-port:focus-visible .cx-label { color: rgb(var(--acc-l)); }
.cx-port:hover .cx-label b,
.cx-port:focus-visible .cx-label b { color: rgba(var(--acc), .84); }

/* ---------- 底部仪表 ---------- */
.cx-meta {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.6vw, 22px);
  padding: 0 20px;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 8.5px;
  letter-spacing: .28em;
  color: rgba(var(--a2), .46);
  pointer-events: none;
  opacity: 0;
  animation: cx-fade 1.2s ease-out 1.9s forwards;
}
.cx-meta span { white-space: nowrap; }
.cx-meta i {
  display: block;
  width: clamp(14px, 3vw, 38px);
  height: 1px;
  background: rgba(var(--a2), .26);
  font-style: normal;
}
.cx-meta .cx-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(var(--a1), .72);
}
.cx-meta .cx-live::before {
  content: "";
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgb(var(--a4));
  box-shadow: 0 0 8px 3px rgba(var(--a1), .8);
  animation: cx-pulse 2.8s ease-in-out infinite;
}
@keyframes cx-pulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

@keyframes cx-fade { to { opacity: 1; } }
@keyframes cx-draw { to { stroke-dashoffset: 0; } }

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .cosmos-stage { padding: 88px 20px 84px; }
  .cx-kicker { font-size: 8px; letter-spacing: .22em; gap: 10px; margin-bottom: 18px; }
  .cx-kicker::before, .cx-kicker::after { width: 16px; }
  .cx-kicker .cx-loc { display: none; }
  .cx-title { font-size: clamp(26px, 8.2vw, 35px); line-height: 1.34; letter-spacing: .03em; }
  .cx-en { font-size: 7.5px; letter-spacing: .26em; text-indent: .26em; margin-top: 14px; }
  .cx-ports {
    gap: 0;
    width: 100%;
    max-width: 350px;
    justify-content: space-between;
    margin-top: clamp(30px, 5vh, 44px);
  }
  .cx-ports::before { left: -12px; right: -12px; top: 25px; }
  .cx-port { width: auto; gap: 11px; }
  .cx-ring { width: 50px; height: 50px; }
  .cx-ring::before { inset: -6px; }
  .cx-ring::after { transform-origin: 1.5px calc(50px / 2 + 2.5px); }
  .cx-ring svg { width: 21px; height: 21px; }
  .cx-label { font-size: 10px; letter-spacing: .12em; gap: 0; }
  .cx-label b { display: none; }
  .cx-meta {
    font-size: 7px; letter-spacing: .16em; gap: 8px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }
  .cx-meta .cx-hide-m { display: none; }
  .cosmos-horizon { width: 300vmax; height: 190vmax; transform: translate(-50%, 80%); }
  .cosmos-hud { inset: 84px 16px 78px; }
  .cosmos-hud i { width: 11px; height: 11px; }
  .cosmos-hud i::before { width: 11px; }
  .cosmos-hud i::after { height: 11px; }
  .cosmos-grid { height: 34vh; opacity: .42; }
  .cosmos-milky { top: 26%; height: 30vh; opacity: .8; }

  body.cosmos .sdock {
    background: rgba(0,0,0, .95);
    border-top: 1px solid rgba(var(--a2), .07);
    box-shadow: 0 -10px 34px rgba(0,0,0, .6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  body.cosmos .sdock-btn { color: rgba(255,255,255, .76); }
  body.cosmos .sdock-btn .ic { stroke: rgba(255,255,255, .8); }
  body.cosmos .sdock-btn.primary .ic { stroke: #fff; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .cosmos-stage { padding-top: 84px; padding-bottom: 62px; }
  .cx-title { font-size: clamp(28px, 3.6vw, 52px); }
  .cx-ports { margin-top: 30px; }
  .cx-ring { width: 54px; height: 54px; }
  .cx-kicker { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #cosmos-canvas,
  body.cosmos::before,
  .cx-orbits i,
  .cx-ring::after,
  .cx-meta .cx-live::before,
  .cosmos-grid,
  .cosmos-milky { animation: none !important; }
  .cx-kicker, .cx-en, .cx-infinite, .cx-port, .cx-meta { opacity: 1; animation: none; }
  .cx-title span i { transform: none; opacity: 1; animation: none; }
  .cx-infinite path { stroke-dashoffset: 0; animation: none; }
  .cosmos-stage { transition: none; }
}

/* ============================================================
   北极星：整屏唯一的视觉焦点（一颗特别亮的星）
   ============================================================ */
.cx-north {
  position: absolute;
  right: 14%;
  top: 25%;
  width: 0;
  height: 0;
  z-index: -1;
  pointer-events: none;
}

/* 核心：炽白一点 */
.cx-north-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 55%, #FBF6FF 78%, rgba(var(--a4), 0) 100%);
  box-shadow:
    0 0 6px 1px rgba(255,255,255, .95),
    0 0 18px 5px rgba(var(--a4), .58),
    0 0 54px 16px rgba(var(--a2), .26),
    0 0 120px 46px rgba(var(--a1), .12);
  animation: north-pulse 5.4s ease-in-out infinite;
}
@keyframes north-pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.16); opacity: 1; }
}

/* 外层光晕：五色马卡龙柔光，呼吸出颜色 */
.cx-north-halo {
  position: absolute;
  left: 50%; top: 50%;
  width: 320px; height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 40%,
      rgba(var(--a4), .16) 0%,
      rgba(214,202,246, .12) 20%,
      rgba(var(--a2), .075) 38%,
      transparent 66%),
    radial-gradient(circle at 62% 62%,
      rgba(var(--a1), .10) 0%,
      rgba(var(--a1), .04) 34%,
      transparent 62%),
    radial-gradient(circle at 64% 34%,
      rgba(var(--a3), .09) 0%,
      transparent 58%);
  filter: blur(6px);
  animation: north-breathe 7.5s ease-in-out infinite alternate;
}
@keyframes north-breathe {
  from { transform: scale(.9); opacity: .72; }
  to   { transform: scale(1.08); opacity: 1; }
}

/* 星芒：从核心向外的锐利光针 */
.cx-rays {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  display: block;
}
.cx-rays i {
  position: absolute;
  left: 0; top: 0;
  width: var(--w, 160px);
  height: 1px;
  transform-origin: 0 50%;
  transform: rotate(var(--a, 0deg)) translateY(-.5px);
  background: linear-gradient(90deg,
    rgba(255,255,255, .95) 0%,
    rgba(var(--a2), .60) 18%,
    rgba(var(--a2), .22) 55%,
    rgba(var(--a4), 0) 100%);
  animation: ray-twinkle 6.5s ease-in-out infinite;
}
.cx-rays i.s {
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255,255,255, .74) 0%,
    rgba(var(--a2), .36) 30%,
    rgba(var(--a4), 0) 100%);
}
.cx-rays i:nth-child(2) { animation-delay: -1.1s; }
.cx-rays i:nth-child(3) { animation-delay: -2.3s; }
.cx-rays i:nth-child(4) { animation-delay: -3.4s; }
.cx-rays i:nth-child(5) { animation-delay: -.7s; }
.cx-rays i:nth-child(6) { animation-delay: -4.2s; }
.cx-rays i:nth-child(7) { animation-delay: -2.9s; }
.cx-rays i:nth-child(8) { animation-delay: -5.1s; }
@keyframes ray-twinkle {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}

/* 两圈极细金环：科技刻度感 */
.cx-north-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 158px; height: 158px;
  margin: -79px 0 0 -79px;
  border: 1px solid rgba(var(--a2), .34);
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(var(--a2), .10), inset 0 0 26px rgba(var(--a2), .06);
  animation: ring-spin 52s linear infinite;
}
.cx-north-ring::after {
  content: "";
  position: absolute;
  top: -2px; left: 50%;
  width: 3px; height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: rgb(var(--a4));
  box-shadow: 0 0 8px 3px rgba(var(--a3), .8), 0 0 18px 6px rgba(var(--a2), .3);
}
.cx-north-ring.r2 {
  width: 244px; height: 244px;
  margin: -122px 0 0 -122px;
  border-color: rgba(var(--a1), .22);
  border-style: dashed;
  animation-duration: 96s;
  animation-direction: reverse;
}
.cx-north-ring.r2::after { display: none; }
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* 平板 / 手机：缩小并移到标题上方右侧，避免压字 */
@media (max-width: 1100px) {
  .cx-north { right: 10%; top: 22%; transform: scale(.78); }
}
@media (max-width: 860px) {
  .cx-north {
    right: 12%;
    top: 15%;
    transform: scale(.52);
  }
  .cx-north-halo { filter: blur(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .cx-north-core, .cx-north-halo, .cx-rays i, .cx-north-ring { animation: none !important; }
}

/* ============================================================
   纵深与写实：前景尘埃遮挡 + 近场雾化 + 胶片微粒
   ============================================================ */
/* 前景尘埃：横跨画面的暗色尘带，压住远景星云，制造前后景分离 */
.cosmos-vignette::before {
  content: "";
  position: absolute;
  inset: -6%;
  pointer-events: none;
  background:
    radial-gradient(64% 13% at 38% 44%, rgba(7,9,16, .42), transparent 72%),
    radial-gradient(52% 9% at 70% 33%, rgba(7,9,16, .34), transparent 74%),
    radial-gradient(46% 8% at 24% 62%, rgba(7,9,16, .30), transparent 74%);
  filter: blur(26px);
}
/* 近场雾：底部与四周的薄雾，越靠边越"近" */
.cosmos-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 22% at 50% 100%, rgba(var(--a1), .13), transparent 72%),
    radial-gradient(44% 16% at 4% 92%, rgba(var(--a1), .13), transparent 74%),
    radial-gradient(44% 16% at 96% 90%, rgba(var(--a3), .12), transparent 74%);
  filter: blur(22px);
}

/* 胶片微粒：让深空"有质感"，不是纯色块 */
body.cosmos .cosmos-grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 180px 180px;
}

/* ============================================================
   v25 · 只有一个光源：星星有颜色，地平线发光，其余全部暗黑
   （本段最后加载，整段覆盖前面的配色，改风格只动这里）
   ============================================================ */
body.cosmos {
  --a1: 190, 132, 246;   /* 星点 · 紫 */
  --a2: 248, 156, 208;   /* 星点 · 粉 */
  --a3: 118, 82, 186;    /* 星点 · 深紫 */
  --a4: 236, 240, 250;   /* 银白：地平线亮边 / 文字 / 细线 */
  --bg1: #131318;
  --bg2: #0A0A0D;
  --bg3: #050506;
  --bg4: #020203;
  --bg5: #000000;
}

html.cosmos-on,
body.cosmos { background: #000; }

/* 星云：不再有颜色，只剩一层几乎看不见的冷灰空气 */
body.cosmos::before {
  background:
    radial-gradient(closest-side, rgba(198, 206, 226, .062), rgba(198,206,226,.018) 44%, transparent 72%) 22% 16% / 76vw 76vw no-repeat,
    radial-gradient(closest-side, rgba(198, 206, 226, .040), transparent 70%) 82% 24% / 62vw 62vw no-repeat,
    radial-gradient(closest-side, rgba(180, 190, 214, .034), transparent 72%) 58% 92% / 56vw 56vw no-repeat,
    radial-gradient(closest-side, rgba(198, 206, 226, .030), transparent 72%) 6% 74% / 48vw 48vw no-repeat;
  filter: blur(34px) saturate(0%);
}

/* 银河带：一道无色冷光尘 */
body.cosmos .cosmos-milky {
  opacity: .5;
  background:
    radial-gradient(46% 50% at 18% 52%, rgba(206, 214, 234, .075), transparent 72%),
    radial-gradient(36% 42% at 38% 40%, rgba(180, 190, 214, .045), transparent 74%),
    radial-gradient(44% 44% at 80% 46%, rgba(206, 214, 234, .05), transparent 72%);
  filter: blur(30px) saturate(0%);
}

/* 暗角：压到纯黑，画面四边彻底沉下去 */
body.cosmos .cosmos-vignette {
  background:
    radial-gradient(62% 54% at 50% 44%, transparent 14%, rgba(0,0,0,.58) 60%, #000 100%),
    linear-gradient(180deg, rgba(0,0,0,.80) 0%, transparent 15%, transparent 64%, rgba(0,0,0,.98) 100%);
}
body.cosmos .cosmos-vignette::after {
  background:
    radial-gradient(70% 22% at 50% 100%, rgba(196, 206, 228, .05), transparent 72%),
    radial-gradient(44% 16% at 4% 92%, rgba(196, 206, 228, .035), transparent 74%),
    radial-gradient(44% 16% at 96% 90%, rgba(196, 206, 228, .03), transparent 74%);
}

/* ---------- 地平线：全画面唯一的光 ---------- */
body.cosmos .cosmos-horizon {
  background:
    radial-gradient(closest-side, rgba(0,0,0,.97), #000 56%, #000 100%);
  box-shadow:
    0 -1px 0 rgba(255,255,255,.98),
    0 -2px 3px rgba(255,255,255,.60),
    0 -7px 24px rgba(216, 226, 250, .28),
    0 -18px 64px rgba(190, 204, 240, .14),
    0 -48px 150px rgba(160, 178, 226, .07);
}
body.cosmos .cosmos-horizon::before {
  background:
    radial-gradient(46% 42% at 20% 76%, rgba(228, 236, 252, .17), transparent 70%),
    radial-gradient(50% 40% at 44% 70%, rgba(208, 220, 246, .12), transparent 72%),
    radial-gradient(44% 38% at 64% 78%, rgba(198, 212, 244, .09), transparent 72%),
    radial-gradient(42% 34% at 82% 78%, rgba(228, 236, 252, .08), transparent 72%);
}
body.cosmos .cosmos-horizon::after {
  background:
    radial-gradient(50% 50% at 50% 100%, rgba(255,255,255,.68), rgba(224,232,250,.20) 44%, transparent 74%);
}

/* 坐标网格：无色细线 */
body.cosmos .cosmos-grid {
  opacity: .34;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.038) 0 1px, transparent 1px 84px);
}
@keyframes grid-breathe-black {
  from { opacity: .22; }
  to   { opacity: .40; }
}
body.cosmos .cosmos-grid { animation: grid-breathe-black 9s ease-in-out infinite alternate; }

/* ---------- 导航 ---------- */
body.cosmos .nav-links a:hover,
body.cosmos .nav-links a.active { color: #FFFFFF; }
body.cosmos .nav-cta {
  background: rgba(255,255,255, .045) !important;
  color: #F2F4FA !important;
  border: 1px solid rgba(255,255,255, .20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255, .16),
    0 6px 24px rgba(0,0,0, .7);
  backdrop-filter: blur(14px) saturate(0%);
  -webkit-backdrop-filter: blur(14px) saturate(0%);
}
body.cosmos .nav-cta::before { background: rgba(255,255,255,.34); opacity: 1; }
body.cosmos .nav-cta:hover {
  background: rgba(255,255,255, .10) !important;
  border-color: rgba(255,255,255, .42);
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 10px 30px rgba(0,0,0,.7);
}

/* ---------- 文字与细线：全部银白，不带色 ---------- */
body.cosmos .cx-kicker { color: rgba(226, 232, 246, .52); }
body.cosmos .cx-kicker::before { background: linear-gradient(90deg, transparent, rgba(255,255,255,.30)); }
body.cosmos .cx-kicker::after  { background: linear-gradient(270deg, transparent, rgba(255,255,255,.30)); }
body.cosmos .cx-kicker b { color: rgba(226, 232, 246, .30); }
body.cosmos .cx-title::before {
  background:
    radial-gradient(closest-side, rgba(255,255,255,.028), transparent 66%) 46% 50% / 86% 94% no-repeat,
    radial-gradient(closest-side, rgba(200,210,236,.016), transparent 70%) 22% 48% / 56% 78% no-repeat;
}
body.cosmos .cx-en { color: rgba(226, 232, 246, .58); }
body.cosmos .cx-infinite path { stroke: rgba(226, 232, 246, .50); }

/* 五个通道：暗银细环，不发光 */
body.cosmos .cx-port:nth-child(n) { --acc: 214, 222, 238; --acc-l: 255, 255, 255; --ra: .26; }
body.cosmos .cx-ports::before {
  background-image: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.16) 12%,
    rgba(255,255,255,.16) 82%,
    rgba(255,255,255,0) 100%);
}
body.cosmos .cx-ring {
  border-color: rgba(226, 232, 246, .26);
  background: radial-gradient(closest-side, rgba(226,232,246,.045), transparent 78%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 0 22px rgba(0,0,0,.8);
}
body.cosmos .cx-ring::before { border-color: rgba(226, 232, 246, .13); }
body.cosmos .cx-ring::after {
  background: #FFFFFF;
  box-shadow: 0 0 8px 2px rgba(255,255,255,.55);
}
body.cosmos .cx-ring svg { stroke: rgba(236, 240, 250, .88); }
body.cosmos .cx-label { color: rgba(255,255,255, .62); }
body.cosmos .cx-label b { color: rgba(214, 222, 238, .40); }
body.cosmos .cx-port:hover .cx-ring,
body.cosmos .cx-port:focus-visible .cx-ring {
  border-color: rgba(255,255,255,.78);
  background: radial-gradient(closest-side, rgba(255,255,255,.10), transparent 80%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 0 26px rgba(255,255,255,.16);
}
body.cosmos .cx-port:hover .cx-label,
body.cosmos .cx-port:focus-visible .cx-label { color: #fff; }

/* 底部仪表 */
body.cosmos .cx-meta { color: rgba(206, 214, 232, .40); }
body.cosmos .cx-meta i { background: rgba(255,255,255, .16); }
body.cosmos .cx-meta .cx-live { color: rgba(240, 244, 252, .70); }
body.cosmos .cx-meta .cx-live::before {
  background: #fff;
  box-shadow: 0 0 8px 3px rgba(255,255,255,.55);
}

/* ---------- 北极星：全屏最亮的一点，仍用银白 ---------- */
body.cosmos .cx-north-core {
  background: radial-gradient(circle, #fff 0 55%, #FBFAFF 78%, rgba(255,255,255,0) 100%);
  box-shadow:
    0 0 6px 1px rgba(255,255,255,.98),
    0 0 20px 6px rgba(240,244,252,.62),
    0 0 60px 18px rgba(210,220,246,.24),
    0 0 140px 52px rgba(186,200,236,.11);
}
body.cosmos .cx-north-halo {
  background:
    radial-gradient(circle at 50% 50%,
      rgba(255,255,255,.14) 0%,
      rgba(232,238,250,.09) 22%,
      rgba(206,218,242,.045) 42%,
      transparent 68%);
  filter: blur(8px);
}
body.cosmos .cx-rays i {
  background: linear-gradient(90deg,
    rgba(255,255,255,.95) 0%,
    rgba(236,242,252,.48) 18%,
    rgba(220,228,246,.16) 55%,
    rgba(255,255,255,0) 100%);
}
body.cosmos .cx-rays i.s {
  background: linear-gradient(90deg,
    rgba(255,255,255,.80) 0%,
    rgba(232,238,250,.30) 30%,
    rgba(255,255,255,0) 100%);
}
body.cosmos .cx-north-ring {
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 0 22px rgba(255,255,255,.05), inset 0 0 22px rgba(255,255,255,.04);
}
body.cosmos .cx-north-ring::after {
  background: #fff;
  box-shadow: 0 0 8px 3px rgba(255,255,255,.7);
}
body.cosmos .cx-north-ring.r2 { border-color: rgba(255,255,255,.12); }

/* 轨道仪 */
body.cosmos .cx-orbits i { border-color: rgba(255,255,255,.055); }
body.cosmos .cx-orbits i:nth-child(2) { border-color: rgba(255,255,255,.04); }
body.cosmos .cx-orbits i:nth-child(3) { border-color: rgba(255,255,255,.03); }
body.cosmos .cx-orbits i::after { background: #fff; box-shadow: 0 0 10px 3px rgba(255,255,255,.45); }

/* 移动端菜单 */
@media (max-width: 860px) {
  body.cosmos .nav-links { background: rgba(0,0,0,.97); border-bottom: 1px solid rgba(255,255,255,.08); }
  body.cosmos .nav-cta { color: #F2F4FA !important; }
  .cosmos-horizon { transform: translate(-50%, 84%); }
  body.cosmos .cosmos-horizon::after { opacity: .8; }
}

/* ============================================================
   v26 · 梦幻动效：星云呼吸 / 五站点莫兰迪行星（浮动·呼吸·扫描）
   ============================================================ */
/* 星云与银河带动得更明显（但仍是极淡冷雾，不抢星点） */
body.cosmos::before { animation: nebula-drift 44s ease-in-out infinite alternate; }
body.cosmos .cosmos-milky { animation: milky-breathe 17s ease-in-out infinite alternate; }
body.cosmos .cosmos-vignette::before { animation: dust-drift 58s ease-in-out infinite alternate; }
@keyframes dust-drift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); opacity: .85; }
  to   { transform: translate3d(1.8%, -1.2%, 0) scale(1.08); opacity: 1; }
}

/* ---------- 五站点：莫兰迪五色 —— 雾紫 / 雾青 / 雾粉 / 雾蓝 / 雾杏 ---------- */
body.cosmos .cx-port {
  --rs: clamp(54px, 4.4vw, 66px);
}
/* 五行莫兰迪：金 · 香槟 / 木 · 青苔 / 水 · 雾蓝 / 火 · 陶红 / 土 · 褐陶 */
body.cosmos .cx-port:nth-child(1) { --acc: 198, 174, 132; --acc-l: 248, 238, 214; --ra: .62; --sp: 13s; } /* 金 */
body.cosmos .cx-port:nth-child(2) { --acc: 148, 176, 150; --acc-l: 214, 240, 210; --ra: .56; --sp: 17s; } /* 木 */
body.cosmos .cx-port:nth-child(3) { --acc: 138, 168, 196; --acc-l: 210, 230, 246; --ra: .56; --sp: 21s; } /* 水 */
body.cosmos .cx-port:nth-child(4) { --acc: 204, 132, 116; --acc-l: 248, 208, 196; --ra: .58; --sp: 15s; } /* 火 */
body.cosmos .cx-port:nth-child(5) { --acc: 174, 148, 122; --acc-l: 240, 226, 204; --ra: .56; --sp: 19s; } /* 土 */

/* 行星外的呼吸光晕 */
body.cosmos .cx-port::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--rs) / 2);
  width: calc(var(--rs) * 3.1);
  height: calc(var(--rs) * 3.1);
  margin: calc(var(--rs) * -1.55) 0 0 calc(var(--rs) * -1.55);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side,
    rgba(var(--acc), .26) 0%,
    rgba(var(--acc), .12) 38%,
    rgba(var(--acc), .04) 62%,
    transparent 78%);
  filter: blur(7px);
  animation: port-halo 6.8s ease-in-out infinite alternate;
}
@keyframes port-halo {
  from { transform: scale(.86); opacity: .55; }
  to   { transform: scale(1.10); opacity: 1; }
}

/* 环上的一道扫描光弧：科技感的动 */
body.cosmos .cx-port::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--rs) / 2);
  width: var(--rs);
  height: var(--rs);
  margin: calc(var(--rs) * -.5) 0 0 calc(var(--rs) * -.5);
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg,
    transparent 0deg 250deg,
    rgba(var(--acc), .55) 300deg,
    rgba(255,255,255,.85) 340deg,
    transparent 360deg);
  -webkit-mask: radial-gradient(closest-side,
    transparent 0 calc(50% - 1.8px), #000 calc(50% - 1.4px) 50%, transparent 50.2%);
  mask: radial-gradient(closest-side,
    transparent 0 calc(50% - 1.8px), #000 calc(50% - 1.4px) 50%, transparent 50.2%);
  animation: port-scan 6s linear infinite;
  opacity: .9;
}
@keyframes port-scan { to { transform: rotate(360deg); } }

/* 环体：带上莫兰迪色，并有极轻的浮动 */
body.cosmos .cx-ring {
  position: relative;
  z-index: 1;
  border-color: rgba(var(--acc), .62);
  background: radial-gradient(closest-side,
    rgba(var(--acc), .14), rgba(var(--acc), .04) 64%, transparent 82%);
  box-shadow:
    inset 0 1px 0 rgba(var(--acc-l), .34),
    inset 0 -1px 0 rgba(var(--acc), .20),
    0 0 18px rgba(var(--acc), .20),
    0 0 46px rgba(var(--acc), .10);
  animation: port-float 7.2s ease-in-out infinite;
}
@keyframes port-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
body.cosmos .cx-port:nth-child(2) .cx-ring { animation-duration: 8.4s; animation-delay: -1.2s; }
body.cosmos .cx-port:nth-child(3) .cx-ring { animation-duration: 6.6s; animation-delay: -2.4s; }
body.cosmos .cx-port:nth-child(4) .cx-ring { animation-duration: 8.8s; animation-delay: -.8s; }
body.cosmos .cx-port:nth-child(5) .cx-ring { animation-duration: 7.8s; animation-delay: -3.1s; }
body.cosmos .cx-port:nth-child(1) .cx-port::before { animation-delay: -.4s; }

body.cosmos .cx-ring::before {
  border-color: rgba(var(--acc), .30);
  animation: cx-dash 28s linear infinite;
}
body.cosmos .cx-port:nth-child(even) .cx-ring::before { animation-direction: reverse; }
body.cosmos .cx-ring::after {
  background: rgb(var(--acc-l));
  box-shadow: 0 0 8px 2px rgba(var(--acc), .85), 0 0 16px 5px rgba(var(--acc), .30);
}
body.cosmos .cx-ring svg { stroke: rgba(var(--acc-l), .96); }
body.cosmos .cx-label { color: rgba(255,255,255, .64); }
body.cosmos .cx-label b { color: rgba(var(--acc), .72); }

/* hover：整颗行星点亮 */
body.cosmos .cx-port:hover .cx-ring,
body.cosmos .cx-port:focus-visible .cx-ring {
  border-color: rgba(var(--acc-l), .92);
  background: radial-gradient(closest-side, rgba(var(--acc), .30), rgba(var(--acc), .08) 64%, transparent 84%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.38),
    0 0 0 1px rgba(var(--acc), .30),
    0 0 26px rgba(var(--acc), .45),
    0 0 64px rgba(var(--acc), .22);
}
body.cosmos .cx-port:hover .cx-ring svg,
body.cosmos .cx-port:focus-visible .cx-ring svg { stroke: #fff; }
body.cosmos .cx-port:hover .cx-label,
body.cosmos .cx-port:focus-visible .cx-label { color: #fff; }

@media (max-width: 860px) {
  body.cosmos .cx-port { --rs: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  body.cosmos .cx-port::before,
  body.cosmos .cx-port::after,
  body.cosmos .cx-ring,
  body.cosmos .cx-port .cx-ring::before { animation: none !important; }
}
