:root {
  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --primary: #D42B2B;
  --accent: #F4C430;
  --text: #2B2420;
  --muted: #8A7F76;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(43, 36, 32, 0.06);
  --shadow-hover: 0 8px 24px rgba(43, 36, 32, 0.12);
  --border: rgba(43, 36, 32, 0.08);
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Songti SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', sans-serif;
}

* { 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.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font-family: inherit; font-size: inherit; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

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

.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 {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all .2s ease;
}

.nav a:hover {
  color: var(--primary);
  background: rgba(212, 43, 43, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  box-shadow: var(--shadow);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 150px;
  color: var(--text);
  font-size: 14px;
}

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

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

.search-box button:hover { background: #b92222; }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #f8e9e0, #fdf6e3);
  box-shadow: var(--shadow);
}

.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(20, 15, 12, 0.78) 0%, rgba(20, 15, 12, 0.15) 55%, transparent 100%);
}

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

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 43, 43, 0.3);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.28); }

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

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .3px;
  position: relative;
  padding-left: 16px;
}

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

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

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

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

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

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

.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: 10px;
  right: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(20, 15, 12, 0.62);
  backdrop-filter: blur(6px);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  white-space: nowrap;
  overflow: hidden;
}

/* ============ Cat 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: 8px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s ease;
}

.cat-item:hover {
  color: var(--primary);
  border-color: rgba(212, 43, 43, 0.3);
  transform: translateY(-2px);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(43, 36, 32, 0.05);
  padding: 1px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--border);
  transition: all .2s ease;
}

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

.rank-num {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  color: var(--muted);
  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;
  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 0 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 32px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  background: linear-gradient(135deg, #f3e9e2, #faf3e6);
}

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

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 16px;
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.detail-score small {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

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

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

.detail-body {
  padding: 28px 32px 32px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.9;
  color: #4a4038;
}

.detail-body p { margin-bottom: 14px; }
.detail-body img { border-radius: var(--radius-sm); margin: 14px 0; }

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(212, 43, 43, 0.06);
  border: 1px solid rgba(212, 43, 43, 0.14);
  color: var(--primary);
  font-size: 12px;
  transition: all .2s ease;
}

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

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all .2s ease;
}

.pg:hover {
  color: var(--primary);
  border-color: rgba(212, 43, 43, 0.3);
  transform: translateY(-1px);
}

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(212, 43, 43, 0.3);
}

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

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

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

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

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

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

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

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

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(244, 196, 48, 0.22);
  border-radius: 3px;
  padding: 0 2px;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; padding: 24px; }
  .detail-meta h1 { font-size: 24px; }
}

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

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

  .logo { font-size: 20px; }

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

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

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

  .hero { margin: 16px 0 28px; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .sec { margin-bottom: 32px; }
  .sec-title { font-size: 19px; }

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

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

  .rank-list { grid-template-columns: 1fr; gap: 0; }
  .rank-item { padding: 10px 2px; }

  .detail { margin: 16px 0 32px; }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .detail-cover { max-width: 180px; margin: 0 auto; }
  .detail-meta h1 { font-size: 21px; margin-bottom: 10px; }
  .detail-score { font-size: 26px; margin-bottom: 10px; }
  .detail-body { padding: 18px; font-size: 14px; }

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

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