:root {
  --bg: #F2F4F5;
  --surface: #FFFFFF;
  --primary: #4A6B7A;
  --accent: #C84B31;
  --text: #1E2A32;
  --muted: #7A8B94;
  --radius: 8px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: #DDE3E6;
  --wrap: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(74,107,122,.025) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(74,107,122,.02) 0 1px, transparent 1px 4px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; border: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.35; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Header ============ */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { color: var(--accent); }
.logo img { max-height: 36px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  border-radius: var(--radius);
  position: relative;
}
.nav a:hover,
.nav a.active { color: var(--accent); }

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color .2s ease;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  width: 170px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 8px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color .2s ease;
}
.search-box button:hover { color: var(--accent); }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 9px 22px;
  font-size: 14px;
  font-family: var(--font-body);
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary); color: #fff; }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary);
}
.hero-slide {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.hero-slide:hover img { transform: scale(1.03); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,42,50,.78) 0%, rgba(30,42,50,.35) 45%, rgba(30,42,50,0) 75%);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px 44px;
  max-width: 560px;
  color: #fff;
}
.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  color: #fff;
}
.hero-info p {
  font-size: 14px;
  color: rgba(255,255,255,.82);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .btn { background: var(--accent); border-color: var(--accent); }
.hero-info .btn:hover { background: #fff; color: var(--accent); border-color: #fff; }

/* ============ Section ============ */
.sec { margin: 44px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-size: 22px;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); }

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px 20px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 34px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  line-height: 1.6;
}
.card-info { padding: 10px 10px 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.card:hover .card-title { color: var(--accent); }
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Categories ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text);
  transition: border-color .2s ease, color .2s ease;
}
.cat-item:hover { border-color: var(--accent); color: var(--accent); }
.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 1px 10px;
  border-radius: 20px;
}

/* ============ Rank ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.rank-num {
  flex-shrink: 0;
  width: 26px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}
.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }
.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--accent); }
.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ============ Detail ============ */
.detail { margin: 32px 0 48px; }
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { min-width: 0; }
.detail-meta h1 {
  font-size: 30px;
  color: var(--text);
  margin-bottom: 6px;
}
.detail-meta .subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
}
.detail-score strong { font-family: var(--font-heading); font-size: 26px; line-height: 1; }
.detail-score span { font-size: 12px; color: var(--muted); }
.detail-meta .info-list { font-size: 14px; }
.detail-meta .info-list li {
  display: flex;
  gap: 10px;
  padding: 4px 0;
}
.detail-meta .info-list .label { flex-shrink: 0; width: 56px; color: var(--muted); }
.detail-meta .info-list .value { color: var(--text); }
.detail-body {
  padding: 32px 0 8px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.detail-body p { margin-bottom: 14px; color: #3A4A54; }
.detail-body img { border-radius: var(--radius); margin: 12px 0; }

/* ============ Tags ============ */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: all .2s ease;
}
.tag:hover { color: #fff; background: var(--primary); border-color: var(--primary); }

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 8px;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s ease;
}
.pg:hover { color: var(--accent); border-color: var(--accent); }
.pg.current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.pg.disabled {
  color: var(--muted);
  background: var(--bg);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--accent); }

/* ============ Crumbs ============ */
.crumbs {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; }

/* ============ Footer ============ */
.footer {
  margin-top: 56px;
  padding: 32px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ============ Highlight ============ */
.hl { color: var(--accent); font-style: normal; font-weight: 600; }

/* ============ Responsive ============ */
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 120px; }

  .hero { margin: 16px 0 4px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-slide::after { background: linear-gradient(0deg, rgba(30,42,50,.82) 0%, rgba(30,42,50,.25) 60%, transparent 100%); }
  .hero-info { padding: 20px 18px; max-width: 100%; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; margin-bottom: 12px; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 18px; }
  .sec-head { margin-bottom: 16px; padding-bottom: 10px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .card-info { padding: 8px 8px 10px; }
  .card-title { font-size: 14px; }

  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-item { padding: 12px 14px; font-size: 14px; }

  .rank-list { grid-template-columns: 1fr; gap: 0; }
  .rank-item { padding: 11px 0; }

  .detail { margin: 20px 0 32px; }
  .detail-head { grid-template-columns: 1fr; gap: 18px; }
  .detail-cover { max-width: 200px; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 20px 0 4px; font-size: 14px; }

  .pager { margin: 28px 0 4px; gap: 6px; }
  .pg { min-width: 34px; height: 34px; padding: 0 9px; font-size: 13px; }

  .footer { margin-top: 36px; padding: 24px 0; }
}