:root {
  --bg-deep: #0a0a0c;
  --bg-panel: #121218;
  --text: #e8e8ec;
  --text-muted: #9a9aa8;
  --accent: #e63946;
  --accent-soft: #ff5c6c;
  --gold: #f4a261;
  --blue-cta: #3a86ff;
  --orange-cta: #fb8500;
  --card-border: rgba(255,255,255,0.12);
  --radius: 14px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(230,57,70,0.15), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 100%, rgba(58,134,255,0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header__bar {
  max-width: none;
  margin: 0;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(12px, 2vw, 24px);
  padding: 0 clamp(16px, 4vw, 40px);
  width: 100%;
  position: relative;
  box-sizing: border-box;
}
.site-header__bar .logo {
  grid-column: 1;
  flex-shrink: 0;
  justify-self: start;
}
.site-header__bar .main-nav {
  grid-column: 2;
  flex: unset;
  justify-content: center;
  justify-self: center;
  flex-wrap: wrap;
  min-width: 0;
}
.site-header__bar .search-wrap,
.site-header__bar .nav-toggle {
  flex-shrink: 0;
}
.site-header__bar .search-wrap {
  grid-column: 3;
  justify-self: end;
}
.site-header__bar .nav-toggle {
  grid-column: 3;
  justify-self: end;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.logo-cn {
  font-size: 1.35rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}
.logo-en {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e62117;
  letter-spacing: 0.04em;
  text-shadow: none;
}

.main-nav {
  display: flex;
  gap: clamp(16px, 2.5vw, 36px);
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a {
  color: var(--text);
  opacity: 0.9;
  transition: color 0.2s, opacity 0.2s;
}
.main-nav a:hover {
  color: var(--accent-soft);
  opacity: 1;
}
.main-nav a.is-active,
.main-nav a[aria-current="page"] {
  color: #fff;
  opacity: 1;
  position: relative;
}
.main-nav a.is-active::after,
.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 1px;
  background: #e62117;
}
@media (max-width: 900px) {
  .main-nav a.is-active::after,
  .main-nav a[aria-current="page"]::after {
    display: none;
  }
}

.search-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.search-wrap__field {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap__icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 1;
}
.search-wrap__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.search-wrap input {
  width: min(240px, 32vw);
  height: 40px;
  padding: 0 12px 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px 0 0 10px;
  background: #1a1a1e;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
}
.search-wrap input::placeholder { color: #7a7a86; }
.search-wrap button {
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 0 10px 10px 0;
  background: #e62117;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(230, 33, 23, 0.5);
  border-left: none;
  transition: filter 0.2s, background 0.2s;
}
.search-wrap button:hover { filter: brightness(1.08); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 2vw, 24px);
  }
  .site-header__bar .main-nav {
    justify-self: unset;
    flex: unset;
  }
  .site-header__bar .search-wrap {
    justify-self: unset;
  }
  .main-nav, .search-wrap { display: none; }
  .nav-toggle { display: block; }
  .site-header.mobile-open .main-nav,
  .site-header.mobile-open .search-wrap {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    background: rgba(8, 8, 10, 0.98);
    border-bottom: 1px solid var(--card-border);
    gap: 12px;
    z-index: 99;
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .site-header.mobile-open .main-nav { justify-content: flex-start; }
  .site-header.mobile-open .search-wrap__field { width: 100%; }
  .site-header.mobile-open .search-wrap input { width: 100%; border-radius: 10px; }
  .site-header.mobile-open .search-wrap button { border-radius: 10px; border-left: 1px solid rgba(230, 33, 23, 0.4); }
}

.site-footer {
  position: relative;
  margin-top: 40px;
  padding: clamp(56px, 10vw, 120px) 24px 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/hero-bg.png");
  background-size: cover;
  background-position: center 80%;
  filter: blur(28px) brightness(0.25);
  transform: scale(1.1);
  z-index: -2;
}
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, transparent 30%, rgba(10,10,12,0.92) 100%);
  z-index: -1;
}
.site-footer p { margin: 0.35rem 0; position: relative; z-index: 1; }
.site-footer__host {
  font-weight: 700;
  color: var(--text);
}
.site-footer time[data-seo-footer-refresh] {
  font-weight: 600;
  color: var(--text-muted);
}
.site-footer a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover { color: #ff8a95; }

/* 站群：脚本注入的实体蜘蛛网（交叉内链） */
.seo-spider-web {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: clamp(20px, 3.5vw, 36px) auto 0;
  padding: clamp(14px, 2.5vw, 18px) clamp(16px, 4vw, 28px);
  border-radius: 14px;
  border: 1px dashed rgba(230, 57, 70, 0.38);
  background: rgba(230, 57, 70, 0.07);
}
body.list-page .seo-spider-web {
  max-width: 1220px;
}
.seo-spider-web__label {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-soft);
  letter-spacing: 0.06em;
}
.seo-spider-web__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.seo-spider-web__links a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.seo-spider-web__links a:hover {
  color: var(--accent-soft);
  border-bottom-color: rgba(230, 57, 70, 0.5);
}

/* 卡片栅格：列表页等复用 */
.card-container {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2.5vw, 20px);
}
@media (max-width: 768px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
