/* ============ ComputeBoard — dark market dashboard ============ */
:root {
  --bg: #0b0e14;
  --bg-alt: #0f131c;
  --panel: #141926;
  --panel-2: #1a2032;
  --border: #232b3e;
  --text: #e8ecf4;
  --text-dim: #8b93a7;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --up: #ef4444;      /* 涨-红 (Chinese market convention) */
  --down: #22c55e;    /* 跌-绿 */
  --gold: #f5b544;
  --western: #4f8cff;
  --domestic: #f5b544;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--text); }
.logo-mark { color: var(--accent); font-size: 20px; }
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: 0.3px; }
.logo-sub { font-size: 11px; color: var(--text-dim); letter-spacing: 1.5px; text-transform: uppercase; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 10px; }

.btn {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 8px 16px; border-radius: 9px; font-size: 13.5px; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: #fff; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.12); }

/* ---------- HERO ---------- */
.hero {
  padding: 72px 0 48px;
  background:
    radial-gradient(700px 300px at 20% -10%, rgba(79, 140, 255, 0.14), transparent),
    radial-gradient(600px 280px at 80% 0%, rgba(124, 92, 255, 0.12), transparent);
}
.hero-kicker { font-size: 11.5px; letter-spacing: 3px; color: var(--accent); margin-bottom: 16px; font-weight: 600; }
.hero h1 { font-size: 42px; line-height: 1.2; font-weight: 800; letter-spacing: -0.5px; }
.hero-desc { max-width: 680px; color: var(--text-dim); margin-top: 18px; font-size: 16px; }

.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 40px; }
.stat-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px;
}
.stat-label { font-size: 12px; color: var(--text-dim); letter-spacing: 0.5px; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.stat-value .unit { font-size: 14px; color: var(--text-dim); font-weight: 500; margin-left: 4px; }

/* ---------- SECTIONS ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: 26px; font-weight: 700; }
.section-sub { color: var(--text-dim); font-size: 14.5px; margin-top: 6px; }

/* ---------- TOOLBAR ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 8px; }
.tab {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-dim);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; transition: all 0.2s; font-family: inherit;
}
.tab.active { color: var(--text); border-color: var(--accent); background: rgba(79, 140, 255, 0.1); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-western { background: var(--western); }
.dot-domestic { background: var(--domestic); }
.search {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 9px 14px; font-size: 13.5px; width: 260px; outline: none; font-family: inherit;
}
.search:focus { border-color: var(--accent); }

/* ---------- MARKET TABLE ---------- */
.table-wrap {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto;
}
.market-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.market-table th {
  text-align: left; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-dim); padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600;
}
.market-table td { padding: 15px 18px; border-bottom: 1px solid rgba(35, 43, 62, 0.55); font-size: 14px; }
.market-table tbody tr { transition: background 0.15s; cursor: default; }
.market-table tbody tr:hover { background: rgba(79, 140, 255, 0.05); }
.market-table tbody tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

.chip-name { font-weight: 650; }
.chip-sub { font-size: 12px; color: var(--text-dim); }
.badge {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.badge-western { background: rgba(79, 140, 255, 0.14); color: var(--western); }
.badge-domestic { background: rgba(245, 181, 68, 0.14); color: var(--domestic); }
.badge-server { background: rgba(124, 92, 255, 0.16); color: var(--accent-2); margin-right: 4px; }
.badge-verified { background: rgba(34, 197, 94, 0.14); color: var(--down); }
.chg-up { color: var(--up); font-weight: 600; }
.chg-down { color: var(--down); font-weight: 600; }
.spark-cell svg { display: block; margin-left: auto; }

.table-note { color: var(--text-dim); font-size: 12px; margin-top: 12px; }

/* ---------- ORDER BOOK ---------- */
.ob-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chip-f {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-dim);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 13px; transition: all 0.2s; font-family: inherit;
}
.chip-f.active { color: var(--text); border-color: var(--accent); background: rgba(79, 140, 255, 0.1); }

.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ob-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.2s, transform 0.2s;
}
.ob-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ob-seller { font-weight: 650; font-size: 15px; }
.ob-type { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.5px; }
.ob-type.rent { background: rgba(79, 140, 255, 0.15); color: var(--accent); }
.ob-type.sell { background: rgba(245, 181, 68, 0.15); color: var(--gold); }
.ob-chip { font-size: 14px; color: var(--text); }
.ob-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-pill { font-size: 11.5px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; color: var(--text-dim); }
.ob-bottom { display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px dashed var(--border); padding-top: 12px; }
.ob-price { font-size: 20px; font-weight: 700; }
.ob-price .unit { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.ob-pay { display: flex; gap: 6px; }
.pay-pill { font-size: 10.5px; border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; color: var(--text-dim); }

/* ---------- VERIFY ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.step-num {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.step h3 { font-size: 16px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 13.5px; }
.step code {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-size: 12px; color: var(--accent);
}

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 32px; background: var(--bg-alt); }
.footer-brand { font-weight: 700; font-size: 16px; margin-bottom: 12px; }
.disclaimer { color: var(--text-dim); font-size: 12px; max-width: 900px; }
.copyright { color: var(--text-dim); font-size: 12px; margin-top: 12px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .nav-links, .logo-sub { display: none; }
  .hero h1 { font-size: 30px; }
  .search { width: 100%; }
}

/* ---------- MODAL / FORM ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 14, 0.72); backdrop-filter: blur(6px);
  align-items: flex-start; justify-content: center; padding: 60px 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 560px; padding: 28px; animation: pop 0.22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h3 { font-size: 19px; }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.modal-close:hover { color: var(--text); }

.form-grid { display: flex; flex-direction: column; gap: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--text-dim); }
.field input, .field select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 9px 12px; font-size: 13.5px; outline: none; font-family: inherit; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.pay-checks { display: flex; flex-wrap: wrap; gap: 14px; }
.pay-checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.pay-checks input { accent-color: var(--accent); }
.form-hint { font-size: 12px; color: var(--text-dim); }
.form-status { font-size: 12.5px; min-height: 18px; }
.form-status.ok { color: var(--down); }
.form-status.err { color: var(--up); }
.btn-block { width: 100%; padding: 11px; font-size: 14px; }
