:root {
  --blue: #1f8fff;
  --blue-deep: #0b6fe8;
  --ink: #1c2430;
  --muted: #8b95a3;
  --line: #e7edf5;
  --orange: #f04828;
  --card: #fff;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #0c1424;
  overflow: hidden;
}
button, input, textarea { font-family: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }

.site {
  height: 100%;
  display: grid;
  grid-template-columns: 196px 1fr 240px;
  grid-template-rows: 58px 1fr;
  background:
    radial-gradient(900px 420px at 70% 0%, rgba(40, 90, 180, 0.35), transparent 60%),
    linear-gradient(180deg, #121c33, #0c1424 40%);
  color: #d5deea;
}
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: rgba(8, 14, 28, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: 0.3px; color: #fff; }
.brand::first-letter { color: #3da0ff; }
.ticker { flex: 1; margin: 0; font-size: 12px; color: #9aabc2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; }
.pill { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.25); color: #fff; font-size: 13px; display: inline-flex; align-items: center; }
.pill.solid { background: linear-gradient(180deg, #4cb2ff, #1a7df0); border-color: transparent; }
.pill.ghost { color: #c9d6e8; }
.side, .rail { padding: 14px 12px; }
.side-user, .side-item, .odd { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 8px; color: #c5d2e4; font-size: 13px; }
.side-user i { width: 22px; height: 22px; border-radius: 50%; background: #3a4d6e; }
.side-pills { display: flex; gap: 6px; margin: 8px 0 12px; }
.side-pills span, .tabs-mini span { background: #1a2740; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.side-item.on { background: #1f6fe5; color: #fff; }
.board { padding: 16px 8px; overflow: hidden; }
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; }
.hero-card { border-radius: 14px; min-height: 168px; padding: 18px 20px; position: relative; overflow: hidden; }
.hero-card.dark { background: linear-gradient(120deg, #10284f, #1a4d9a 55%, #0d1b33); }
.hero-card.gold { background: linear-gradient(160deg, #1a2744, #24365c); }
.hero-card p { margin: 0 0 8px; font-size: 13px; color: #d5e4ff; }
.hero-card strong { display: block; font-size: 54px; line-height: 1; color: #fff; }
.hero-card.gold strong { font-size: 36px; color: #ffd56a; margin-top: 28px; }
.hero-card span { color: #9eb6db; font-size: 14px; }
.reg { position: absolute; right: 16px; bottom: 16px; background: #ff5a3c; color: #fff !important; border-radius: 16px; padding: 6px 12px; font-size: 12px !important; }
.matches { margin-top: 16px; }
.matches h3, .rail h3 { margin: 0 0 8px; font-size: 14px; color: #fff; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; position: relative; }
.match em { font-style: normal; color: #7dffa1; font-weight: 700; }
.match small { position: absolute; right: 12px; bottom: 4px; color: #8090a8; font-size: 11px; }
.odd { justify-content: space-between; background: rgba(255,255,255,0.04); margin-bottom: 6px; }
.tabs-mini { display: flex; gap: 6px; margin-top: 12px; }

.shade {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 28, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 24px 16px;
}
.shade.sub { z-index: 30; }
.modal, .dialog {
  width: min(680px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  position: relative;
  color: var(--ink);
}
.modal { padding: 0 22px 18px; }
.modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #8ea0b8;
  font-size: 20px;
  z-index: 2;
}
.modal-tabs { display: flex; height: 52px; margin: 0 -22px 14px; border-radius: 16px 16px 0 0; overflow: hidden; background: #f4f7fb; }
.mtab { flex: 1; font-size: 18px; font-weight: 600; color: #8b95a3; }
.mtab.frozen { pointer-events: none; }
.mtab.on { background: linear-gradient(180deg, #49b0ff, #1a86f5); color: #fff; }
.asset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #ffe7c4, #ffd9a8);
  border-radius: 12px;
  padding: 12px 14px;
}
.asset-label { font-size: 13px; color: #8d7356; }
.asset-num { display: flex; align-items: baseline; gap: 6px; }
.asset-num strong { font-size: 28px; }
.asset-num small { color: #8d7356; font-size: 12px; }
.eye { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.9); display: grid; place-items: center; }
.asset-note { margin: 8px 0 12px; color: #9aa6b4; font-size: 12px; }
h2 { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; font-size: 15px; }
h2::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--blue); }
h2 em { font-style: normal; font-size: 12px; color: #ff7a1a; background: #fff1e6; border-radius: 8px; padding: 1px 6px; font-weight: 600; }
.sec-row { display: flex; align-items: center; justify-content: space-between; }
.sec-row h2 { margin-bottom: 8px; }
.mini-link, .link, .text-btn, .service { color: var(--blue); font-size: 13px; }
.info { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #b7c3d4; color: #8aa0b8; font-size: 11px; line-height: 14px; }
.type-grid, .chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type-grid { grid-template-columns: repeat(6, 1fr); }
.pay-row, .proto-row { display: flex; gap: 8px; }
.tile, .proto, .chips button {
  position: relative;
  border: 1px solid #e6edf5;
  background: #fff;
  border-radius: 10px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #50657e;
  font-size: 12px;
}
.chips button { min-height: 40px; font-size: 14px; color: #3a4654; flex-direction: row; }
.tile.on, .proto.on, .chips button.on { border-color: var(--blue); color: var(--blue); }
.pay-row .tile { width: 112px; }
.proto { width: 120px; min-height: 40px; font-size: 14px; font-weight: 600; color: #3a4654; }
.tick { display: none; }
.tile.on .tick, .proto.on .tick {
  display: block;
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, transparent 50%, var(--blue) 50.2%);
  border-radius: 0 0 9px 0;
}
.tile.on .tick::after, .proto.on .tick::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 6px;
  height: 3px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-48deg);
}
.badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #ff6a1a;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
  padding: 2px 4px;
  border-radius: 0 9px 0 6px;
}
.badge.hot { background: #ff4d4f; }
.logo { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 700; font-size: 12px; background: #26a17b; }
.logo.wallet { background: #2f7bff; }
.logo.ecny { background: #e1251b; }
.logo.ali { background: #1677ff; font-size: 11px; }
.logo.wx { background: #22c55e; }
.logo.yun, .logo.bank { background: #e10600; }
.logo.usd { background: #f5a623; }
.ebpay {
  margin-top: 10px;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(90deg, #2f89ff, #49b4ff);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
}
.ebpay i { width: 22px; height: 22px; border-radius: 6px; background: #fff; color: #2f89ff; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.amt-field { display: block; margin-top: 10px; }
.amt-field input {
  width: 100%;
  height: 42px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}
.amt-field input:focus { border-color: var(--blue); }
.quote { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: #5c6b7c; }
.quote p { margin: 0 0 4px; }
.quote .total { align-self: flex-end; }
.orange { color: var(--orange); }
.tips { margin-top: 12px; color: #e4544a; font-size: 12px; line-height: 1.65; }
.tips h3 { margin: 0 0 6px; font-size: 14px; }
.tips ol { margin: 0; padding-left: 1.2em; }
.form-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.service { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.service::before { content: "☎"; }
.primary {
  height: 42px;
  border-radius: 21px;
  background: linear-gradient(180deg, #4cb4ff, #1a86f5);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 0 18px;
}
.form-foot .primary { flex: 1; }
.primary.block { display: block; width: 100%; margin-top: 8px; }
.primary:disabled { background: #c5d8fb; cursor: not-allowed; }
.placeholder { padding: 48px 12px 64px; text-align: center; color: var(--muted); }
.placeholder h2 { justify-content: center; }
.placeholder h2::before { display: none; }
.placeholder .primary { min-width: 160px; }
.detail-head { display: flex; align-items: center; justify-content: space-between; }
.detail-head h2 { margin-bottom: 0; }
.steps { padding: 4px 8px 8px; }
.step-labels { display: flex; justify-content: space-between; font-size: 13px; color: #9aa8b8; }
.step-labels .on { color: var(--blue); font-weight: 600; }
.step-track { display: flex; align-items: center; margin: 8px 28px 0; }
.step-track .dot { width: 8px; height: 8px; border-radius: 50%; border: 2px solid #c5d4ea; background: #fff; }
.step-track .dot.done, .step-track .dot.on { border-color: var(--blue); background: var(--blue); }
.step-track .dot.on { box-shadow: 0 0 0 3px rgba(31, 143, 255, 0.2); }
.step-track .bar { flex: 1; height: 2px; background: #d7e3f2; }
.step-track .bar.on { background: var(--blue); }
.count-line { text-align: center; margin: 12px 0 0; font-weight: 600; }
.count-line b { color: var(--orange); }
.count-sub { text-align: center; margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.pay-box { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: start; padding-bottom: 8px; border-bottom: 1px dashed #e6edf5; }
.usdt-line { font-size: 14px; margin-bottom: 8px; }
.usdt-line strong { font-size: 28px; margin-right: 4px; }
.pay-main p { margin: 4px 0; font-size: 13px; color: #5c6b7c; }
.rate { color: #8b95a3 !important; }
.addr-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; }
.addr-line span { color: var(--muted); flex: none; }
.addr-line b { font-weight: 500; word-break: break-all; }
.note { margin-top: 8px !important; background: #f3f8ff; color: #4d78c8 !important; border-radius: 8px; padding: 8px 10px; font-size: 12px !important; }
.qr-side { text-align: center; color: var(--muted); font-size: 12px; }
.qr-side img { width: 132px; height: 132px; margin: 0 auto 6px; object-fit: contain; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.kv span { color: var(--muted); }
.detail-tips { margin-top: 8px; }
.dialog { width: min(520px, 100%); padding: 18px 18px 16px; }
.dialog.narrow { width: min(400px, 100%); }
.dialog.center { text-align: center; }
.dialog-head { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 8px; }
.dialog-head h3, .dialog h3 { margin: 8px 0; font-size: 18px; }
.dialog-head .modal-x, .dialog > .modal-x { top: 0; right: 0; }
.back { position: absolute; left: 0; font-size: 26px; color: var(--ink); width: 32px; }
.req { margin: 8px 0; font-size: 14px; font-weight: 600; }
.req::before { content: "* "; color: #ff4d4f; }
.hint-row { display: flex; justify-content: space-between; color: #b0b6c0; font-size: 12px; }
.uploads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.upload-add, .thumb { width: 76px; height: 76px; }
.upload-add { border: 1px dashed #d5d8e0; border-radius: 8px; background: #fafbfc; color: #b0b6c0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.thumb { position: relative; }
.thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; background: #d7ebfb; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(30,36,48,0.55); color: #fff; }
.sample { margin: 8px 0; font-size: 12px; }
.field { position: relative; }
.field textarea { width: 100%; min-height: 120px; border: 0; outline: none; resize: none; background: #f5f6fa; border-radius: 8px; padding: 12px 12px 28px; font-size: 14px; }
.field span { position: absolute; right: 12px; bottom: 8px; color: #c5c8d0; font-size: 12px; }
.dialog-actions { display: flex; gap: 12px; margin-top: 12px; }
.ghost, .dialog-actions .primary { flex: 1; height: 42px; border-radius: 8px; font-size: 16px; }
.ghost { background: #f2f3f5; }
.guide { width: 100%; border-radius: 10px; background: #f5f8ff; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.ok { width: 56px; height: 56px; margin: 8px auto 0; border-radius: 50%; background: var(--blue); color: #fff; font-size: 30px; line-height: 56px; }
.thread { display: flex; flex-direction: column; max-height: min(760px, calc(100vh - 48px)); }
.thread-order, .thread-list { overflow: auto; }
.thread-list { flex: 1; min-height: 180px; }
.msg { padding: 8px 0; }
.msg header { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.msg time { color: #b0b4bc; font-size: 12px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 12px; }
.avatar.betx { border-radius: 6px; font-size: 9px; font-weight: 700; }
.bubble { margin: 8px 0 0 36px; background: #f6f8fb; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.6; }
.bubble img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.composer { border-top: 1px solid #f0f3f8; padding-top: 8px; }
.composer-row { display: flex; gap: 8px; align-items: center; }
.plus { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e5e6eb; font-size: 20px; }
.composer input { flex: 1; height: 36px; border: 0; outline: none; background: #f4f5f7; border-radius: 8px; padding: 0 12px; }
.primary.slim { height: 36px; border-radius: 8px; }
.chip-preview { display: inline-flex; align-items: center; gap: 6px; background: #f5f8ff; border-radius: 8px; padding: 4px 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chip-preview img { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; }
.toast {
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  background: rgba(28, 36, 48, 0.9);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
@media (max-width: 980px) {
  .site { grid-template-columns: 160px 1fr; }
  .rail { display: none; }
}
