/* =========================================================
   星际之旅 · 登录页主题
   ---------------------------------------------------------
   1) 背景：复用登录后主页面同一套 starfield（assets/js/star-sky.js）
   2) 配色：紫粉 → 香槟金 / 粉白，与星旅页统一
   只在 <html class="use-star-sky"> 时生效。
   旧版背景的样式仍在 styles.css 里；但要连深空粒子/微尘脚本一起恢复，
   请用 _gj_verify/backup-20261112-skybg/index.html（改动前的整页备份）。
   ========================================================= */

/* ---------- 1. 星空背景层 ---------- */

.star-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #020304;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.star-sky.is-ready { opacity: 1; }
.star-sky canvas { display: block; width: 100%; height: 100%; }

/* WebGL 不可用时的静态兜底：极暗的深空渐变，不出现纯白/亮块 */
.star-sky-fallback .star-sky {
  opacity: 1;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(40, 34, 26, 0.55), transparent 58%),
    radial-gradient(ellipse at 78% 92%, rgba(28, 20, 18, 0.5), transparent 62%),
    #020304;
}

/* 旧的深空星云背景整层停用（DOM 与脚本保留，回退时删掉 html 的 use-star-sky 即可） */
html.use-star-sky .backdrop { display: none; }

/* ---------- 2. 金粉配色令牌 ---------- */

html.use-star-sky {
  background: #020304;

  --space: #020304;
  --space-deep: #020304;
  --panel: rgba(24, 20, 16, 0.82);
  --panel-solid: #171310;
  --panel-soft: rgba(30, 24, 19, 0.68);

  --ink: #f7f1e4;
  --ink-soft: #d9cfbc;
  --ink-faint: #9d9384;

  --rose: #f3d2a0;
  --rose-deep: #ffe4bd;
  --rose-soft: rgba(226, 188, 132, 0.14);
  --violet: #e9c9a0;
  --cyan: #f6d7c4;
  --gold: #f0cd96;

  --line: rgba(214, 199, 172, 0.14);
  --line-strong: rgba(236, 214, 176, 0.30);

  --shadow-md: 0 24px 60px -28px rgba(0, 0, 0, 0.9), 0 0 34px -24px rgba(226, 178, 116, 0.42);
  --shadow-lg: 0 40px 100px -35px rgba(0, 0, 0, 0.92), 0 0 60px -35px rgba(226, 178, 116, 0.38);

  --glass-bg: linear-gradient(155deg, rgba(46, 38, 30, 0.55), rgba(12, 10, 9, 0.86));
  --glass-border: rgba(240, 224, 194, 0.12);
  --glass-edge: inset 0 1px 0 rgba(255, 244, 226, 0.14), inset 0 -1px 0 rgba(176, 140, 96, 0.16);

  --btn-primary-bg: linear-gradient(135deg, #fff1d6 0%, #ecc794 48%, #d9a9a4 100%);
  --btn-primary-ink: #231709;
  --btn-primary-disabled-bg: #2a2620;
  --btn-primary-disabled-ink: #9a917f;
  --focus-ring: 0 0 0 2px #020304, 0 0 0 4px #e2bd8a;
}

html.use-star-sky body { background: #020304; }

/* ---------- 3. 登录页局部重上色（原样式里写死的紫粉色） ---------- */

/* 文案 */
html.use-star-sky .auth-kicker { color: #c9ad7e; }
html.use-star-sky .auth-title { text-shadow: 0 0 34px rgba(240, 204, 148, 0.20); }
html.use-star-sky .auth-sub { color: var(--ink-soft); }
html.use-star-sky .auth-points li { color: var(--ink-faint); }
html.use-star-sky .auth-points span { color: var(--rose); text-shadow: 0 0 10px rgba(240, 205, 150, 0.85); }

/* 印章 + 小行星标 */
html.use-star-sky .seal {
  background: linear-gradient(145deg, rgba(46, 36, 27, 0.9), rgba(18, 14, 12, 0.9));
  border-color: rgba(236, 208, 162, 0.22);
  box-shadow: 0 18px 40px -22px rgba(226, 178, 116, 0.55), inset 0 1px 0 rgba(255, 244, 226, 0.08);
}
html.use-star-sky .mini-planet {
  background: radial-gradient(circle at 30% 25%, #fffaf4, #f7dadf 46%, #c99d89 84%);
  box-shadow: 0 0 20px rgba(255, 216, 190, 0.45);
}
html.use-star-sky .mini-planet::after { border-color: rgba(246, 214, 168, 0.78); }

/* 登录卡片 */
html.use-star-sky .auth-card,
html.use-star-sky .onboard-card {
  background: linear-gradient(145deg, rgba(28, 23, 18, 0.88), rgba(10, 9, 8, 0.9));
  border-color: rgba(236, 214, 176, 0.16);
  box-shadow:
    0 40px 100px -35px rgba(0, 0, 0, 0.92),
    0 0 60px -35px rgba(226, 178, 116, 0.38),
    inset 0 1px 0 rgba(255, 244, 226, 0.05);
}

/* 分段控件 */
html.use-star-sky .seg {
  background: rgba(16, 13, 10, 0.72);
  border-color: var(--line);
}
html.use-star-sky .seg-btn.is-active {
  background: linear-gradient(135deg, rgba(226, 189, 138, 0.34), rgba(190, 140, 110, 0.26));
  box-shadow: inset 0 1px 0 rgba(255, 245, 226, 0.14), 0 4px 16px -8px rgba(226, 178, 116, 0.6);
}

/* 输入框 */
html.use-star-sky .input {
  background: rgba(14, 11, 9, 0.66);
  border-color: var(--line);
}
html.use-star-sky .input::placeholder { color: #77705f; }
html.use-star-sky .input:focus {
  border-color: rgba(232, 199, 148, 0.55);
  background: rgba(20, 15, 11, 0.9);
  box-shadow: 0 0 0 4px rgba(226, 186, 128, 0.10), 0 0 24px -12px rgba(226, 186, 128, 0.45);
}

/* 次要按钮 / 图标按钮 / 文字链接 */
html.use-star-sky .btn-ghost {
  background: rgba(22, 18, 14, 0.72);
  border-color: var(--line);
}
html.use-star-sky .btn-ghost:hover:not(:disabled) {
  background: rgba(40, 32, 24, 0.82);
  border-color: var(--line-strong);
}
html.use-star-sky .icon-btn:hover { background: rgba(226, 196, 152, 0.1); }
html.use-star-sky .link-btn { text-decoration-color: rgba(214, 196, 168, 0.3); }

/* 启动页 */
html.use-star-sky .boot { background: #020304; }
html.use-star-sky .boot-orbit { border-color: rgba(226, 190, 140, 0.32); }
html.use-star-sky .boot-orbit i {
  background: radial-gradient(circle at 32% 28%, #fff2e0, #e8c18e 48%, #8a6a4a 80%);
  box-shadow: 0 0 28px rgba(232, 190, 130, 0.5);
}
html.use-star-sky .boot-orbit span { background: #fff4e2; box-shadow: 0 0 14px #f3d9a8; }

/* 全局焦点 / 选中 / 滚动条 */
html.use-star-sky :focus-visible { outline-color: rgba(232, 196, 140, 0.75); }
html.use-star-sky ::selection { color: #fff; background: rgba(226, 178, 116, 0.38); }
html.use-star-sky ::-webkit-scrollbar-thumb {
  background-color: rgba(200, 180, 150, 0.3);
}
html.use-star-sky ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(214, 192, 160, 0.46);
}

/* 暗号输入：标签行右侧的小「显示」开关 */
.gate-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gate-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s ease;
}
.gate-toggle:hover { color: var(--ink-soft); }

/* 手机上少一点装饰，保证表单前置内容不拥挤 */
@media (max-width: 420px) {
  html.use-star-sky .auth-title { letter-spacing: 0.1em; }
}
