:root {
  --bg: #FCFBF7;
  --surface: #FFFFFF;
  --primary: #C93A2B;
  --accent: #B58E4A;
  --text: #1F1D1A;
  --muted: #8C8478;
  --radius: 4px;
  --font-heading: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --line: rgba(181, 142, 74, 0.28);
  --line-soft: rgba(31, 29, 26, 0.08);
  --shadow: 0 6px 20px rgba(31, 29, 26, 0.06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(181, 142, 74, 0.05), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(201, 58, 43, 0.04), transparent 40%);
  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 .25s ease; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; border: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input { font-family: inherit; font-size: inherit; }

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

/* ============ Header ============ */
.header {
  background: rgba(252, 251, 247, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  white-space: nowrap;
  position: relative;
  padding-left: 14px;
}
.logo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  background: var(--primary);
  border-radius: 1px;
}
.logo:hover { color: var(--text); }

.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(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  width: 160px;
  color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .25s ease;
}
.search-box button:hover { background: #a92e21; }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 24px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.85) 0%, rgba(20, 18, 15, 0.15) 55%, transparent 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 640px;
  color: #fff;
  animation: scrollIn .6s ease both;
}
.hero-info h2 {
  font-size: 30px;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.hero-info p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@keyframes scrollIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-block;
  padding: 9px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 1px;
  border: 1px solid var(--primary);
  transition: all .25s ease;
}
.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(201, 58, 43, .12);
}

/* ============ Section ============ */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 2px;
  background: var(--primary);
}
.sec-title {
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #eee;
}
.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;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  box-shadow: 0 2px 6px rgba(201, 58, 43, .35);
}
.card-info { padding: 10px 12px 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ Category list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all .25s ease;
}
.cat-item:hover {
  border-color: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-heading);
}

/* ============ Rank list ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.rank-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-radius: var(--radius);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--primary);
  color: #fff;
}
.rank-title {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
}

/* ============ Detail ============ */
.detail {
  margin: 32px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.detail-head {
  display: flex;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.detail-meta p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}
.detail-meta p strong { color: var(--text); font-weight: 500; }
.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 12px 0;
}
.detail-body {
  padding-top: 28px;
  font-size: 15px;
  line-height: 1.9;
  color: #3a3733;
}
.detail-body h3 {
  font-size: 18px;
  margin: 24px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.detail-body p { margin: 0 0 14px; }

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(181, 142, 74, .06);
  transition: all .25s ease;
}
.tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--primary); }

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(181, 142, 74, .04);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

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

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  background: rgba(201, 58, 43, .08);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero-slide { min-height: 260px; }
  .hero-info { padding: 24px 20px; }
  .hero-info h2 { font-size: 22px; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 18px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
  .rank-list { grid-template-columns: 1fr; gap: 4px; }

  .detail { padding: 20px 16px; margin: 20px 0; }
  .detail-head { flex-direction: column; gap: 20px; }
  .detail-cover { width: 160px; }
  .detail-meta h1 { font-size: 22px; }

  .pager { gap: 6px; margin: 24px 0; }
  .pg { min-width: 32px; height: 32px; padding: 0 8px; font-size: 13px; }
}