:root {
  --bg: #eef0f3;
  --bg-2: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #1c2530;
  --text-strong: #111827;
  --muted: #66707d;
  --line: rgba(28, 37, 48, 0.09);
  --line-strong: rgba(28, 37, 48, 0.14);
  --teal: #1e918b;
  --teal-soft: #e3f2f1;
  --amber: #e99a3c;
  --stellar-cyan: #0f9bb3;
  --stellar-blue: #2563eb;
  --stellar-violet: #7a5cff;
  --up: #2fae7d;
  --down: #e0564f;
  --shadow: 0 10px 34px rgba(30, 42, 58, 0.08);
  --shadow-hover: 0 18px 44px rgba(30, 42, 58, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(31, 155, 179, 0.18); }

/* ---- 浅色背景细微星点 ---- */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, rgba(28,60,90,0.14), transparent),
    radial-gradient(1px 1px at 28% 12%, rgba(28,60,90,0.10), transparent),
    radial-gradient(1.5px 1.5px at 42% 32%, rgba(15,155,179,0.16), transparent),
    radial-gradient(1px 1px at 58% 18%, rgba(28,60,90,0.10), transparent),
    radial-gradient(1.5px 1.5px at 68% 40%, rgba(122,92,255,0.12), transparent),
    radial-gradient(1px 1px at 78% 24%, rgba(28,60,90,0.12), transparent),
    radial-gradient(1px 1px at 88% 52%, rgba(15,155,179,0.10), transparent),
    radial-gradient(1.5px 1.5px at 22% 64%, rgba(28,60,90,0.10), transparent),
    radial-gradient(1px 1px at 52% 70%, rgba(28,60,90,0.08), transparent),
    radial-gradient(1px 1px at 74% 78%, rgba(30,145,139,0.12), transparent);
}
main, header, section, footer { position: relative; z-index: 1; }

/* ---- 顶栏 ---- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: inherit; }
.brandMark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(145deg, #2aa9a1, #156b70);
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(42, 169, 161, 0.28), inset 0 1px 0 rgba(255,255,255,0.25);
}
.brandText strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: 0.2px; line-height: 1.2; color: var(--text-strong); }
.brandText small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.hostStatus {
  display: inline-flex; align-items: center;
  color: var(--muted); font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px 5px 4px; background: var(--surface);
  white-space: nowrap;
}
.hostStat {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 0 12px;
}
.hostStat b { font-weight: 500; }
.hostStat i { font-style: normal; font-weight: 700; color: var(--text); }
.hostStat + .hostStat, .hostStat + .hostPill, .hostPill { border-left: 1px solid var(--line); }
.hostPill {
  display: inline-flex; align-items: center; gap: 8px;
  padding-left: 12px;
}
.statusPulse {
  width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: none;
  background: var(--up); box-shadow: 0 0 0 5px rgba(47, 174, 125, 0.14);
}
.statusPulse.checking { background: var(--amber); box-shadow: 0 0 0 5px rgba(233, 154, 60, 0.14); animation: pulse 1.2s ease-in-out infinite; }
.statusPulse.down { background: var(--down); box-shadow: 0 0 0 5px rgba(224, 86, 79, 0.14); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Hero（占满首屏，浅灰高级感） ---- */
.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(15, 155, 179, 0.07) 0 4%, transparent 7%),
    radial-gradient(circle at 72% 55%, rgba(122, 92, 255, 0.06) 0 6%, transparent 9%),
    radial-gradient(circle at 55% 30%, rgba(30, 145, 139, 0.06) 0 5%, transparent 8%),
    linear-gradient(160deg, #f7f8fa, #eef1f4 52%, #e8ebef);
}
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 80%; max-width: 640px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31, 155, 179, 0.35), transparent);
}
.orbit { position: absolute; inset: 0; pointer-events: none; }
.orbit span {
  position: absolute; border-radius: 50%; border: 1px solid rgba(30, 90, 120, 0.12);
  left: 50%; top: 50%;
}
.orbit span:nth-child(1) { width: 420px; height: 420px; margin: -210px 0 0 -210px; }
.orbit span:nth-child(2) { width: 580px; height: 580px; margin: -290px 0 0 -290px; border-color: rgba(122, 92, 255, 0.10); }
.orbit span:nth-child(3) { width: 760px; height: 760px; margin: -380px 0 0 -380px; border-color: rgba(30, 145, 139, 0.09); }
.orbit span::before, .orbit span::after {
  content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--stellar-cyan); box-shadow: 0 0 10px rgba(15, 155, 179, 0.45);
}
.orbit span:nth-child(1)::before { top: 8px; left: 50%; }
.orbit span:nth-child(1)::after { bottom: 8px; left: 12%; background: var(--stellar-violet); box-shadow: 0 0 10px rgba(122, 92, 255, 0.4); }
.orbit span:nth-child(2)::before { top: 50%; right: 6px; }
.orbit span:nth-child(2)::after { top: 20%; left: 10%; background: var(--amber); box-shadow: 0 0 10px rgba(233, 154, 60, 0.4); }
.heroCopy { position: relative; z-index: 2; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 3px; font-size: 12px; color: var(--stellar-cyan);
  margin: 0 0 26px; opacity: 0.9; font-weight: 600;
}
.heroCopy h1 {
  font-size: clamp(52px, 9.5vw, 126px);
  margin: 0; font-weight: 700; letter-spacing: 2px; line-height: 1.12;
  color: var(--text-strong);
}
.heroCopy h1 span { display: block; }
.heroCopy h1 span:first-child {
  background: linear-gradient(100deg, #0b8a8f, #1a73e8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.heroCopy h1 span:last-child {
  font-size: 0.82em;
  background: linear-gradient(100deg, #2b6cb0, #7a5cff 60%, #1c2530);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.heroCoordinates { margin-top: 52px; color: rgba(102, 112, 125, 0.55); font-size: 11px; letter-spacing: 4px; }

/* ---- 最近更新栏（全宽铺满） ---- */
.recentRail { padding: 38px 44px 10px; width: 100%; }
.recentIntro { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.recentIntro h2 { margin: 0; font-size: 24px; color: var(--text-strong); }
.recentIntro p { color: var(--muted); font-size: 14px; margin: 0; }
.recentList { display: flex; gap: 12px; flex-wrap: wrap; min-height: 40px; }
.recentChip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 17px; border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px; color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.recentChip:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.recentChip .mark { color: var(--stellar-cyan); font-weight: 700; }
.recentChip time { color: var(--muted); font-size: 13px; }

/* ---- 控制台（全宽铺满） ---- */
.controlDeck { padding: 26px 44px 10px; width: 100%; }
.searchBox {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; max-width: 620px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchBox:focus-within { border-color: rgba(31, 155, 179, 0.5); box-shadow: 0 0 0 4px rgba(31, 155, 179, 0.10); }
.searchBox span { color: var(--muted); font-size: 14px; }
.searchBox input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 16px; }
.searchBox kbd { color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-size: 12px; }
.controlRow { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.categoryList { display: flex; gap: 9px; flex-wrap: wrap; }
.filterButton {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 9px 18px;
  font-size: 15px; cursor: pointer; transition: all 0.15s;
}
.filterButton:hover { color: var(--text); border-color: var(--teal); }
.filterButton.active {
  color: #fff; background: linear-gradient(90deg, var(--teal), var(--stellar-blue));
  border-color: transparent; font-weight: 600;
}

/* ---- 卡片区（全宽 3 列，卡片大而饱满） ---- */
.library { padding: 26px 44px 70px; width: 100%; }
.sectionHeading { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.sectionHeading .eyebrow { margin-bottom: 4px; font-size: 11px; }
.sectionHeading h2 { margin: 0; font-size: 26px; color: var(--text-strong); }
.libraryActions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.refreshHelp { color: var(--muted); font-size: 13px; }
.quietButton {
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 10px 18px; font-size: 14px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quietButton:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.siteGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.siteCard {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  overflow: hidden;
}
.siteCard::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(460px 200px at var(--glow-x, 20%) var(--glow-y, 0%), rgba(31, 155, 179, 0.07), transparent 70%);
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.siteCard:hover { transform: translateY(-5px); border-color: rgba(30, 145, 139, 0.45); box-shadow: var(--shadow-hover); }
.siteCard:hover::before { opacity: 1; }
.cardTop { display: flex; align-items: center; justify-content: space-between; position: relative; }
.cardMark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(145deg, var(--teal-soft), #d6e9f4);
  border: 1px solid rgba(30, 145, 139, 0.25);
  color: var(--teal); font-weight: 800; letter-spacing: 0.5px; font-size: 18px;
}
.cardStatus { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.cardStatus .dot { width: 10px; height: 10px; border-radius: 999px; flex: none; }
.dot.up { background: var(--up); box-shadow: 0 0 8px rgba(47, 174, 125, 0.45); }
.dot.down { background: var(--down); box-shadow: 0 0 8px rgba(224, 86, 79, 0.45); }
.dot.checking { background: var(--amber); animation: pulse 1.2s ease-in-out infinite; }
.siteCard h3 { margin: 0; font-size: 22px; letter-spacing: 0.2px; color: var(--text-strong); position: relative; }
.siteCard h3 .lockIcon { margin-left: 7px; vertical-align: -1px; opacity: .9; color: #c9a227; position: relative; top: -1px; }
.siteCard .desc { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; min-height: 44px; position: relative; }
.cardTags { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.tag {
  font-size: 14px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 12px;
}
.cardMeta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--line); position: relative;
}
.cardMeta time { color: var(--stellar-cyan); font-weight: 600; }
.openBtn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(90deg, #2a9d8f, #626ad9);
  color: #fff; text-decoration: none; border-radius: 10px;
  padding: 10px 20px; font-size: 15px; font-weight: 600; margin-top: 6px;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(42, 157, 143, 0.25);
}
.openBtn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(42, 157, 143, 0.32); }
.emptyState { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---- 页脚 ---- */
footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 24px 30px; border-top: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted); font-size: 13px; flex-wrap: wrap;
}
footer strong { color: var(--text-strong); display: block; }
footer span { display: block; }
.footerLinks { color: rgba(102, 112, 125, 0.65); font-size: 12px; }

/* 响应式：4 列 → 2 列（平板和手机都是 2 列） */
@media (max-width: 1100px) {
  .siteGrid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 700px) {
  .masthead { padding: 14px 18px; }
  .brandText small { display: none; }
  .hostStatus { font-size: 12px; padding: 4px 10px 4px 2px; }
  .hostStat { padding: 0 8px; gap: 4px; }
  .hostStat b { display: none; }
  .hostPill { padding-left: 8px; gap: 6px; }
  .hero { padding: 48px 18px 36px; min-height: calc(100vh - 70px); }
  .heroCoordinates { margin-top: 40px; font-size: 10px; letter-spacing: 3px; }
  .recentRail, .controlDeck, .library { padding-left: 14px; padding-right: 14px; }
  .siteGrid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .siteCard { padding: 14px; border-radius: 14px; gap: 10px; }
  .cardMark { width: 38px; height: 38px; border-radius: 10px; font-size: 14px; }
  .siteCard h3 { font-size: 16px; }
  .siteCard .desc {
    font-size: 13px; min-height: auto; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .cardTags { display: none; }
  .cardMeta { font-size: 12px; padding-top: 10px; }
  .openBtn { padding: 9px 16px; font-size: 14px; margin-top: 4px; border-radius: 10px; }
  .sectionHeading { align-items: flex-start; }
}
