:root {
  --bg: #F9F5ED;
  --surface: rgba(255, 253, 248, 0.72);
  --primary: #D96C4A;
  --accent: #5B8C7A;
  --text: #2E2A26;
  --muted: #8A7E72;
  --radius: 18px;
  --font-heading: 'ZCOOL KuaiLe', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow-soft: 0 8px 24px rgba(46, 42, 38, 0.08), 0 2px 6px rgba(46, 42, 38, 0.05);
  --shadow-float: 0 14px 36px rgba(46, 42, 38, 0.14), 0 4px 10px rgba(46, 42, 38, 0.07);
  --border-hl: rgba(255, 255, 255, 0.65);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(217, 108, 74, 0.16), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(91, 140, 122, 0.16), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(217, 108, 74, 0.10), transparent 55%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hl);
  box-shadow: 0 4px 18px rgba(46, 42, 38, 0.06);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 66px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--primary);
  letter-spacing: 1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.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 {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.nav a:hover {
  background: rgba(217, 108, 74, 0.12);
  color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-hl);
  border-radius: 999px;
  padding: 4px 6px 4px 14px;
  box-shadow: inset 0 1px 3px rgba(46, 42, 38, 0.05);
}
.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-body);
  transition: opacity .2s;
}
.search-box button:hover { opacity: .88; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s, opacity .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-float); opacity: .94; }
.btn.ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border: 1px solid var(--border-hl);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 26px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  box-shadow: var(--shadow-soft);
}

.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(90deg, rgba(46, 42, 38, 0.72) 0%, rgba(46, 42, 38, 0.28) 45%, transparent 75%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 30px 34px;
  max-width: 62%;
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.hero-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.sec-title {
  font-family: var(--font-heading);
  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: 6px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.sec-more {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hl);
  background: var(--surface);
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); border-color: var(--primary); }

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

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

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(46, 42, 38, 0.06);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: rgba(217, 108, 74, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(46, 42, 38, 0.25);
  backdrop-filter: blur(4px);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  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(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  transition: transform .25s, color .25s, box-shadow .25s;
}
.cat-item:hover {
  transform: translateY(-3px);
  color: var(--primary);
  box-shadow: var(--shadow-float);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(91, 140, 122, 0.12);
  padding: 2px 9px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s;
}
.rank-item:hover { transform: translateX(4px); box-shadow: var(--shadow-float); }

.rank-num {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #E8A33D, #D96C4A); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #9AA7B0, #5B8C7A); }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #C98A5E, #A96A44); }

.rank-title {
  flex: 1;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-float);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  color: var(--text);
}
.detail-meta .sub { font-size: 15px; color: var(--muted); }
.detail-meta p { font-size: 14px; color: var(--text); }
.detail-meta p span { color: var(--muted); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 34px;
  color: var(--primary);
  line-height: 1;
}
.detail-score small { font-size: 14px; color: var(--muted); font-family: var(--font-body); }

.detail-body {
  margin-top: 26px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 18px 0 10px;
  color: var(--primary);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: 12px; margin: 12px 0; }

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

.tag {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(91, 140, 122, 0.12);
  color: var(--accent);
  border: 1px solid rgba(91, 140, 122, 0.22);
  transition: background .2s, color .2s;
}
.tag:hover { background: var(--accent); color: #fff; }

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

.pg {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  transition: transform .2s, color .2s, background .2s;
}
.pg:hover { transform: translateY(-2px); color: var(--primary); }
.pg.current {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-float);
}
.pg.disabled {
  opacity: .45;
  pointer-events: none;
  box-shadow: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border-hl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.link-item:hover { color: var(--primary); background: rgba(217, 108, 74, 0.10); }

/* ---------- Crumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 4px;
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(217, 108, 74, 0.14);
  border-radius: 4px;
  padding: 0 2px;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 34px 0 28px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-hl);
  box-shadow: 0 -4px 18px rgba(46, 42, 38, 0.05);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer p { margin: 2px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero-info { max-width: 80%; padding: 24px; }
  .hero-info h2 { font-size: 24px; }
}

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

  .header .wrap {
    gap: 10px;
    min-height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 7px 12px; font-size: 14px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 96px; }

  .hero { margin: 18px 0; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { max-width: 100%; padding: 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 18px; font-size: 14px; }

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

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .card-info { padding: 10px 10px 12px; }
  .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; }

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

  .pg { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }

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