:root {
  --bg: #FBF3E6;
  --surface: #FEF9F0;
  --primary: #B8862E;
  --accent: #E08A3C;
  --text: #3D2E24;
  --muted: #7A6A5A;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 6px rgba(61, 46, 36, 0.06);
  --shadow-md: 0 6px 18px rgba(61, 46, 36, 0.10);
  --shadow-lg: 0 12px 32px rgba(61, 46, 36, 0.14);
  --font-heading: 'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'Hiragino Sans GB', 'PingFang SC', sans-serif;
}

* { 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: 14px;
  line-height: 1.7;
  background-image: radial-gradient(rgba(184, 134, 46, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

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

/* ============ Header ============ */
.header {
  background: var(--surface);
  border-bottom: 1px solid rgba(184, 134, 46, 0.18);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

.logo img { 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(--muted);
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav a:hover { color: var(--primary); background: rgba(224, 138, 60, 0.10); }

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid rgba(184, 134, 46, 0.25);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 138, 60, 0.15);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 150px;
  padding: 4px 0;
}

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

.search-box button {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  transition: background .2s;
}

.search-box button:hover { background: var(--accent); }

/* ============ Hero 轮播 ============ */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #2a2018;
}

.hero-slide {
  position: relative;
  display: block;
  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.04); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 22, 16, 0.88) 0%, rgba(30, 22, 16, 0.25) 45%, transparent 75%);
}

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

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

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

.btn {
  display: inline-block;
  padding: 9px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(224, 138, 60, 0.4);
  transition: transform .2s, background .2s;
}

.btn:hover { background: var(--primary); transform: translateY(-2px); }

/* ============ Section ============ */
.sec { margin: 40px 0; }

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(184, 134, 46, 0.35);
}

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

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

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

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

/* ============ Grid / Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 10px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff8e8;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(61, 46, 36, 0.35);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

/* ============ Cat 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: 14px 18px;
  background: var(--surface);
  border: 1px solid rgba(184, 134, 46, 0.18);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

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

.cat-item span:first-child { font-weight: 600; color: var(--text); }

.cat-count {
  font-size: 12px;
  color: var(--primary);
  background: rgba(224, 138, 60, 0.12);
  padding: 1px 9px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dashed rgba(184, 134, 46, 0.28);
  transition: background .2s;
}

.rank-item:hover { background: rgba(224, 138, 60, 0.06); }

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(184, 134, 46, 0.10);
  border-radius: 8px;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff8e8;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

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

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

/* ============ Detail ============ */
.detail {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
  margin: 28px 0;
}

.detail-head {
  display: flex;
  gap: 28px;
  margin-bottom: 24px;
}

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

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

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

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

.detail-meta p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--muted);
}

.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--accent);
  margin: 10px 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.detail-score small { font-size: 14px; color: var(--muted); }

.detail-body {
  border-top: 1px dashed rgba(184, 134, 46, 0.35);
  padding-top: 22px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}

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

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

/* ============ Tag ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(184, 134, 46, 0.10);
  border: 1px solid rgba(184, 134, 46, 0.22);
  border-radius: 999px;
  transition: background .2s, color .2s;
}

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

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

.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 rgba(184, 134, 46, 0.25);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: background .2s, color .2s, border-color .2s;
}

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

.pg.current {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff8e8;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(224, 138, 60, 0.4);
}

.pg.disabled {
  color: var(--muted);
  opacity: .5;
  pointer-events: none;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 14px;
  background: var(--surface);
  border: 1px dashed rgba(184, 134, 46, 0.3);
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}

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

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  background: var(--surface);
  border-top: 1px solid rgba(184, 134, 46, 0.18);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

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

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

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

/* ============ Highlight ============ */
.hl {
  color: var(--accent);
  background: rgba(224, 138, 60, 0.15);
  border-radius: 4px;
  padding: 0 2px;
  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 14px; }

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

  .logo { font-size: 20px; }

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

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

  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 18px 0; border-radius: var(--radius-sm); }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 16px 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }
  .btn { padding: 7px 18px; font-size: 13px; }

  .sec { margin: 26px 0; }
  .sec-title { font-size: 20px; }

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

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

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

  .detail { padding: 18px; margin: 18px 0; }
  .detail-head { flex-direction: column; gap: 18px; }
  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: flex; justify-content: center; }
  .detail-body { font-size: 13px; }

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

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