/* ============================================================
   财富星球 · Wealth Planet — 共享设计系统
   深空天文台美学：墨蓝深空 / 香槟金 / 宝石蓝 / 柔橙
   ============================================================ */

:root {
  --bg: #06080F;
  --bg-2: #0A0F1D;
  --bg-3: #101830;
  --panel: rgba(16, 24, 48, 0.42);
  --panel-solid: #0D1428;
  --ink: #EDE7D9;
  --ink-dim: rgba(237, 231, 217, 0.58);
  --ink-faint: rgba(237, 231, 217, 0.34);
  --gold: #E8C07D;
  --gold-strong: #F4A460;
  --gold-glow: rgba(232, 192, 125, 0.35);
  --blue: #5A9BD9;
  --blue-deep: #4A6FA5;
  --orange: #E8945A;
  --green: #7BC8A4;
  --red: #E0614F;
  --violet: #9A8CD9;
  --hairline: rgba(232, 192, 125, 0.16);
  --hairline-bright: rgba(232, 192, 125, 0.42);
  --font-display: "Cormorant Garamond", "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(232,192,125,.28); color: #FFF6E4; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #26304D; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #354369; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ---------- 星空背景 ---------- */
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-nebula {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 18% 12%, rgba(74,111,165,.14), transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 78%, rgba(232,164,90,.07), transparent 60%),
    radial-gradient(ellipse 45% 35% at 70% 15%, rgba(154,140,217,.08), transparent 60%);
  animation: nebulaDrift 60s ease-in-out infinite alternate;
}
@keyframes nebulaDrift {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(-2.5%,2%,0) scale(1.06); }
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- 自定义光标 ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  border-radius: 50%; transform: translate(-50%,-50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--gold); transition: opacity .3s; }
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid rgba(232,192,125,.45);
  transition: width .3s var(--ease-out), height .3s var(--ease-out), border-color .3s, opacity .3s;
}
.cursor-ring.is-hover { width: 56px; height: 56px; border-color: rgba(232,192,125,.9); }
@media (hover: none), (max-width: 768px) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 44px;
  transition: background .5s, backdrop-filter .5s, padding .4s var(--ease-out), border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding: 13px 44px;
  background: rgba(6,8,15,.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--hairline);
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 19px; letter-spacing: .14em;
}
.nav-brand .brand-mark {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 30%, #F6DCA8, #C88A3E 55%, #5B3A14);
  box-shadow: 0 0 16px rgba(232,192,125,.5), inset 0 0 6px rgba(255,244,214,.6);
  animation: brandSpin 14s linear infinite;
}
@keyframes brandSpin { to { transform: rotate(360deg); } }
.nav-brand small {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em;
  color: var(--ink-faint); display: block; line-height: 1; margin-top: 3px;
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  position: relative; padding: 7px 13px; font-size: 13px;
  color: var(--ink-dim); letter-spacing: .08em; border-radius: 20px;
  transition: color .3s, background .3s;
}
.nav-links a:hover { color: var(--ink); background: rgba(232,192,125,.08); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); transform: translateX(-50%);
  box-shadow: 0 0 8px var(--gold);
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--hairline);
  border-radius: 8px; width: 40px; height: 40px; color: var(--gold); font-size: 17px;
}
@media (max-width: 980px) {
  .nav { padding: 14px 20px; }
  .nav.is-scrolled { padding: 10px 20px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 62px; right: 14px;
    flex-direction: column; align-items: stretch;
    background: rgba(10,15,29,.96); backdrop-filter: blur(20px);
    border: 1px solid var(--hairline); border-radius: 16px;
    padding: 12px; min-width: 180px;
    opacity: 0; transform: translateY(-12px); pointer-events: none;
    transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
  }
  .nav-links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 11px 16px; }
}

/* ---------- 布局 ---------- */
.page {
  position: relative; z-index: 2; min-height: 100vh;
  animation: pageIn .9s var(--ease-out) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 44px; }
@media (max-width: 768px) { .wrap { padding: 0 22px; } }
.section { padding: 96px 0 40px; position: relative; }

/* ---------- 排版 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .42em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 22px;
}
.eyebrow::before {
  content: ""; width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.display {
  font-family: var(--font-display); font-weight: 500;
  line-height: 1.12; letter-spacing: .01em;
}
.display-xl { font-size: clamp(44px, 7.5vw, 96px); }
.display-lg { font-size: clamp(34px, 5vw, 60px); }
.display-md { font-size: clamp(26px, 3.4vw, 40px); }
.serif-num { font-family: var(--font-display); font-variant-numeric: lining-nums tabular-nums; }
.lead { color: var(--ink-dim); max-width: 560px; font-size: 15.5px; }

/* ---------- 卡片面板 ---------- */
.panel {
  position: relative; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 20px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 30px;
  transition: border-color .45s, transform .45s var(--ease-out), box-shadow .45s;
  overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,0%), rgba(232,192,125,.07), transparent 45%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.panel:hover::before { opacity: 1; }
.panel:hover { border-color: var(--hairline-bright); box-shadow: 0 18px 50px -18px rgba(0,0,0,.6); }
.panel-label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .32em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px;
}
.corner { position: absolute; width: 14px; height: 14px; opacity: .55; pointer-events: none; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--gold); }
.corner::before { width: 100%; height: 1px; }
.corner::after { width: 1px; height: 100%; }
.corner.tl { top: 10px; left: 10px; }
.corner.tr { top: 10px; right: 10px; transform: scaleX(-1); }
.corner.bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.corner.br { bottom: 10px; right: 10px; transform: scale(-1); }

/* ---------- 按钮 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 30px; border-radius: 999px;
  border: 1px solid var(--hairline-bright);
  background: transparent; color: var(--gold);
  font-size: 13.5px; letter-spacing: .14em;
  overflow: hidden; transition: color .35s, border-color .35s, transform .2s var(--ease-out), box-shadow .35s;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, #F4D9A6, #D9A45B);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease-out); z-index: -0;
  border-radius: inherit;
}
.btn span { position: relative; z-index: 1; }
.btn:hover { color: #2A1C08; box-shadow: 0 8px 30px -8px rgba(232,192,125,.55); }
.btn:hover::before { transform: scaleX(1); }
.btn:active { transform: scale(.97); }
.btn.ghost { border-color: var(--hairline); color: var(--ink-dim); }
.btn.ghost:hover { color: #2A1C08; }
.btn.small { padding: 8px 18px; font-size: 12px; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* ---------- 滚动揭示 ---------- */
.reveal {
  opacity: 0; transform: translateY(34px); filter: blur(5px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; filter: none; }
}

/* ---------- 页眉（子页面） ---------- */
.page-hero { padding: 158px 0 40px; position: relative; }
.page-hero .display-xl { margin-bottom: 18px; }
.page-hero-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 30px; flex-wrap: wrap;
}
.hairline-rule {
  height: 1px; margin-top: 46px;
  background: linear-gradient(90deg, var(--hairline-bright), var(--hairline) 40%, transparent);
}

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 9px;
}
.field input, .field select {
  width: 100%; padding: 13px 16px;
  background: rgba(6,8,15,.55); border: 1px solid var(--hairline);
  border-radius: 12px; color: var(--ink); font-size: 15px;
  outline: none; transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,192,125,.12);
}
.field select option { background: var(--panel-solid); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,6,12,.72); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.modal-mask.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 480px;
  background: var(--panel-solid);
  border: 1px solid var(--hairline-bright); border-radius: 22px;
  padding: 34px;
  transform: translateY(26px) scale(.97);
  transition: transform .4s var(--ease-spring);
  box-shadow: 0 40px 90px -20px rgba(0,0,0,.8), 0 0 60px -20px rgba(232,192,125,.15);
}
.modal-mask.is-open .modal { transform: translateY(0) scale(1); }
.modal h3 { font-family: var(--font-display); font-size: 24px; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 26px; }

/* ---------- 涟漪 ---------- */
.ripple-flash {
  position: fixed; z-index: 300; pointer-events: none;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--green);
  transform: translate(-50%,-50%);
  animation: rippleOut .8s var(--ease-out) forwards;
}
@keyframes rippleOut {
  from { opacity: .9; width: 20px; height: 20px; }
  to { opacity: 0; width: 340px; height: 340px; border-width: 1px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 34px; left: 50%; z-index: 400;
  transform: translate(-50%, 80px);
  background: var(--panel-solid); border: 1px solid var(--hairline-bright);
  color: var(--ink); border-radius: 999px; padding: 12px 26px;
  font-size: 13.5px; letter-spacing: .06em;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,.7);
  transition: transform .5s var(--ease-spring);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- 进度条 ---------- */
.meter {
  position: relative; height: 8px; border-radius: 6px;
  background: rgba(237,231,217,.08); overflow: hidden;
}
.meter > i {
  position: absolute; inset: 0; width: 0;
  border-radius: inherit;
  transition: width 1.4s var(--ease-out);
}

/* ---------- 表格行 ---------- */
.rows { display: flex; flex-direction: column; gap: 12px; }
.row-item {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 16px;
  transition: border-color .35s, transform .35s var(--ease-out), background .35s;
}
.row-item:hover { border-color: var(--hairline-bright); transform: translateX(6px); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: .06em;
  border: 1px solid var(--hairline); color: var(--ink-dim);
  white-space: nowrap;
}
.tag.gold { color: var(--gold); border-color: rgba(232,192,125,.4); background: rgba(232,192,125,.08); }
.tag.green { color: var(--green); border-color: rgba(123,200,164,.4); background: rgba(123,200,164,.08); }
.tag.blue { color: var(--blue); border-color: rgba(90,155,217,.4); background: rgba(90,155,217,.08); }
.tag.orange { color: var(--orange); border-color: rgba(232,148,90,.4); background: rgba(232,148,90,.08); }
.tag.red { color: var(--red); border-color: rgba(224,97,79,.4); background: rgba(224,97,79,.08); }

.up { color: var(--red); }   /* 中国市场：红涨 */
.down { color: var(--green); } /* 绿跌 */
.gold-text { color: var(--gold); }
.dim { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.mono { font-family: var(--font-mono); }

/* ---------- 访客只读 ---------- */
.visitor [data-admin] { display: none !important; }

/* ---------- 子域名访客横幅 ---------- */
.guest-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 101;
  text-align: center; padding: 8px 16px;
  font-size: 12px; letter-spacing: .1em;
  color: var(--gold);
  background: linear-gradient(90deg, rgba(232,192,125,.04), rgba(232,192,125,.14), rgba(232,192,125,.04));
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(10px);
}
.guest-banner b { font-weight: 600; }
body.has-guest-banner .nav { top: 34px; }

/* ---------- 页脚 ---------- */
.footer {
  position: relative; z-index: 2;
  margin-top: 110px; padding: 46px 44px 34px;
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-faint); letter-spacing: .1em;
}
.footer .mono { font-size: 11px; }
@media (max-width: 768px) { .footer { padding: 40px 22px 30px; } }
