:root {
  --bg: #F3ECE2;
  --surface: #FBF7F0;
  --primary: #1F6E68;
  --accent: #C13B2E;
  --text: #2A2723;
  --muted: #8B8175;
  --radius: 14px;
  --line: rgba(42, 39, 35, 0.12);
  --gold: linear-gradient(90deg, #C9A24B, #E8D9A8, #C9A24B);
  --glass: rgba(251, 247, 240, 0.72);
  --shadow: 0 6px 24px rgba(42, 39, 35, 0.08);
  --font-heading: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(rgba(42, 39, 35, 0.025) 1px, transparent 1px);
  background-size: 6px 6px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

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

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

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

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

.logo::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 2px;
  background: var(--gold);
  border-radius: 2px;
}

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

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

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

.nav a:hover {
  background: rgba(31, 110, 104, 0.1);
  color: var(--primary);
}

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

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

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 110, 104, 0.12);
}

.search-box button {
  padding: 8px 18px;
  font-size: 14px;
  font-family: var(--font-body);
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.search-box button:hover { opacity: 0.88; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 26px;
  font-size: 14px;
  font-family: var(--font-body);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(193, 59, 46, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(193, 59, 46, 0.36);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px auto 0;
  max-width: 1200px;
  padding: 0 24px;
}

.hero-slide {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

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

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

.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: 48px auto;
  max-width: 1200px;
  padding: 0 24px;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  position: relative;
}

.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--line);
}

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

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

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

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

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 10px rgba(42, 39, 35, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(42, 39, 35, 0.14);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(193, 59, 46, 0.4);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 18px 10px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(42, 39, 35, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cat-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}

.cat-item .cat-name,
.cat-item span:first-child {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--text);
}

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

/* ---------- Rank list ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.rank-item:hover { background: rgba(31, 110, 104, 0.07); }

.rank-num {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  color: var(--muted);
}

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

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

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

/* ---------- Detail ---------- */
.detail {
  margin: 32px auto;
  max-width: 1200px;
  padding: 0 24px;
}

.detail-head {
  display: flex;
  gap: 32px;
  padding: 28px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(42, 39, 35, 0.18);
}

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

.detail-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-meta h1 {
  font-size: 28px;
  line-height: 1.4;
}

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

.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-block;
  align-self: flex-start;
  margin: 4px 0 8px;
  padding: 4px 16px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(193, 59, 46, 0.08);
  border: 1px solid rgba(193, 59, 46, 0.25);
  border-radius: 999px;
}

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

.detail-body h2,
.detail-body h3 {
  margin: 20px 0 10px;
  font-size: 20px;
}

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

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(31, 110, 104, 0.08);
  border: 1px solid rgba(31, 110, 104, 0.2);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

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

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 40px 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 var(--line);
  border-radius: 10px;
  transition: all 0.2s 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(31, 110, 104, 0.3);
}

.pg.disabled {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  opacity: 0.5;
  pointer-events: none;
}

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

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

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

/* ---------- Crumbs ---------- */
.crumbs {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 36px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

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

.footer::before {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  margin: 0 auto 18px;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- Highlight ---------- */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(193, 59, 46, 0.1);
  border-radius: 3px;
  padding: 0 2px;
}

/* ---------- 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 {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo { font-size: 19px; }

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

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

  .search-box { margin-left: auto; }

  .search-box input { width: 130px; }

  .hero { margin-top: 18px; padding: 0 16px; }

  .hero-slide { aspect-ratio: 16 / 10; }

  .hero-info { padding: 32px 20px 20px; }

  .hero-info h2 { font-size: 20px; }

  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .sec { margin: 32px auto; padding: 0 16px; }

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

  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }

  .cat-list { grid-template-columns: repeat(3, 1fr); }

  .detail { padding: 0 16px; }

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

  .detail-cover {
    width: 160px;
    align-self: center;
  }

  .detail-meta h1 { font-size: 22px; }

  .detail-body { padding: 18px; font-size: 14px; }

  .crumbs { padding: 0 16px; }

  .footer { padding: 28px 16px; }
}

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