/* ============================================
   埃法 AETHER — 设计 token 与基础样式
   视觉语言模仿参考站 sansphase.com（暖暗色 + 香槟金，不是科技蓝）
   全站换皮只改 :root 这一段。
   ============================================ */
:root {
  color-scheme: dark;
  --bg: #05070b;
  --surface: #0c1119;
  --surface-2: #151b26;
  --text: #eee9e0;
  --muted: #aeb3bd;
  --dim: #80868f;
  --signal: #d9c49c;
  --line: rgb(238 233 224 / 12%);
  --line-strong: rgb(238 233 224 / 22%);
  --radius: 14px;
  --radius-card: 24px;
  --pill: 999px;
  --smoked-fill: linear-gradient(160deg, rgb(28 34 48 / 58%), rgb(10 13 20 / 52%));
  --smoked-edge: rgb(238 233 224 / 12%);
  --smoked-shadow: inset 0 1px 0 rgb(255 255 255 / 7%), 0 24px 60px rgb(0 0 0 / 35%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "STSong", serif;
  --font-wordmark: "SimSun", "Songti SC", "STSong", serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  /* 鼠标光标：标准箭头形状，只换配色（金色填充 + 深色描边，
     这样压在金色按钮上也不会糊成一片）。
     不要动形状 —— 箭头是十年肌肉记忆，改形状就难用了。
     想彻底换回系统箭头：把这一行整行删掉即可。 */
  --cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M6 2.6 6 20.4 10.7 15.7 13.5 21.8 16.4 20.5 13.6 14.5 20.2 14.5Z' fill='%23d9c49c' stroke='%2305070b' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  cursor: var(--cursor);
}
button, input { font: inherit; color: inherit; }
/* 要打字的地方必须换回文字光标，不然连光标在哪都看不见 */
input, textarea, select { cursor: text; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 0; background: none; }
:focus { outline: none; }
[hidden] { display: none !important; }
::selection { background: #eee9e0; color: var(--bg); }

/* 星空背景层（共享层）：星云 = CSS 多层渐变，星星 = 见 js/shared/sky.js 门面。
   默认（WebGL）星星是 #stars 那块 Canvas 上的 28800 个 GPU 点；
   只有 ?sky=image 才走下面这两张预渲染 PNG。 */
.sky {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, #0a1220 0%, #05080f 50%, #010204 100%);
  /* 预加载闸门跑完才淡入 —— 「正在把星空点亮…」不是比喻 */
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.sky.is-ready { opacity: 1; }

/* 鼠标柔光（.sky-glow）已拆掉 —— 420px 的淡白光斑跟着鼠标走，晃眼。
   想要回来：git show 8dfc808:04-源码/css/base.css */
.sky-nebula {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 63% 50%, rgb(40 62 116 / 11%) 0%, transparent 42%),
    radial-gradient(circle at 44% 26%, rgb(30 36 80 / 7%) 0%, transparent 36%),
    radial-gradient(circle at 55% 80%, rgb(74 50 32 / 6%) 0%, transparent 30%),
    radial-gradient(circle at 20% 72%, rgb(16 58 76 / 6%) 0%, transparent 30%),
    radial-gradient(circle at 14% 30%, rgb(46 52 20 / 3.5%) 0%, transparent 28%),
    radial-gradient(circle at 86% 20%, rgb(26 54 70 / 5%) 0%, transparent 28%);
}
.sky-stars {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: opacity;
}
/* 这两张 PNG 只在 ?sky=image 模式下才挂。
   教训：以前把它们挂在 .is-ready 上，WebGL 模式下也一样会挂上去，
   于是同一批星星画了两层 —— 一层会动、一层钉死在原位。
   鼠标推开星星时下面还留着一模一样的星，看着极晕。
   现在默认 background-image: none，只有 body.sky-image 才挂。 */
.sky-stars { background-image: none; }
body.sky-image .sky-stars--fine {
  background-image: url(../assets/stars-fine.png);
  animation: sky-breathe-fine 9s ease-in-out infinite;
}
body.sky-image .sky-stars--bright {
  background-image: url(../assets/stars-bright.png);
  animation: sky-breathe-bright 11s ease-in-out infinite;
}
@keyframes sky-breathe-fine {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 0.95; }
}
@keyframes sky-breathe-bright {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sky-stars { animation: none; }
}
#stars {
  position: fixed; inset: 0; z-index: 0;
  display: block; width: 100vw; height: 100vh;
  pointer-events: none;
}
#app { position: relative; z-index: 1; min-height: 100%; }

/* eyebrow 眉标：等宽字 + 金色 + 前置小圆点 */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}

/* —— 门 —— */
.door {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; text-align: center;
  padding: 24px;
  /* 透明，露出下面 Canvas 深空粒子；叠一层极淡暗纱，保证金字/暗号框清晰 */
  background: rgb(3 6 12 / 28%);
}
.door-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px;
  animation: door-in 1.2s var(--ease) both;
}
@keyframes door-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.door h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(72px, 14vw, 148px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  text-shadow: 0 12px 48px rgb(0 0 0 / 45%);
}
.door-sub { color: var(--muted); font-size: 15px; letter-spacing: 0.05em; }
.door-form { display: flex; gap: 10px; margin-top: 16px; align-items: center; }
.door-form input {
  min-height: 48px; padding: 0 22px;
  width: 240px;
  background: rgb(238 233 224 / 4%);
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.1em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s;
}
.door-form input::placeholder { color: var(--dim); letter-spacing: 0.3em; }
.door-form input:focus { border-color: var(--signal); }
.door-form button {
  min-height: 48px; padding: 0 28px;
  background: var(--signal);
  color: var(--bg);
  border-radius: var(--pill);
  font-size: 15px;
  letter-spacing: 0.2em; text-indent: 0.2em;
  transition: background .2s, transform .15s;
}
.door-form button:hover { background: #e6d4ae; }
.door-form button:active { transform: translateY(1px); }
.err { color: #ffb3a4; font-size: 13px; letter-spacing: 0.05em; }
.door-foot {
  position: absolute; bottom: 34px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.3em;
  color: var(--dim);
  text-transform: uppercase;
}

/* —— 门：加载态 → 暗号态 —— */
.door-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.door-stage[hidden] { display: none; }
.door-stage[data-stage="password"].is-on { animation: door-in .7s var(--ease) both; }

.door-progress {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.door-progress-track {
  display: block; width: 220px; height: 3px;
  background: var(--line);
  border-radius: 3px; overflow: hidden;
}
.door-progress-track i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--signal), #efe3c4);
  border-radius: 3px;
  transition: width .35s var(--ease);
}
.door-pct {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em;
  color: var(--muted);
  min-width: 42px; text-align: left;
}
/* 进度条下面那行：现在在干嘛（取星空数据 / 上传显卡 / 自检…） */
.door-step {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--dim);
  min-height: 1.4em;
  margin-top: 2px;
}

/* —— 开场动画（intro）—— */
.intro-veil {
  position: fixed; inset: 0; z-index: 5;
  background: #000;
  clip-path: circle(150% at 50% 50%);
  cursor: crosshair;
}
.intro-veil.fading { opacity: 0; clip-path: none; transition: opacity .85s var(--ease); }
.intro-veil.fading.on { opacity: 1; }
.intro-veil.disperse {
  transition: clip-path 1.15s var(--ease);
  clip-path: circle(0% at 50% 50%);
}

.intro-symbol {
  position: fixed; z-index: 6;
  left: 50%; top: 50%; width: 120px; height: 120px;
  margin: -60px 0 0 -60px;
  color: var(--signal);
  fill: currentColor;
  filter: drop-shadow(0 0 12px rgb(217 196 156 / 55%));
  pointer-events: none;
  opacity: calc(0.5 + var(--glow, 0) * 0.5);
  animation: symbol-pulse 2.6s ease-in-out infinite;
}
@keyframes symbol-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}
.intro-symbol.flash { animation: symbol-flash .6s var(--ease) forwards; }
@keyframes symbol-flash { to { transform: scale(1.7); opacity: 0; } }
.intro-symbol.gone { opacity: 0; }

.intro-hint {
  position: fixed; z-index: 6;
  left: 50%; top: calc(50% + 92px);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .32em; text-indent: .32em;
  color: var(--dim);
  pointer-events: none;
  transition: opacity .4s;
}

.intro-streams i {
  position: fixed; z-index: 6;
  left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px rgb(217 196 156 / 85%);
  opacity: 0;
  pointer-events: none;
}
.intro-streams.play i { animation: stream-in .6s var(--ease) forwards; }
.intro-streams.play i.s1 { --fx: 0px; --fy: -200px; }
.intro-streams.play i.s2 { --fx: 173px; --fy: 100px; }
.intro-streams.play i.s3 { --fx: -173px; --fy: 100px; }
@keyframes stream-in {
  0%   { opacity: 0; transform: translate(var(--fx), var(--fy)); }
  55%  { opacity: 1; }
  100% { opacity: 0; transform: translate(0, 0); }
}

/* —— shell（导航骨架 + 挂载区）—— */
.shell {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  padding: 0 clamp(20px, 3.5vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgb(5 7 11 / 60%);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.brand {
  font-family: var(--font-wordmark);
  font-size: 22px; letter-spacing: 0.14em; font-weight: 600;
  display: flex; align-items: baseline; gap: 10px;
}
.brand em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.3em;
  color: var(--signal);
}
.shell nav {
  display: flex; gap: 2px;
  padding: 6px;
  border: 1px solid var(--smoked-edge);
  border-radius: var(--pill);
  background: var(--smoked-fill);
  box-shadow: var(--smoked-shadow);
}
.shell nav a {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 20px;
  border-radius: var(--pill);
  font-size: 14px; color: var(--muted);
  transition: color .2s, background .2s;
}
.shell nav a:hover { color: var(--text); }

#mount { padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 48px); max-width: 1120px; margin: 0 auto; }

.empty { color: var(--muted); }
