:root {
  --bg: #F7F4F0;
  --surface: #FFFFFF;
  --primary: #6B2D4E;
  --accent: #8B6B4A;
  --text: #2A1F1D;
  --muted: #8A7E78;
  --radius: 12px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(107, 45, 78, 0.12);
  --shadow-sm: 0 2px 8px rgba(42, 31, 29, 0.06);
  --shadow-md: 0 8px 24px rgba(42, 31, 29, 0.10);
  --shadow-glow: 0 12px 32px rgba(139, 107, 74, 0.18);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--primary); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0;
  letter-spacing: .02em;
}

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: .06em;
  flex-shrink: 0;
}

.logo img { height: 34px; 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: 8px 14px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  border-radius: 8px;
  transition: background .25s ease, color .25s ease;
}

.nav a:hover {
  background: rgba(107, 45, 78, 0.08);
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-box input {
  width: 190px;
  height: 38px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 107, 74, 0.12);
}

.search-box button {
  height: 38px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, transform .2s ease;
}

.search-box button:hover { background: #55223e; transform: translateY(-1px); }

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease, transform .2s ease;
}

.btn:hover {
  background: #55223e;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn.ghost:hover { background: rgba(107, 45, 78, 0.08); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  animation: fadeIn .6s ease;
}

.hero-slide.active,
.hero-slide:first-child { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 40px 32px;
  background: linear-gradient(to top, rgba(20, 12, 16, 0.88), rgba(20, 12, 16, 0));
  color: #fff;
}

.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-info p {
  margin: 0 0 16px;
  max-width: 640px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Section ---------- */
.sec { margin: 44px 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.sec-title {
  position: relative;
  font-size: 22px;
  color: var(--text);
  padding-left: 14px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .25s ease;
}

.sec-more:hover { color: var(--primary); }

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e9e3dc;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(107, 45, 78, 0.4);
}

.card-info {
  padding: 12px 12px 14px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Category list ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  color: var(--primary);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 28px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.rank-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(139, 107, 74, 0.10);
  border-radius: 50%;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff;
  background: var(--primary);
}

.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;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Detail ---------- */
.detail { margin: 32px 0; }

.detail-head {
  display: flex;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  min-width: 0;
}

.detail-meta h1 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--text);
}

.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-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 18px;
  padding: 6px 16px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(107, 45, 78, 0.3);
}

.detail-body {
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body h2,
.detail-body h3 {
  margin: 20px 0 10px;
  font-size: 19px;
  color: var(--primary);
}

.detail-body p { margin: 0 0 14px; }

/* ---------- Tags ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--accent);
  background: rgba(139, 107, 74, 0.10);
  border: 1px solid rgba(139, 107, 74, 0.22);
  border-radius: 999px;
  transition: background .25s ease, color .25s ease;
}

.tag:hover {
  color: #fff;
  background: var(--accent);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}

.pg {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all .25s ease;
}

.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.pg.current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(107, 45, 78, 0.28);
}

.pg.disabled {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  cursor: not-allowed;
  opacity: .55;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .25s ease;
}

.link-item:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  background: #241a1e;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.footer a { color: rgba(255, 255, 255, 0.82); }
.footer a:hover { color: #fff; }

.footer .links { justify-content: center; padding: 0; }
.footer .link-item { color: rgba(255, 255, 255, 0.6); }
.footer .link-item:hover { color: #fff; }

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  background: rgba(139, 107, 74, 0.18);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  .wrap { padding: 0 16px; }

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }

  .logo { font-size: 19px; }

  .nav {
    order: 3;
    width: 100%;
    flex: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav a { padding: 6px 12px; font-size: 13px; }

  .search-box { margin-left: auto; }
  .search-box input { width: 140px; height: 34px; font-size: 13px; }
  .search-box button { height: 34px; padding: 0 14px; font-size: 13px; }

  .hero { margin: 16px 0 4px; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 32px 18px 20px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

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

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

  .rank-list { grid-template-columns: 1fr; gap: 8px; }

  .detail-head {
    flex-direction: column;
    gap: 18px;
    padding: 18px;
  }

  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 21px; }
  .detail-body { padding: 18px; font-size: 14px; }

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

  .footer { margin-top: 40px; padding: 26px 0 22px; }
}