:root {
  --bg: #F5F0E6;
  --surface: #FBF7EE;
  --primary: #8A6A3B;
  --accent: #B8860B;
  --text: #2E2A24;
  --muted: #7A7265;
  --radius: 12px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow-light: rgba(255, 255, 255, 0.85);
  --shadow-dark: rgba(138, 106, 59, 0.14);
  --line: rgba(138, 106, 59, 0.16);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(184, 134, 11, 0.05), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(138, 106, 59, 0.05), transparent 46%);
  background-attachment: fixed;
}

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

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(138, 106, 59, 0.06);
}

.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(--primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
  transition: all .25s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--surface);
  box-shadow:
    3px 3px 8px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
}

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

.search-box input {
  width: 180px;
  height: 38px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: all .25s ease;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.search-box input::placeholder { color: var(--muted); opacity: .7; }

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light), 0 0 0 3px rgba(184, 134, 11, 0.12);
}

.search-box button {
  height: 38px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 8px var(--shadow-dark);
  transition: transform .2s ease, box-shadow .2s ease;
}

.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 3px 4px 12px rgba(138, 106, 59, 0.28);
}

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

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 25, 18, 0.88) 0%, rgba(30, 25, 18, 0.35) 45%, transparent 75%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px 40px;
  color: #FBF7EE;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 26px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #FBF7EE;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border: 1px solid rgba(251, 247, 238, 0.25);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform .25s ease, box-shadow .25s ease;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

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

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

.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.sec-title {
  font-size: 22px;
  color: var(--primary);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-title::before {
  content: "";
  width: 6px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

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

.sec-more:hover { color: var(--accent); transform: translateX(3px); }

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

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

.card:hover {
  transform: translateY(-5px);
  box-shadow:
    8px 10px 24px rgba(138, 106, 59, 0.22),
    -6px -6px 18px var(--shadow-light);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #EDE6D8, #F5F0E6);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .6s ease;
  pointer-events: none;
}

.card:hover .card-cover::after { transform: translateX(120%); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 9px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #FBF7EE;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card:hover .card-title { color: var(--primary); }

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta span + span::before {
  content: "·";
  margin-right: 6px;
  color: var(--line);
}

/* ===== Cat List ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    3px 3px 10px var(--shadow-dark),
    -3px -3px 10px var(--shadow-light);
  transition: transform .25s ease, box-shadow .25s ease;
}

.cat-item:hover {
  transform: translateY(-3px);
  box-shadow:
    6px 8px 18px rgba(138, 106, 59, 0.2),
    -4px -4px 14px var(--shadow-light);
}

.cat-item .cat-name,
.cat-item span:first-child {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  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: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    3px 3px 9px var(--shadow-dark),
    -3px -3px 9px var(--shadow-light);
  transition: transform .25s ease;
}

.rank-item:hover { transform: translateX(4px); }

.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: var(--bg);
  border-radius: 8px;
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #FBF7EE;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 2px 8px rgba(138, 106, 59, 0.3);
}

.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== Detail ===== */
.detail {
  margin: 32px 0 48px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    8px 8px 24px var(--shadow-dark),
    -8px -8px 24px var(--shadow-light);
}

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #EDE6D8, #F5F0E6);
  box-shadow:
    5px 5px 16px var(--shadow-dark),
    -5px -5px 16px var(--shadow-light);
}

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

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.detail-meta h1 {
  font-size: 28px;
  color: var(--primary);
  letter-spacing: 1px;
}

.detail-meta p {
  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;
  align-self: flex-start;
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #FBF7EE;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(138, 106, 59, 0.3);
}

.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

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

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

/* ===== Tag List ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 15px;
  font-size: 13px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow:
    2px 2px 6px var(--shadow-dark),
    -2px -2px 6px var(--shadow-light);
  transition: all .25s ease;
}

.tag:hover {
  color: #FBF7EE;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(138, 106, 59, 0.28);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow:
    3px 3px 8px var(--shadow-dark),
    -3px -3px 8px var(--shadow-light);
  transition: all .25s ease;
}

.pg:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow:
    5px 6px 14px rgba(138, 106, 59, 0.2),
    -4px -4px 12px var(--shadow-light);
}

.pg.current {
  color: #FBF7EE;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(138, 106, 59, 0.32);
  cursor: default;
}

.pg.disabled {
  opacity: .45;
  pointer-events: none;
  box-shadow: none;
}

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

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

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

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(138, 106, 59, 0.04));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}

.footer a { color: var(--primary); }
.footer a:hover { color: var(--accent); }

/* ===== Crumbs ===== */
.crumbs {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--line); }

/* ===== Highlight ===== */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(184, 134, 11, 0.12);
  border-radius: 4px;
  padding: 0 2px;
}

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

@media (max-width: 768px) {
  body { font-size: 14px; }

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

  .logo { font-size: 19px; order: 1; }

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

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

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

  .hero { margin: 18px 0 26px; border-radius: 10px; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 18px 20px; }
  .hero-info h2, .hero-info h3 { font-size: 20px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 20px; font-size: 13px; margin-top: 10px; }

  .sec { margin-bottom: 32px; }
  .sec-title { font-size: 18px; }
  .sec-more { font-size: 12px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .card-info { padding: 8px 9px 10px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }
  .card-score { font-size: 12px; padding: 2px 7px; top: 6px; right: 6px; }

  .cat-list { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-item { padding: 12px 6px; }
  .cat-item .cat-name, .cat-item span:first-child { font-size: 13px; }
  .cat-count { font-size: 11px; }

  .rank-list { grid-template-columns: 1fr; gap: 10px; }
  .rank-item { padding: 9px 12px; }
  .rank-title { font-size: 13px; }

  .detail { padding: 18px; margin: 20px 0 32px; border-radius: 10px; }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .detail-cover { max-width: 180px; margin: 0 auto; }
  .detail-meta h1 { font-size: 21px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { align-self: center; font-size: 17px; }
  .detail-body { font-size: 14px; }

  .tag { font-size: 12px; padding: 4px 12px; }

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

  .links { gap: 8px 14px; padding: 16px 0; }
  .link-item { font-size: 12px; }

  .footer { margin-top: 32px; padding: 24px 0 30px; font-size: 12px; }

  .crumbs { padding: 14px 0 0; font-size: 12px; }
}

@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
  .search-box input { width: 100px; }
}