/* ==========================================================================
   QIYUTOPIA // REALM — Nocturne Voxel Theme
   夜色 · 方月 · 余烬粒子 · 方块地平线 · 毛玻璃 Bento
   零外部依赖，仅使用系统字体
   ========================================================================== */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg-0: #08090d;
  --bg-1: #0c0f16;
  --bg-2: #10131c;

  --glass: rgba(14, 17, 26, 0.52);
  --glass-strong: rgba(12, 14, 22, 0.72);
  --hair: rgba(255, 255, 255, 0.08);
  --hair-soft: rgba(255, 255, 255, 0.05);

  --text-1: rgba(244, 241, 235, 0.95);
  --text-2: rgba(196, 199, 210, 0.7);
  --text-3: rgba(150, 156, 174, 0.5);

  --amber: #d8b482;
  --amber-hi: #f1d7ad;
  --amber-a: rgba(216, 180, 130, 0.16);
  --moss: #8fbf9f;
  --rose: #d8837c;

  --r-xl: 22px;
  --r-lg: 14px;
  --r-md: 10px;

  --font-sans: "Segoe UI Variable Text", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-display: "Segoe UI Variable Display", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --mouse-x: 50vw;
  --mouse-y: 40vh;
  --aura-x: 50vw;
  --aura-y: 40vh;
  --par-x: 0;
  --par-y: 0;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(216, 180, 130, 0.26); color: #fff; }

.mono { font-family: var(--font-mono); }
.accent { color: var(--amber); }

/* ==========================================================================
   背景舞台
   ========================================================================== */
.ambient-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 60% at 78% 8%, rgba(120, 136, 170, 0.12), transparent 60%),
    radial-gradient(70% 50% at 10% 100%, rgba(216, 180, 130, 0.08), transparent 65%),
    linear-gradient(180deg, #080a10 0%, #0e1119 50%, #141826 100%);
}

/* 极光（低饱和、慢速漂移） */
.aurora {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 75vh;
  filter: blur(70px);
  opacity: 0.9;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  animation: aurora-drift 26s ease-in-out infinite alternate;
}
.aurora .a1 {
  width: 62vw; height: 26vh; left: 4%; top: 14%;
  background: radial-gradient(ellipse, rgba(90, 170, 160, 0.2), transparent 70%);
  transform: rotate(-8deg);
}
.aurora .a2 {
  width: 52vw; height: 30vh; right: 2%; top: 4%;
  background: radial-gradient(ellipse, rgba(128, 108, 200, 0.18), transparent 70%);
  animation-duration: 32s;
  animation-delay: -8s;
}
.aurora .a3 {
  width: 46vw; height: 22vh; left: 30%; top: 34%;
  background: radial-gradient(ellipse, rgba(216, 160, 100, 0.12), transparent 70%);
  animation-duration: 38s;
  animation-delay: -14s;
}

/* 方形月亮（Minecraft 致敬） */
.pixel-moon {
  position: absolute;
  top: 11vh;
  right: 13vw;
  width: 46px;
  height: 46px;
  background: linear-gradient(145deg, #f4eedd 0%, #d8d0bb 100%);
  opacity: 0.8;
  box-shadow:
    0 0 30px 8px rgba(240, 232, 210, 0.16),
    0 0 140px 60px rgba(240, 232, 210, 0.07);
  transform: translate3d(calc(var(--par-x) * -10px), calc(var(--par-y) * -6px), 0);
}
.pixel-moon::before,
.pixel-moon::after,
.pixel-moon span {
  content: "";
  position: absolute;
  background: rgba(150, 142, 124, 0.45);
}
.pixel-moon::before { width: 12px; height: 12px; top: 8px; left: 9px; }
.pixel-moon::after  { width: 8px;  height: 8px;  bottom: 9px; right: 8px; }
.pixel-moon span    { width: 6px;  height: 6px;  top: 24px; left: 26px; opacity: 0.7; }

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cursor-glow,
.cursor-aura {
  position: absolute;
  inset: 0;
}
.cursor-glow {
  background: radial-gradient(420px circle at var(--mouse-x) var(--mouse-y),
    rgba(236, 240, 248, 0.06) 0%, rgba(216, 180, 130, 0.03) 38%, transparent 70%);
}
.cursor-aura {
  background: radial-gradient(860px circle at var(--aura-x) var(--aura-y),
    rgba(216, 180, 130, 0.045) 0%, rgba(120, 140, 190, 0.02) 45%, transparent 75%);
}

/* 方块地平线 */
.terrain {
  position: absolute;
  left: -80px;
  right: -80px;
  bottom: 0;
  line-height: 0;
}
.terrain svg { display: block; }
.terrain-back {
  transform: translate3d(calc(var(--par-x) * -7px), 0, 0);
}
.terrain-far {
  opacity: 0.9;
  transform: translate3d(calc(var(--par-x) * -16px), 0, 0);
}
.terrain-near {
  transform: translate3d(calc(var(--par-x) * -38px), 0, 0);
}
.terrain .torch {
  fill: #f1c27d;
  animation: torch-flicker 2.8s ease-in-out infinite;
}
.terrain .torch-glow { animation: torch-flicker 2.8s ease-in-out infinite; }

.ground-fog {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 20vh;
  background: linear-gradient(0deg, rgba(8, 9, 13, 0.85) 0%, rgba(8, 9, 13, 0.25) 50%, transparent 100%);
}

.ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(3, 4, 6, 0.55) 100%);
}

.ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   毛玻璃面板
   ========================================================================== */
.glass-panel {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--hair);
  border-radius: var(--r-xl);
  box-shadow:
    0 30px 70px -20px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 40px rgba(0, 0, 0, 0.25);
}
.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 30%);
}

/* 卡片鼠标聚光边框 */
.spotlight::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--sx, 50%) var(--sy, 0%),
    rgba(241, 215, 173, 0.55), rgba(216, 180, 130, 0.12) 40%, transparent 65%);
  -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 exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.spotlight:hover::after { opacity: 1; }
.spotlight > .spot-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 0%), rgba(216, 180, 130, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.spotlight:hover > .spot-fill { opacity: 1; }

/* ==========================================================================
   体素方块（CSS 3D）
   ========================================================================== */
.voxel-stage {
  --s: 56px;
  position: relative;
  width: var(--s);
  height: var(--s);
  perspective: 700px;
}
.voxel-stage-sm { --s: 46px; margin: 4px auto 30px; }
.voxel-stage-lg { --s: 148px; }

.voxel {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: voxel-spin 22s linear infinite, voxel-float 6s ease-in-out infinite;
}
.voxel .face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(216, 180, 130, 0.42);
  background:
    linear-gradient(rgba(216, 180, 130, 0.07) 1px, transparent 1px) 0 0 / 25% 25%,
    linear-gradient(90deg, rgba(216, 180, 130, 0.07) 1px, transparent 1px) 0 0 / 25% 25%,
    rgba(216, 180, 130, 0.035);
  box-shadow: inset 0 0 calc(var(--s) * 0.3) rgba(216, 180, 130, 0.1);
  backface-visibility: visible;
}
.voxel .f-front  { transform: translateZ(calc(var(--s) / 2)); }
.voxel .f-back   { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.voxel .f-right  { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.voxel .f-left   { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.voxel .f-top    {
  transform: rotateX(90deg) translateZ(calc(var(--s) / 2));
  background-color: rgba(241, 215, 173, 0.12);
  border-color: rgba(241, 215, 173, 0.6);
}
.voxel .f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); opacity: 0.5; }

/* 信标内核（内部反向自转的发光小立方体） */
.voxel-core {
  --cs: 54px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cs);
  height: var(--cs);
  margin-left: calc(var(--cs) / -2);
  margin-top: calc(var(--cs) / -2);
  transform-style: preserve-3d;
  animation: core-spin 11s linear infinite;
}
.voxel-core .cface {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(246, 224, 184, 0.72);
  background: radial-gradient(circle at center, rgba(248, 224, 178, 0.34), rgba(216, 180, 130, 0.14));
  box-shadow: inset 0 0 18px rgba(246, 220, 172, 0.42), 0 0 22px rgba(216, 180, 130, 0.22);
}
.voxel-core .cf-front  { transform: translateZ(calc(var(--cs) / 2)); }
.voxel-core .cf-back   { transform: rotateY(180deg) translateZ(calc(var(--cs) / 2)); }
.voxel-core .cf-right  { transform: rotateY(90deg) translateZ(calc(var(--cs) / 2)); }
.voxel-core .cf-left   { transform: rotateY(-90deg) translateZ(calc(var(--cs) / 2)); }
.voxel-core .cf-top    { transform: rotateX(90deg) translateZ(calc(var(--cs) / 2)); }
.voxel-core .cf-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cs) / 2)); }

.voxel-shadow {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * -0.62);
  width: calc(var(--s) * 1.2);
  height: calc(var(--s) * 0.2);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(216, 180, 130, 0.22), transparent 70%);
  filter: blur(4px);
  animation: shadow-breathe 6s ease-in-out infinite;
}

/* ==========================================================================
   访问码门禁
   ========================================================================== */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 45%, rgba(8, 9, 13, 0.35), rgba(5, 6, 9, 0.72));
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.access-gate.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.access-gate.is-hidden .gate-card { transform: translateY(-14px) scale(0.97); }
.no-transition, .no-transition * { transition: none !important; }

.gate-card {
  width: 100%;
  max-width: 420px;
  padding: 44px 34px 28px;
  text-align: center;
  background: var(--glass-strong);
  transition: transform 0.6s var(--ease);
}
.gate-card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 215, 173, 0.75), transparent);
}

.gate-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--amber);
  opacity: 0.85;
  margin-bottom: 12px;
}
.gate-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.26em;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #fbf6ec 0%, rgba(214, 206, 190, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gate-subtitle {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 30px;
}

.gate-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: var(--r-lg);
  background: rgba(5, 6, 10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.gate-input-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), transparent 0 65%, rgba(241, 215, 173, 0.85) 82%, transparent 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 exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s;
  animation: angle-spin 3.6s linear infinite;
  pointer-events: none;
}
.gate-input-wrap:focus-within::before { opacity: 1; }
.gate-input-wrap:focus-within { box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6), 0 0 32px rgba(216, 180, 130, 0.08); }
.gate-input-wrap.is-error { border-color: rgba(216, 131, 124, 0.55); }
.gate-input-wrap.is-error::before { opacity: 0; }
.gate-input-wrap.is-shaking { animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }

.gate-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 12px 0 52px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.36em;
  text-align: center;
  text-transform: uppercase;
  caret-color: var(--amber);
}
.gate-input::placeholder { color: rgba(170, 176, 192, 0.3); letter-spacing: 0.3em; }

.gate-submit {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid rgba(216, 180, 130, 0.25);
  background: rgba(216, 180, 130, 0.08);
  color: var(--amber-hi);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.15s, box-shadow 0.25s;
}
.gate-submit:hover { background: rgba(216, 180, 130, 0.18); border-color: rgba(216, 180, 130, 0.5); box-shadow: 0 0 20px rgba(216, 180, 130, 0.18); }
.gate-submit:active { transform: scale(0.94); }
.gate-submit svg { width: 18px; height: 18px; }

.gate-feedback {
  min-height: 20px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--rose);
  opacity: 0;
  transition: opacity 0.25s;
}
.gate-feedback.is-visible { opacity: 0.9; }

.gate-footnote {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hair-soft);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--text-3);
}

.dot-sep {
  width: 3px;
  height: 3px;
  background: rgba(216, 180, 130, 0.45);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ==========================================================================
   主门户
   ========================================================================== */
.portal-shell {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: 28px 28px 48px;
  transition: filter 0.7s var(--ease), transform 0.7s var(--ease), opacity 0.7s var(--ease);
}
.portal-shell.is-locked {
  filter: blur(20px) brightness(0.45) saturate(0.8);
  transform: scale(0.98);
  opacity: 0.8;
  pointer-events: none;
  user-select: none;
}

body.is-revealing [data-reveal] {
  animation: rise 1s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 65ms + 120ms);
}

.portal-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* 顶部状态栏 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--hair-soft);
  background: rgba(10, 12, 18, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(216, 180, 130, 0.25)); }
.server-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-cluster { display: flex; gap: 8px; flex-shrink: 0; }
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  white-space: nowrap;
}
.status-pill { color: rgba(214, 238, 222, 0.9); border-color: rgba(143, 191, 159, 0.22); background: rgba(143, 191, 159, 0.06); }
.status-indicator {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 10px rgba(143, 191, 159, 0.8);
  animation: breathe 3.6s ease-in-out infinite;
}
.status-indicator::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(143, 191, 159, 0.5);
  animation: ripple 3.6s ease-out infinite;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding: 44px 12px 32px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--amber);
  margin-bottom: 22px;
}
.eyebrow-line { width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--amber)); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.hero-greeting { color: var(--text-2); font-weight: 200; }
.hero-name {
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, #fff8ea 0%, var(--amber-hi) 35%, var(--amber) 55%, #fff3dc 75%, var(--amber-hi) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s ease-in-out infinite;
  filter: drop-shadow(0 0 28px rgba(216, 180, 130, 0.18));
}
.hero-tagline {
  max-width: 460px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
  letter-spacing: 0.04em;
  margin-bottom: 34px;
}

.hero-meta {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--hair-soft);
  border-radius: var(--r-lg);
  background: rgba(10, 12, 18, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 20px;
}
.meta-cell + .meta-cell { border-left: 1px solid var(--hair-soft); }
.meta-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; color: var(--text-3); }
.meta-v { font-size: 14px; color: var(--text-1); }

.hero-visual {
  position: relative;
  height: 340px;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(216, 180, 130, 0.1);
  transform: translate(-50%, -50%) rotateX(72deg);
}
.orbit-a { width: 320px; height: 320px; border-style: dashed; border-color: rgba(255, 255, 255, 0.06); }
.orbit-b {
  width: 250px;
  height: 250px;
  animation: orbit-rot 14s linear infinite;
}
.orbit-b span {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--amber-hi);
  box-shadow: 0 0 12px 2px rgba(241, 215, 173, 0.6);
}
.hero-visual::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 180, 130, 0.12), transparent 65%);
  filter: blur(10px);
}

/* 数据条 */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 18px;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.35s;
}
.stat > :not(.spot-fill) { position: relative; z-index: 1; }
.stat:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.14); }
.stat-btn {
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.stat-btn:active { transform: scale(0.985); }
.stat-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-1);
  letter-spacing: 0.02em;
}
.stat-v.accent {
  color: var(--amber-hi);
  text-shadow: 0 0 22px rgba(216, 180, 130, 0.38);
}
.stat-v-sm {
  font-size: 15px;
  line-height: 2.3;
  color: var(--amber-hi);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-d { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.crew { display: flex; align-items: center; gap: 8px; height: 35px; }
.crew-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.crew-avatar svg { width: 100%; height: 100%; display: block; }
.crew-avatar:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.36); }
.crew-avatar.is-you { border-color: var(--amber); box-shadow: 0 0 16px rgba(216, 180, 130, 0.48); z-index: 1; }

/* 跑马灯 */
.ticker {
  display: flex;
  align-items: center;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px solid var(--hair-soft);
  background: rgba(10, 12, 18, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
.ticker-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 16px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--rose);
  border-right: 1px solid var(--hair-soft);
  background: rgba(216, 131, 124, 0.05);
}
.ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); animation: breathe 1.6s ease-in-out infinite; }
.ticker-viewport {
  flex: 1;
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  font-size: 13px;
  color: var(--text-2);
  position: relative;
}
.ticker-item::after {
  content: "";
  position: absolute;
  right: -2px;
  width: 4px;
  height: 4px;
  background: rgba(216, 180, 130, 0.5);
  transform: rotate(45deg);
}
.ticker-time { font-size: 11px; color: var(--amber); opacity: 0.8; }

/* Bento 网格 */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }

.card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 26px;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.12); }
.card > :not(.spot-fill) { position: relative; z-index: 1; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--amber);
  opacity: 0.85;
}
.card-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(216, 180, 130, 0.22);
  color: var(--amber-hi);
  background: rgba(216, 180, 130, 0.06);
}
.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 22px;
}

/* 联机地址 */
.endpoint {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 18px 22px;
  border-radius: var(--r-lg);
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.endpoint::before {
  content: "";
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--amber), transparent);
  opacity: 0.7;
}
.endpoint::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(241, 215, 173, 0.18), transparent);
  transform: skewX(-20deg);
  opacity: 0;
}
.endpoint.is-copied {
  border-color: rgba(216, 180, 130, 0.45);
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.55), 0 0 36px rgba(216, 180, 130, 0.16);
}
.endpoint.is-copied::after { animation: sweep 0.9s var(--ease); }

.endpoint-value {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.1vw, 22px);
  letter-spacing: 0.01em;
  word-break: break-all;
  user-select: all;
}
.addr-host { color: var(--text-1); }
.addr-sep { color: var(--text-3); margin: 0 1px; }
.addr-port { color: var(--amber-hi); text-shadow: 0 0 18px rgba(216, 180, 130, 0.35); }

.spec-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.spec {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--hair-soft);
  min-width: 0;
}
.spec-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--text-3); }
.spec-v { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 内存条 */
.memory {
  padding: 16px 16px 12px;
  border-radius: var(--r-lg);
  background: rgba(5, 6, 10, 0.5);
  border: 1px solid var(--hair-soft);
  margin-bottom: 20px;
}
.memory-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.memory-val { font-size: 18px; color: var(--amber-hi); text-shadow: 0 0 16px rgba(216, 180, 130, 0.3); }
.memory-bar { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.memory-bar i {
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.4s;
}
.memory-bar i.on {
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  box-shadow: 0 0 8px rgba(216, 180, 130, 0.35);
}
.memory-bar i.range {
  background: repeating-linear-gradient(135deg, rgba(216, 180, 130, 0.55) 0 2px, rgba(216, 180, 130, 0.15) 2px 5px);
}
.memory-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; letter-spacing: 0.12em; color: var(--text-3); }

/* 按钮 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.3s, transform 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-icon { width: 16px; height: 16px; flex-shrink: 0; display: inline-grid; place-items: center; }
.btn-icon svg { width: 100%; height: 100%; }

.btn-ghost {
  height: 40px;
  padding: 0 16px;
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.2); }
.copy-btn.is-copied {
  color: #1a140c;
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  border-color: transparent;
  box-shadow: 0 0 26px rgba(216, 180, 130, 0.45);
}

.btn-primary {
  margin-top: auto;
  width: 100%;
  height: 50px;
  color: #1a140c;
  font-weight: 600;
  background: linear-gradient(180deg, #f3dcb6 0%, var(--amber) 100%);
  border: 1px solid rgba(255, 236, 205, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 30px -8px rgba(216, 180, 130, 0.45);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--ease);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 16px 40px -8px rgba(216, 180, 130, 0.6); }
.btn-primary:hover::after { left: 120%; }

/* 步骤 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--hair-soft);
}
.step-no {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--amber-hi);
  margin: 2px 0 0 2px;
}
.step-no::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(216, 180, 130, 0.32);
  background: rgba(216, 180, 130, 0.06);
  border-radius: 4px;
  transform: rotate(45deg);
}
.step-t { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.step-d { font-size: 12.5px; line-height: 1.65; color: var(--text-2); }

/* 守则 */
.rules { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.rules li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 2px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.rules li:last-child { border-bottom: 0; }
.rules .rule-no {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  padding-top: 2px;
  opacity: 0.85;
}

/* 底部注脚 */
.portal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--hair-soft);
}
.footer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--text-3);
}
.lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s;
}
.lock-btn svg { width: 13px; height: 13px; }
.lock-btn:hover { color: var(--amber-hi); border-color: rgba(216, 180, 130, 0.35); background: rgba(216, 180, 130, 0.06); }

/* Toast */
.toast-region {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: calc(100% - 32px);
}
.toast-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(14, 16, 24, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(216, 180, 130, 0.3);
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast-item.is-visible { opacity: 1; transform: none; }
.toast-dot { width: 6px; height: 6px; background: var(--amber); transform: rotate(45deg); box-shadow: 0 0 10px rgba(216, 180, 130, 0.8); }

button:focus-visible, a:focus-visible { outline: 2px solid rgba(216, 180, 130, 0.6); outline-offset: 3px; }

/* ==========================================================================
   关键帧
   ========================================================================== */
@keyframes aurora-drift {
  0%   { translate: 0 0; scale: 1; }
  50%  { translate: 6vw 2vh; scale: 1.12; }
  100% { translate: -4vw -1vh; scale: 0.94; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes voxel-spin {
  from { transform: rotateX(-26deg) rotateY(0deg); }
  to   { transform: rotateX(-26deg) rotateY(360deg); }
}
@keyframes core-spin {
  from { transform: rotateX(35deg) rotateY(360deg) rotateZ(0deg); }
  to   { transform: rotateX(35deg) rotateY(0deg) rotateZ(360deg); }
}
@keyframes voxel-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}
@keyframes shadow-breathe {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50%      { opacity: 0.6; transform: translateX(-50%) scale(0.85); }
}
@keyframes orbit-rot {
  from { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(360deg); }
}
@keyframes angle-spin { to { --angle: 360deg; } }
@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50%      { opacity: 1; transform: scale(1.1); }
}
@keyframes ripple {
  0%   { opacity: 0.7; transform: scale(0.6); }
  70%, 100% { opacity: 0; transform: scale(1.8); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-8px); }
  36% { transform: translateX(7px); }
  54% { transform: translateX(-5px); }
  72% { transform: translateX(3px); }
  88% { transform: translateX(-1px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes sweep {
  from { left: -40%; opacity: 1; }
  to   { left: 120%; opacity: 1; }
}
@keyframes torch-flicker {
  0%, 100% { opacity: 0.9; }
  20% { opacity: 0.6; }
  45% { opacity: 1; }
  70% { opacity: 0.72; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding: 48px 4px 40px; gap: 8px; }
  .hero-visual { display: none; }
  .span-7, .span-5 { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .portal-shell { padding: 14px 14px 36px; }
  .top-bar { padding: 8px 8px 8px 12px; }
  .server-name { font-size: 11.5px; letter-spacing: 0.14em; }
  .meta-pill#version-badge { display: none; }
  .hero { padding: 40px 4px 32px; }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .meta-cell { padding: 10px 14px; }
  .meta-cell:nth-child(3) { grid-column: span 2; border-left: 0; border-top: 1px solid var(--hair-soft); }
  .card { padding: 22px 18px; }
  .endpoint { flex-direction: column; align-items: stretch; padding: 16px; }
  .copy-btn { width: 100%; }
  .spec-row { grid-template-columns: 1fr 1fr; }
  .spec-row .spec:first-child { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; }
  .step { flex-direction: row; align-items: flex-start; }
  .portal-footer { flex-direction: column; text-align: center; }
  .gate-card { padding: 36px 22px 24px; }
  .gate-title { font-size: 16px; letter-spacing: 0.2em; }
  .pixel-moon { width: 34px; height: 34px; top: 7vh; right: 10vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
