:root {
  --bg: #F7F2E9;
  --surface: #FBF7F0;
  --primary: #B33A2B;
  --accent: #C45A3D;
  --text: #2C2723;
  --muted: #8A8178;
  --radius: 20px;
  --font-heading: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-light: -6px -6px 14px rgba(255, 255, 255, 0.85);
  --shadow-dark: 6px 6px 16px rgba(44, 39, 35, 0.12);
  --shadow-soft: 0 8px 24px rgba(44, 39, 35, 0.08);
}

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

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

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

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 233, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 39, 35, 0.06);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
}

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

.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(179, 58, 43, 0.14);
}

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

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

.nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.22s ease;
}

.nav a:hover {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-light), var(--shadow-dark);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  box-shadow: inset 2px 2px 5px rgba(44, 39, 35, 0.08), inset -2px -2px 5px rgba(255, 255, 255, 0.9);
  min-width: 220px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  min-width: 0;
}

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

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

.search-box button:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

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

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  min-height: 280px;
  overflow: hidden;
  animation: heroFade 0.8s ease both;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-slide:hover img {
  transform: scale(1.03);
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 36px 32px;
  background: linear-gradient(to top, rgba(28, 24, 20, 0.82), rgba(28, 24, 20, 0));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-info h2,
.hero-info h3 {
  color: #fff;
  font-size: 30px;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(179, 58, 43, 0.32);
  transition: all 0.22s ease;
}

.btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(179, 58, 43, 0.4);
}

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

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(44, 39, 35, 0.08);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  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: var(--primary);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color 0.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);
  padding: 10px;
  box-shadow: var(--shadow-light), var(--shadow-dark);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: -8px -8px 18px rgba(255, 255, 255, 0.9), 10px 12px 26px rgba(44, 39, 35, 0.16);
}

.card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: calc(var(--radius) - 8px);
  overflow: hidden;
  background: #e8e1d5;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s 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 9px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(179, 58, 43, 0.4);
}

.card-info {
  padding: 10px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.card:hover .card-title {
  color: var(--primary);
}

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

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light), var(--shadow-dark);
  text-align: center;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
  position: relative;
}

.cat-item:hover {
  transform: translateY(-5px);
  box-shadow: -8px -8px 18px rgba(255, 255, 255, 0.9), 10px 12px 26px rgba(44, 39, 35, 0.16);
}

.cat-item::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.65;
}

.cat-item h3,
.cat-item span:first-child {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--text);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px 14px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light), var(--shadow-dark);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-item:hover {
  transform: translateX(6px);
  box-shadow: -8px -8px 18px rgba(255, 255, 255, 0.9), 10px 12px 26px rgba(44, 39, 35, 0.16);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  font-style: italic;
  color: var(--primary);
  min-width: 56px;
  text-align: center;
  line-height: 1;
  opacity: 0.9;
}

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

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

.rank-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light), var(--shadow-dark);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: calc(var(--radius) - 6px);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(44, 39, 35, 0.18);
}

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

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-meta h1 {
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1.35;
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.detail-body {
  margin-top: 28px;
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light), var(--shadow-dark);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body h2,
.detail-body h3 {
  margin: 22px 0 12px;
  font-size: 20px;
  letter-spacing: 1px;
}

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

/* Tag list */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.tag {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  box-shadow: inset 1px 1px 3px rgba(44, 39, 35, 0.06), inset -1px -1px 3px rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--primary);
  box-shadow: var(--shadow-light), var(--shadow-dark);
}

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

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

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

.pg.current {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(179, 58, 43, 0.35);
}

.pg.current:hover {
  color: #fff;
}

.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 24px 0;
}

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

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

/* Footer */
.footer {
  margin-top: 60px;
  padding: 40px 0 32px;
  border-top: 1px solid rgba(44, 39, 35, 0.08);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}

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

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

/* Crumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--muted);
}

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

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

.crumbs span {
  color: var(--text);
}

/* Highlight */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(179, 58, 43, 0.08);
  padding: 0 3px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .cat-list {
    grid-template-columns: repeat(4, 1fr);
  }
  .detail-head {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  .wrap {
    padding: 0 16px;
  }
  .header .wrap {
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .logo {
    font-size: 20px;
  }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav a {
    padding: 6px 12px;
    font-size: 13px;
  }
  .search-box {
    order: 2;
    min-width: 0;
    flex: 1;
    max-width: 220px;
  }
  .hero {
    margin: 20px 0;
    border-radius: 16px;
  }
  .hero-slide {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }
  .hero-info {
    padding: 24px 18px 20px;
  }
  .hero-info h2,
  .hero-info h3 {
    font-size: 20px;
  }
  .hero-info p {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  .btn {
    padding: 8px 20px;
    font-size: 13px;
  }
  .sec {
    margin: 32px 0;
  }
  .sec-title {
    font-size: 19px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .cat-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .cat-item {
    padding: 18px 8px;
  }
  .cat-item h3,
  .cat-item span:first-child {
    font-size: 14px;
  }
  .rank-item {
    padding: 12px 14px;
    gap: 12px;
  }
  .rank-num {
    font-size: 26px;
    min-width: 40px;
  }
  .rank-title {
    font-size: 14px;
  }
  .detail-head {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }
  .detail-cover {
    max-width: 180px;
    margin: 0 auto;
  }
  .detail-meta h1 {
    font-size: 22px;
  }
  .detail-body {
    padding: 20px;
    font-size: 14px;
  }
  .pg {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    padding: 0 10px;
  }
  .footer {
    margin-top: 40px;
    padding: 28px 0 24px;
  }
}