:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --ink: #e8eaed;
  --text: #e8eaed;
  --muted: #9aa3b2;
  --accent: #ff8a3d;
  --green: #34d399;
  --green-2: rgba(52, 211, 153, .14);
  --amber: #ff8a3d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button, select, input { font: inherit; }
a { color: var(--accent); text-decoration: none; }

.pageShell { margin: 0 auto; max-width: 1080px; padding: 0 18px 18px; }
.shell { min-width: 0; }

/* 广告位（默认隐藏） */
.adRail { display: none; gap: 14px; align-content: start; padding-top: 18px; position: sticky; top: 0; }
.adBox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-height: 150px; padding: 14px; }
.adBox span { color: var(--muted); display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.adBox strong { color: var(--text); display: block; font-size: 18px; line-height: 1.25; }
.adBox.muted { background: var(--panel-2); }

/* 顶栏 */
.masthead {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(800px 220px at 30% -40px, rgba(255,138,61,.10), transparent 70%), var(--panel);
  margin: 0 -18px 18px;
}
.brandBlock { max-width: 1080px; margin: 0 auto; padding: 24px 18px 20px; }
.back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.back:hover { color: var(--accent); }
.masthead::after { display: none; }

h1 { font-size: 24px; font-weight: 800; letter-spacing: .5px; line-height: 1.2; margin: 0; text-align: left; }
h1::after { display: none; }
h1 span { color: var(--accent); }

p { color: var(--muted); margin: 0; }
.brandBlock p { font-size: 14px; margin-top: 6px; }

button {
  background: var(--accent); border: 0; color: #1a1205; cursor: pointer;
  font-weight: 700; min-height: 42px; padding: 0 18px; border-radius: 10px;
}
button:hover, .openLink:hover { filter: brightness(1.08); }

/* 筛选条 */
.commandBar {
  align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  display: grid; gap: 14px; grid-template-columns: minmax(260px, 1.6fr) minmax(220px, 0.9fr);
  margin-top: 0; padding: 16px;
}

.updateBar {
  align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding: 10px 14px;
}
.updateBar span { background: var(--accent); color: #1a1205; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.updateBar strong { font-size: 15px; font-weight: 700; }
.updateBar em { color: var(--muted); font-style: normal; font-weight: 600; }

label { color: var(--muted); display: grid; font-size: 12px; font-weight: 600; gap: 7px; }
input, select {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  min-height: 44px; outline: none; padding: 0 12px; width: 100%; border-radius: 10px;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,138,61,.16); }

.workspace { margin-top: 18px; }
.marketPanel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; min-width: 0; overflow: hidden; }

.metricRow { display: grid; grid-template-columns: repeat(3, 1fr); }
.metricRow div { background: var(--panel-2); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 13px 18px; }
.metricRow div:last-child { border-right: 0; }
.metricRow span { color: var(--muted); display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.metricRow strong { display: block; font-size: 24px; line-height: 1; }

.tableWrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 680px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 14px; text-align: left; vertical-align: middle; }
th { background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 700; position: sticky; top: 0; z-index: 1; }
tbody tr:hover { background: var(--panel-2); }

.productCell { display: block; min-width: 320px; }
.name {
  color: var(--text); display: -webkit-box; font-weight: 600; line-height: 1.35; max-width: 680px;
  overflow: hidden; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.name:hover { color: var(--accent); }
.price { color: var(--accent); font-size: 20px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.openLink {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text); display: inline-block;
  font-weight: 600; padding: 7px 13px; text-decoration: none; white-space: nowrap; border-radius: 9px;
}
.openLink:hover { border-color: var(--accent); color: var(--accent); }

.siteFooter { border-top: 1px solid var(--line); color: var(--muted); margin: 60px auto 10px; max-width: 1040px; padding: 28px 18px; text-align: center; }
.sponsorLine { color: var(--text); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.siteFooter p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.disclaimer { color: #6f7889 !important; margin: 8px auto 0; max-width: 780px; }

@media (min-width: 921px) and (max-width: 1180px) {
  .pageShell { max-width: 980px; }
  .commandBar { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

@media (max-width: 920px) {
  .pageShell { display: block; padding: 0 12px 12px; }
  .adRail { grid-template-columns: 1fr 1fr; margin-top: 14px; padding-top: 0; position: static; }
  .adRailLeft { display: none; }
  .adBox { min-height: 96px; }
  .masthead { display: block; }
  .brandBlock { padding: 18px 14px 16px; }
  h1 { font-size: 21px; }
  .commandBar, .metricRow { grid-template-columns: 1fr; }
  .metricRow div { border-right: 0; }
  .marketPanel { background: transparent; border: 0; }
  .tableWrap { overflow: visible; }
  table, thead, tbody, tr, td { display: block; min-width: 0; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; margin-top: 12px; }
  tbody tr { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
  td { border-bottom: 0; padding: 0; }
  td + td { margin-top: 10px; }
  .productCell { min-width: 0; }
  .name { -webkit-line-clamp: 3; }
  .price { display: block; margin-top: 4px; }
  .openLink { display: block; text-align: center; }
  .siteFooter { margin-top: 48px; padding-left: 8px; padding-right: 8px; }
}
