:root {
  --bg: #071625;
  --panel: #0b2b47;
  --panel-2: #123b60;
  --text: #edf5ff;
  --muted: #91a8bd;
  --gold: #f6b21a;
  --green: #18c486;
  --red: #ef4444;
  --line: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.sidebar {
  width: 220px;
  padding: 24px 16px;
  background: #06111f;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 28px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--bg);
}
.nav {
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  padding: 0 14px;
}
.nav.active {
  color: #071625;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 800;
}

.main {
  flex: 1;
  padding: 24px;
  overflow: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 20px; color: var(--gold); }
p { color: var(--muted); margin-top: 6px; }
.token {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
input {
  height: 36px;
  min-width: 180px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}

.view { display: none; }
.view.active { display: block; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat {
  padding: 18px;
}
.stat span {
  color: var(--muted);
  display: block;
}
.stat b {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  color: var(--gold);
}
.panel {
  padding: 18px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
button {
  border: 0;
  background: var(--panel-2);
  color: var(--text);
  height: 34px;
  padding: 0 14px;
  cursor: pointer;
}
button.primary { background: var(--gold); color: #071625; font-weight: 800; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
}
th { color: var(--gold); }
td { color: var(--text); }
code {
  color: #a9c7df;
  font-family: Consolas, "Microsoft YaHei", monospace;
}
.list {
  display: grid;
  gap: 12px;
}
.match {
  padding: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.match-title {
  display: flex;
  justify-content: space-between;
  color: var(--gold);
  font-weight: 800;
}
.winner, .badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(246, 178, 26, 0.16);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}
.muted-badge {
  background: rgba(145, 168, 189, 0.14);
  color: #b8c9d8;
}
.actions {
  white-space: nowrap;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.delta-plus { color: var(--green); font-weight: 800; }
.delta-minus { color: var(--red); font-weight: 800; }

@media (max-width: 900px) {
  body { display: block; }
  .sidebar { width: 100%; display: flex; gap: 8px; overflow-x: auto; }
  .brand { min-width: 160px; margin-bottom: 0; }
  .nav { min-width: 110px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar, .toolbar { align-items: flex-start; flex-direction: column; }
  .grid-2 { grid-template-columns: 1fr; }
}
