/* ============================================================
   KING / QUEEN — app.css
   设计参照：riverai.inc（左侧文案 + 右侧数据、表格化信息、克制留白）
   ============================================================ */

:root {
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --wrap: 1160px;
  --green: #6fdc9b;
  --red: #ff7b7b;
  --wash: rgba(224, 180, 95, .07);
  --wash-2: rgba(201, 163, 255, .05);
  --grain: .035;
}

/* A · 石墨（暖中性） */
html[data-theme="a"] {
  --bg: #131110;
  --bg-2: #1a1716;
  --bg-3: #241f1d;
  --line: #2a2522;
  --line-2: #3b342f;
  --text: #f0ede8;
  --muted: #9c958b;
  --dim: #6f6860;
  --gold: #e2b968;
  --lilac: #c9a8dd;
  --wash: rgba(226, 185, 104, .15);
  --wash-2: rgba(190, 140, 110, .08);
  --grain: .045;
}

/* B · 午夜藏蓝 */
html[data-theme="b"] {
  --bg: #0a1020;
  --bg-2: #101728;
  --bg-3: #172033;
  --line: #1d2640;
  --line-2: #2b3657;
  --text: #e9edf7;
  --muted: #8e98ae;
  --dim: #626c83;
  --gold: #e8c579;
  --lilac: #b9a6ff;
  --wash: rgba(110, 145, 255, .15);
  --wash-2: rgba(232, 197, 121, .07);
  --grain: .035;
}

/* C · 墨绿 */
html[data-theme="c"] {
  --bg: #08130f;
  --bg-2: #0d1a15;
  --bg-3: #14241d;
  --line: #182a22;
  --line-2: #263b31;
  --text: #e8f0ea;
  --muted: #8b9b92;
  --dim: #5f6f66;
  --gold: #dcc07a;
  --lilac: #a9c8b9;
  --wash: rgba(110, 200, 155, .13);
  --wash-2: rgba(220, 192, 122, .07);
  --grain: .04;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 620px at 82% -12%, var(--wash), transparent 62%),
    radial-gradient(900px 520px at 6% 108%, var(--wash-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* 极光：磨砂玻璃后面要有光斑，模糊才有意义 */
.aurora {
  position: fixed;
  inset: -25% -10%;
  z-index: 0;
  pointer-events: none;
  filter: blur(70px);
  background:
    radial-gradient(34% 26% at 22% 26%, rgba(238, 196, 112, .34), transparent 64%),
    radial-gradient(30% 22% at 72% 46%, rgba(206, 152, 116, .26), transparent 64%),
    radial-gradient(26% 20% at 46% 78%, rgba(160, 140, 200, .18), transparent 66%);
}

/* 颗粒感：让纯色背景有"材质"而不是一片死黑 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.nav, .hero, .section, .footer { position: relative; z-index: 2; }

/* 暗角 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(115% 85% at 50% -10%, transparent 42%, rgba(0, 0, 0, .5) 100%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------------- 顶栏 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 19, 17, .52);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 28px;
  height: 62px; display: flex; align-items: center; gap: 34px;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 14.5px; letter-spacing: .04em; }
.brand svg { display: block; }
.brand b { font-weight: 600; }
.brand i { font-style: normal; color: var(--lilac); font-weight: 600; }

.nav-links { display: flex; gap: 26px; margin-right: auto; }
.nav-links a { font-size: 13.5px; color: var(--muted); transition: color .15s; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.chain-chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: var(--dim); display: flex; align-items: center; gap: 6px;
}
.chain-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: #33373e; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #17130a; font-weight: 600; }
.btn.primary:hover { background: #ffcf63; border-color: #ffcf63; }
.btn.solid { background: #1c1f24; border-color: #2b2f36; }
.btn.solid:hover { background: #24282f; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------------- Hero ---------------- */
.hero { padding-block: 82px 76px; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -40px -100px auto -100px;
  height: 620px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.042) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.042) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(760px 460px at 30% 10%, #000 0%, transparent 78%);
  mask-image: radial-gradient(760px 460px at 30% 10%, #000 0%, transparent 78%);
  pointer-events: none;
  z-index: -1;
}
.hero-grid { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 60px; align-items: start; }

.label {
  font-size: 11px; letter-spacing: .18em; color: var(--dim);
  text-transform: uppercase; margin-bottom: 18px; display: flex; align-items: center; gap: 10px;
}
.label.solid::before { content: ""; width: 18px; height: 1px; background: var(--line-2); }

h1 {
  font-size: 40px; line-height: 1.24; font-weight: 600; letter-spacing: -.01em;
}
h1 .accent { color: var(--gold); }

.lead {
  margin-top: 20px; font-size: 15px; line-height: 1.8; color: var(--muted); max-width: 44ch;
}
.lead b { color: var(--text); font-weight: 500; }

.actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }

.hero-note {
  margin-top: 26px; font-size: 12.5px; color: var(--dim);
  display: flex; gap: 8px; align-items: center;
}

/* ---------------- 数据面板 ---------------- */
.panel-box {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(58, 52, 46, .52), rgba(24, 21, 20, .34));
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .02), 0 22px 50px -26px rgba(0, 0, 0, .9);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  font-size: 12px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase;
}
.panel-head button {
  background: none; border: none; color: var(--dim); font-size: 11.5px;
  letter-spacing: .06em; font-family: var(--mono);
}
.panel-head button:hover { color: var(--text); }

.data-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 18px; border-top: 1px solid var(--line); font-size: 13.5px;
}
.data-row:first-of-type { border-top: none; }
.data-row .k { color: var(--muted); }
.data-row .v { font-family: var(--mono); font-size: 13.5px; color: var(--text); }
.data-row .v small { color: var(--dim); font-size: 11.5px; margin-left: 4px; }
.panel-foot { padding: 11px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }

/* ---------------- 区块 ---------------- */
.section { padding-block: 64px; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 32px; }
h2 { font-size: 26px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 14.5px; max-width: 62ch; }

/* ---------------- 应用 ---------------- */
.tabs {
  display: flex; gap: 30px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
.app-tab {
  background: none; border: none; padding: 11px 0; font-size: 14px;
  color: var(--muted); position: relative; transition: color .15s;
}
.app-tab:hover { color: var(--text); }
.app-tab.active { color: var(--text); }
.app-tab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold);
}

.panel { display: none; }
.panel.active { display: block; }

.app-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 20px; align-items: start; }

.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(58, 52, 46, .5), rgba(24, 21, 20, .32));
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .02), 0 22px 50px -26px rgba(0, 0, 0, .85);
}
.card + .card { margin-top: 16px; }
.card h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.card .hint { font-size: 12.5px; color: var(--dim); margin-bottom: 14px; }

.field-label { font-size: 12px; color: var(--dim); margin-bottom: 7px; display: block; }

input.amt {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--line-2);
  background: #07080a; color: var(--text); font-family: var(--mono); font-size: 15px;
}
input.amt:focus { outline: none; border-color: var(--gold); }
input.amt::placeholder { color: #4a4f57; }

.row-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.row-btns .btn { flex: 1; min-width: 110px; }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 13px; border-top: 1px solid var(--line); }
.kv:first-child { border-top: none; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--mono); }
.kv .v.acc { color: var(--gold); }

/* 档位 */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 16px; }
.tier {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 6px; text-align: center;
  background: transparent; color: var(--text); transition: border-color .15s, background .15s;
}
.tier:hover { border-color: #3a3f47; }
.tier.active { border-color: var(--gold); background: rgba(242,193,78,.07); }
.tier .m { display: block; font-size: 13.5px; font-weight: 600; }
.tier .w { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }

/* 地址行 */
.addr { padding: 11px 0; border-top: 1px solid var(--line); }
.addr:first-of-type { border-top: none; padding-top: 2px; }
.addr-k { display: block; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.addr-v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr code { font-size: 11.5px; letter-spacing: .01em; word-break: break-all; color: var(--muted); }
.mini {
  font-family: var(--sans); font-size: 11.5px; padding: 4px 9px; border-radius: 6px;
  border: 1px solid var(--line-2); background: transparent; color: var(--dim); white-space: nowrap;
}
.mini:hover { color: var(--text); border-color: #3a3f47; }

/* 仓位 / 排名行 */
.pos {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  padding: 13px 14px;
  margin-top: 9px;
  background: rgba(255, 255, 255, .025);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pos .top { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.pos .top b { font-family: var(--mono); font-weight: 500; }
.pos .meta { color: var(--dim); font-size: 12px; margin-top: 5px; }
.pos .meta b { color: var(--gold); font-family: var(--mono); font-weight: 500; }

.status { margin-top: 12px; font-size: 12.5px; color: var(--dim); min-height: 18px; word-break: break-all; }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 400; font-size: 11.5px; letter-spacing: .1em;
  color: var(--dim); text-transform: uppercase; padding: 0 14px 10px 0; border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.table td.addr-cell { font-family: var(--mono); font-size: 11.5px; color: var(--muted); word-break: break-all; }
.table .name { font-weight: 500; }
.table .sub { color: var(--dim); font-size: 12px; }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--dim); font-family: var(--mono);
}
.tag.live { color: var(--green); border-color: rgba(111,220,155,.3); }
.tag.soon { color: var(--gold); border-color: rgba(242,193,78,.28); }

/* ---------------- FAQ ---------------- */
.faq { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 17px 0; font-size: 14.5px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--dim); font-family: var(--mono); font-size: 16px; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); font-size: 14px; line-height: 1.85; padding: 0 0 18px; max-width: 74ch; }
details p + p { margin-top: -6px; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 11.5px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; margin-bottom: 14px; font-weight: 400; }
.footer a { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 9px; }
.footer a:hover { color: var(--text); }
.footer .desc { font-size: 13px; color: var(--dim); line-height: 1.8; max-width: 30ch; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--dim);
}

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: #1a1d22; border: 1px solid var(--line-2); color: var(--text);
  padding: 10px 18px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .app-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
}
@media (max-width: 720px) {
  .wrap, .nav-inner { padding: 0 18px; }
  .nav-links { display: none; }
  .hero { padding-block: 48px 44px; }
  .section { padding-block: 52px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .table td.hide-sm, .table th.hide-sm { display: none; }
  .footer-bottom { flex-direction: column; }
}

/* 表格列宽 */
.table td:first-child, .table th:first-child { white-space: nowrap; }
.table .w-name { width: 24%; }
.table .w-num { width: 18%; }
.table .w-small { width: 9%; }
.table .w-tag { width: 13%; }

/* 主题切换 */
.theme-switch { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.theme-switch span { font-size: 11.5px; letter-spacing: .1em; color: var(--dim); }
.swatch {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--bg-3); padding: 0; position: relative;
}
.swatch::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; }
.swatch[data-t="a"]::after { background: #dfb463; }
.swatch[data-t="b"]::after { background: #8fa2ff; }
.swatch[data-t="c"]::after { background: #9fd0b8; }
.swatch.on { border-color: var(--text); }

/* 磨砂表面的细霜 */
.card::after, .panel-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 110px 110px;
}
.card::before, .panel-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), transparent);
}

/* 输入框：磨砂下沉 */
input.amt {
  background: rgba(9, 8, 7, .55);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 次级按钮也磨一点 */
.btn { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn.solid { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.btn.solid:hover { background: rgba(255, 255, 255, .085); }

/* 语言切换 */
.lang-pick { display: flex; align-items: center; }
.lang-select {
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  border-radius: 8px; padding: 6px 8px; font-size: 12.5px; font-family: var(--sans);
  cursor: pointer; outline: none; max-width: 120px;
}
.lang-select:hover { color: var(--text); border-color: #3a3f47; }
.lang-select option { background: var(--bg-2); color: var(--text); }
@media (max-width: 720px) {
  .lang-select { font-size: 11.5px; padding: 4px 6px; max-width: 92px; }
}
