:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --card: #121722;
  --line: #242c3d;
  --text: #e7ecf5;
  --muted: #8e99ad;
  --accent-a: #7c5cff;
  --accent-b: #00d4ff;
  --warn: #ffb020;
  --danger: #ff6b7a;
  --ok: #3ee0b0;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(124, 92, 255, 0.18), transparent 55%),
    radial-gradient(700px 380px at -10% 10%, rgba(0, 212, 255, 0.1), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.banner {
  background: linear-gradient(90deg, #f6c14b, #ff8a3d);
  color: #2a1600;
  text-align: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-right: auto;
}
.burger {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
}
.nav-links {
  display: none;
  flex-basis: 100%;
  order: 5;
  gap: 6px;
}
.nav-links.open { display: flex; flex-direction: column; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-links a.active,
.nav-links a:hover { color: var(--text); background: #1a2130; }
.auth { display: flex; align-items: center; gap: 8px; }
.who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.addr { font-size: 13px; font-variant-numeric: tabular-nums; }
.bal { font-size: 12px; color: var(--accent-b); font-variant-numeric: tabular-nums; }
.wallet-hint {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px 0;
  color: #ffd089;
  font-size: 13px;
}
main { max-width: 1080px; margin: 0 auto; padding: 18px 16px 8px; min-height: 60vh; }
footer {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px 40px;
  font-size: 13px;
}

.hero { margin-bottom: 18px; }
.hero h1 {
  margin: 0 0 6px;
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.lede { color: var(--muted); margin: 0 0 14px; max-width: 46rem; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.metric { padding: 12px 14px; }
.metric b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 12px; }
.toolbar { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.toolbar select { width: auto; min-width: 140px; }
.grid { display: grid; gap: 12px; }
.task-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.task-card:hover { border-color: #3a4660; }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: #1c2433;
  color: #c9d4ea;
  border: 1px solid #2c364c;
}
.reward { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.reward small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.muted { color: var(--muted); }
.tiny { color: var(--muted); font-size: 12px; }
.bar { height: 6px; background: #0d121b; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }
h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.03em; }
h3 { margin: 0 0 8px; font-size: 16px; }
.stack { display: grid; gap: 12px; }
.card { padding: 16px; }
label { display: grid; gap: 6px; font-size: 13px; color: #c5cedd; }
input, select, textarea {
  width: 100%;
  background: #0d121b;
  border: 1px solid #2a3346;
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(124, 92, 255, 0.45);
  border-color: #6d5cff;
}
.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #1c2433;
  color: var(--text);
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #071018;
  font-weight: 750;
}
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-danger { background: #3a1820; color: #ffd0d6; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.calc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.calc div { background: #0d121b; border-radius: 12px; padding: 10px; }
.calc b { display: block; font-variant-numeric: tabular-nums; }
.warn { color: #ffd089; }
.bad { color: var(--danger); }
.ok { color: var(--ok); }
.tabs { display: flex; gap: 6px; overflow: auto; padding-bottom: 4px; }
.tabs button { white-space: nowrap; }
.tabs button.on { background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); color: #071018; font-weight: 700; }
.summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.inline { display: flex; gap: 8px; align-items: end; }
.inline input { flex: 1; }
.list { display: grid; gap: 8px; }
.item { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #0e1420; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.link { color: var(--accent-b); overflow-wrap: anywhere; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
#toasts {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 8px;
  z-index: 40;
  pointer-events: none;
}
.toast {
  justify-self: center;
  max-width: 520px;
  background: #1a2233;
  border: 1px solid #33405a;
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.note {
  background: #241c10;
  border: 1px solid #5a4320;
  color: #ffd7a1;
  border-radius: 12px;
  padding: 12px;
}

@media (min-width: 860px) {
  .burger { display: none; }
  .nav-links { display: flex; flex-direction: row; flex-basis: auto; order: 0; }
  .logo { margin-right: 8px; }
  .hero h1 { font-size: 40px; }
  .metrics, .summary { grid-template-columns: repeat(4, 1fr); }
  .grid.cards { grid-template-columns: 1fr 1fr; }
  #toasts { left: auto; right: 20px; }
}
