/* chigua.ltd — 清爽榜单风（日/周/月） */
:root {
  --bg: #eef3f8;
  --ink: #142033;
  --muted: #5a6b82;
  --line: rgba(20, 32, 51, 0.1);
  --brand: #0d9f6e;
  --brand-dark: #0a7d57;
  --surface: #ffffff;
  --rank1: #0d9f6e;
  --rank2: #1f8fbf;
  --rank3: #c47a1a;
  --radius: 16px;
  --max: 880px;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Avenir Next Condensed", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.65;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(13, 159, 110, 0.12), transparent 55%),
    radial-gradient(700px 360px at 0% 20%, rgba(31, 143, 191, 0.1), transparent 50%),
    linear-gradient(180deg, #f5f8fc 0%, var(--bg) 50%, #e6edf5 100%);
}
img, video { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  color: inherit; text-decoration: none; font-family: var(--display); font-weight: 700;
}
.brand:hover { text-decoration: none; color: inherit; }
.brand-mark { font-size: 1.35rem; color: var(--brand); letter-spacing: -0.02em; }
.brand-sub { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.9rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 26px 18px 48px; }

.hero {
  margin-bottom: 18px;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(20, 32, 51, 0.04);
}
.hero h1 {
  margin: 0 0 6px; font-family: var(--display);
  font-size: clamp(1.45rem, 3.5vw, 1.95rem); font-weight: 750; line-height: 1.3;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-lead { margin: 0; color: var(--muted); font-size: 0.95rem; }

.hub-block { margin: 20px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.more-link { font-size: 0.84rem; color: var(--muted); }
.more-link:hover { color: var(--brand); }
.hub-status { margin: 0 0 10px; font-size: 0.8rem; color: var(--muted); }

.period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: rgba(20, 32, 51, 0.05);
  border-radius: 999px;
}
.period-tabs button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 0.86rem; font-weight: 600; padding: 7px 14px;
  border-radius: 999px; cursor: pointer;
}
.period-tabs button.is-active {
  background: var(--surface); color: var(--brand);
  box-shadow: 0 2px 8px rgba(20, 32, 51, 0.08);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip, .chip-link {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 0.84rem; padding: 6px 12px;
  border-radius: 999px; cursor: pointer; text-decoration: none; line-height: 1.3;
}
.chip:hover, .chip-link:hover { border-color: rgba(13, 159, 110, 0.4); color: var(--brand); text-decoration: none; }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.search-bar { display: flex; gap: 8px; }
.search-bar input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 16px; font: inherit; background: #fff; color: var(--ink);
}
.search-bar input:focus { outline: 2px solid rgba(13, 159, 110, 0.3); border-color: var(--brand); }
.search-bar button {
  border: 0; border-radius: 999px; padding: 0 18px; background: var(--brand); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.search-bar button:hover { background: var(--brand-dark); }

.gallery-block { margin: 20px 0; }
.badge {
  font-size: 0.72rem; color: var(--brand-dark); background: rgba(13, 159, 110, 0.1);
  border: 1px solid rgba(13, 159, 110, 0.2); padding: 3px 9px; border-radius: 999px;
}
.thumb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thumb-card {
  position: relative; margin: 0; padding: 0; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; cursor: pointer; background: #142033; aspect-ratio: 1;
  box-shadow: 0 8px 20px rgba(20, 32, 51, 0.06);
}
.thumb-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.thumb-hint {
  position: absolute; left: 8px; bottom: 8px; font-size: 0.7rem; font-weight: 700;
  color: #fff; background: var(--brand); padding: 3px 8px; border-radius: 999px; pointer-events: none;
}
.thumb-card:hover img { transform: scale(1.05); }
.media-empty {
  padding: 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface);
}

.hot-list {
  list-style: none; margin: 0; padding: 6px 0; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  box-shadow: 0 12px 28px rgba(20, 32, 51, 0.05); overflow: hidden;
}
.hot-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.hot-item:last-child { border-bottom: 0; }
.hot-rank {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 8px; font-weight: 800; font-size: 0.82rem;
  background: rgba(20, 32, 51, 0.06); color: var(--muted);
}
.hot-item:nth-child(1) .hot-rank { background: rgba(13, 159, 110, 0.15); color: var(--rank1); }
.hot-item:nth-child(2) .hot-rank { background: rgba(31, 143, 191, 0.15); color: var(--rank2); }
.hot-item:nth-child(3) .hot-rank { background: rgba(196, 122, 26, 0.15); color: var(--rank3); }
.hot-title { color: var(--ink); text-decoration: none; font-size: 0.94rem; line-height: 1.45; padding-top: 3px; }
.hot-title:hover { color: var(--brand); }
.hot-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 0.72rem; color: var(--muted); white-space: nowrap; padding-top: 4px;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.img-lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 24px; background: rgba(10, 16, 28, 0.88);
}
.img-lightbox[hidden] { display: none !important; }
.img-lightbox img { max-width: min(960px, 100%); max-height: 88vh; object-fit: contain; border-radius: 12px; }
.img-lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0;
  border-radius: 50%; background: rgba(255,255,255,0.16); color: #fff; font-size: 1.4rem; cursor: pointer;
}

.site-footer { border-top: 1px solid var(--line); background: rgba(255,255,255,0.7); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 28px 18px 36px; display: grid; gap: 14px; }
.footer-brand { font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.footer-brand span { color: var(--brand); }
.footer-links, .footer-contacts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.88rem; }
.footer-links a, .footer-contacts a { color: var(--muted); }
.footer-links a:hover, .footer-contacts a:hover { color: var(--brand); }
.footer-note { margin: 0; font-size: 0.8rem; color: var(--muted); }

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-sub { display: none; }
  .hot-item { grid-template-columns: 32px 1fr; }
  .hot-meta { grid-column: 2; flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .search-bar { flex-direction: column; }
  .search-bar button { padding: 12px 16px; }
}
