:root {
  --bg: #F8F4EB;
  --surface: #FFFFFF;
  --primary: #C43A2E;
  --accent: #2B2B2B;
  --text: #1E1C18;
  --muted: #8A8378;
  --radius: 8px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --shadow: 0 2px 8px rgba(30, 28, 24, 0.06);
  --shadow-hover: 0 8px 24px rgba(30, 28, 24, 0.12);
  --line: rgba(138, 131, 120, 0.22);
}

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

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

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(30, 28, 24, 0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
ul, ol { list-style: none; }
button, input { font-family: inherit; font-size: inherit; }

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

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

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
  position: relative;
  padding-left: 14px;
}

.logo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
}

.logo img { max-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: 6px 12px;
  font-size: 14px;
  color: var(--text);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(196, 58, 46, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  width: 180px;
  color: var(--text);
}

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

.search-box button {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  cursor: pointer;
  transition: opacity .2s;
}

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--accent);
  aspect-ratio: 21 / 9;
  max-height: 480px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 18, 15, 0.85) 0%, rgba(20, 18, 15, 0.2) 55%, transparent 100%);
}

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

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

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

.btn {
  display: inline-block;
  padding: 9px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 1px;
  transition: transform .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(196, 58, 46, 0.35);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
}

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

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

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
}

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

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .5px;
  box-shadow: 0 2px 6px rgba(196, 58, 46, 0.4);
}

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

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

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

/* ---------- Category list ---------- */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  transition: border-color .2s, color .2s, transform .2s;
}

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

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(138, 131, 120, 0.12);
  padding: 0 6px;
  border-radius: 10px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

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

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

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

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

.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

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

.detail-head {
  display: flex;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

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

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

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: var(--accent);
}

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

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

.detail-score {
  display: inline-block;
  margin: 12px 0;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.detail-score::after {
  content: "分";
  font-size: 14px;
  margin-left: 4px;
  color: var(--muted);
}

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

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

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(196, 58, 46, 0.08);
  border: 1px solid rgba(196, 58, 46, 0.2);
  border-radius: 20px;
  transition: background .2s, color .2s;
}

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

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: 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 var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, color .2s, background .2s;
}

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

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.pg.disabled {
  color: var(--muted);
  background: rgba(138, 131, 120, 0.06);
  border-color: var(--line);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

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

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

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

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

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

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  background: rgba(196, 58, 46, 0.1);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

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

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

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

  .logo { font-size: 19px; }

  .nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

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

  .hero {
    aspect-ratio: 16 / 10;
    margin: 18px auto;
    border-radius: var(--radius);
  }

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

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

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

  .card-info { padding: 8px 10px 10px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }

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

  .detail { padding: 18px; margin: 20px 0; }

  .detail-head {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
  }

  .detail-cover { width: 160px; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { font-size: 14px; }

  .cat-item { font-size: 13px; padding: 6px 12px; }

  .pg { min-width: 34px; height: 34px; font-size: 13px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-info h2 { font-size: 17px; }
}