:root {
  --bg: #0f1420;
  --panel: #171e2e;
  --panel-2: #1e2740;
  --text: #e8edf7;
  --muted: #93a0bb;
  --accent: #5b9dff;
  --ok: #4ec9a0;
  --bad: #ff7a7a;
  --idle: #8a93a8;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid #243050;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.nav { display: flex; gap: 1rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.controls { margin-bottom: 1rem; }

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filters input,
.filters select,
.filters button {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #2b3a5e;
  background: var(--panel);
  color: var(--text);
}

.filters input { flex: 1 1 220px; min-width: 0; }
.filters button {
  background: var(--accent);
  border-color: var(--accent);
  color: #08122a;
  font-weight: 600;
  cursor: pointer;
}

.source-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.status::before {
  content: "●";
  margin-right: 0.35rem;
}
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.status.idle { color: var(--idle); }
.status.off { color: var(--idle); }

.item-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.item {
  background: var(--panel);
  border: 1px solid #243050;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}

.item-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.rank { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.2rem; }

.title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.score {
  flex: 0 0 auto;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.source-name { color: var(--text); }

.summary {
  margin: 0.5rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.empty { color: var(--muted); padding: 2rem 0; text-align: center; }

.overview {
  background: var(--panel-2);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid #243050;
  color: var(--muted);
  text-align: center;
  font-size: 0.8rem;
  padding: 1rem;
}

@media (max-width: 560px) {
  .item-head { flex-wrap: wrap; }
  .title { flex-basis: 100%; order: 3; }
  .score { margin-left: auto; }
  .filters input { flex-basis: 100%; }
}
