/* MITI 聚合平台 — dark, mobile-first */
:root {
  --bg: #090d15;
  --bg2: #0e1420;
  --card: #121a29;
  --card2: #172134;
  --line: #22304a;
  --text: #e7edf7;
  --muted: #8d9bb3;
  --mint: #5bf2c6;
  --violet: #7c6cff;
  --warn: #ffb547;
  --bad: #ff5d73;
  --ok: #43e08f;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(124,108,255,.14), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(91,242,198,.10), transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .92em; word-break: break-all; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: .4em 0 .8em; }
[hidden] { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(9,13,21,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1080px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }
.brand small { color: var(--muted); font-weight: 500; }
.spacer { flex: 1; }
.menuBtn { display: inline-flex; }
nav.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg2); border-bottom: 1px solid var(--line); padding: 8px 14px 14px; flex-direction: column; gap: 2px; }
nav.nav.open { display: flex; }
nav.nav a { color: var(--text); padding: 9px 10px; border-radius: 10px; }
nav.nav a.on, nav.nav a:hover { background: var(--card2); text-decoration: none; color: var(--mint); }
@media (min-width: 900px) {
  .menuBtn { display: none; }
  nav.nav { display: flex; position: static; flex-direction: row; background: none; border: 0; padding: 0; gap: 2px; }
  nav.nav a { padding: 6px 10px; font-size: .92rem; }
}

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px 14px 40px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
footer .in { max-width: 1080px; margin: 0 auto; padding: 18px 14px 28px; }
footer .risk { color: var(--warn); font-weight: 600; }

/* elements */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--card2); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
}
.btn:hover { border-color: var(--mint); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--mint), #39c9ff); color: #04131a; border: 0; }
.btn.violet { background: linear-gradient(135deg, var(--violet), #b06cff); color: #fff; border: 0; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: .85rem; border-radius: 8px; }
.btn.danger { border-color: rgba(255,93,115,.5); color: var(--bad); background: transparent; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: linear-gradient(180deg, var(--card), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.hl { border-color: rgba(91,242,198,.45); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: var(--ok); border-color: rgba(67,224,143,.4); }
.tag.bad { color: var(--bad); border-color: rgba(255,93,115,.4); }
.tag.warn { color: var(--warn); border-color: rgba(255,181,71,.4); }
.tag.vip { color: #1a1300; background: linear-gradient(135deg, #ffe08a, #ffb547); border: 0; font-weight: 700; }
input[type=text], input[type=number], textarea, select {
  width: 100%; background: #0a101b; border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  padding: 10px 12px; font: inherit; outline: none;
}
textarea { font-family: var(--mono); font-size: .88rem; min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--mint); }
label.chk { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.field { margin: 10px 0; }
.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.msg { min-height: 1.2em; font-size: .9rem; color: var(--muted); margin: 8px 0; white-space: pre-wrap; }
.msg.warn { color: var(--warn); }
.msg.bad { color: var(--bad); }
.msg.ok { color: var(--ok); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--muted); flex-shrink: 0; }
.kv > b { text-align: right; font-weight: 600; word-break: break-all; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* hero */
.hero { padding: 26px 4px 10px; }
.hero h1 { font-size: 1.9rem; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--mint), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--muted); font-size: 1.02rem; max-width: 640px; }
.feat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(91,242,198,.1); color: var(--mint); font-size: 1.2rem; margin-bottom: 8px; }
.feat h3 { margin-bottom: .2em; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px 38px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--card2); border: 1px solid var(--mint); color: var(--mint); display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
section { margin: 22px 0; }

/* wallet modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(3,6,12,.7); display: flex; align-items: flex-end; justify-content: center; }
.modal .box { width: 100%; max-width: 440px; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 18px; max-height: 88vh; overflow: auto; }
@media (min-width: 640px) { .modal { align-items: center; } .modal .box { border-radius: 18px; } }
.wlist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.wlist .btn { justify-content: flex-start; width: 100%; padding: 11px 12px; }
.wlist img { width: 24px; height: 24px; border-radius: 6px; }

/* lock */
.lock { text-align: center; padding: 34px 16px; }
.lock .big { font-size: 2.6rem; line-height: 1; margin-bottom: 10px; }

/* tables */
.tableWrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: var(--bg2); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.hit td { background: rgba(91,242,198,.07); }
tr.done td { opacity: .55; }
td small, .sub { display: block; color: var(--muted); font-size: .78rem; }
.bar { height: 7px; background: #0a101b; border-radius: 99px; overflow: hidden; margin-top: 4px; min-width: 90px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--violet)); width: 0; }
.thr { width: 64px !important; padding: 5px 6px !important; }

/* misc */
.hex { background: #0a101b; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-family: var(--mono); font-size: .82rem; word-break: break-all; }
.flags { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .flags { grid-template-columns: 1fr 1fr; } }
.flag { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.flag .d { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; background: var(--muted); }
.flag.ok .d { background: var(--ok); } .flag.bad .d { background: var(--bad); } .flag.warn .d { background: var(--warn); }
.flag b { display: block; }
.flag span { color: var(--muted); font-size: .85rem; }
.plans .price { font-size: 1.7rem; font-weight: 800; }
.plans .price small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.notice { border: 1px solid rgba(255,181,71,.35); background: rgba(255,181,71,.07); color: #ffd79a; border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.pending { border: 1px dashed rgba(255,181,71,.5); color: var(--warn); border-radius: 12px; padding: 12px; text-align: center; }
.log { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.log li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.log .tm { color: var(--muted); font-family: var(--mono); margin-right: 8px; }
.toolhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.toolhead h1 { margin: 0; font-size: 1.35rem; }
.offscreen { position: fixed; left: -9999px; top: 0; }
.row.center { justify-content: center; }
.right { text-align: right; }
.mt { margin-top: 12px; }
textarea.short { min-height: 70px; }

/* ---- BSC 测试网横幅 ---- */
.testnet-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  background: #ffd400; color: #1a1400; padding: 8px 12px; font-size: .9rem; border-bottom: 2px solid #c9a600; }
.testnet-bar b { color: #1a1400; }
.testnet-bar a { color: #1a1400; text-decoration: underline; }
.testnet-bar .btn { background: #1a1400; color: #ffd400; border-color: #1a1400; }
.testnet-bar .msg { color: #1a1400; }
