:root {
  --bg: #F6F1E9;
  --surface: #FCF9F5;
  --primary: #C7624B;
  --accent: #7A8B7A;
  --text: #3D3A35;
  --muted: #9B948A;
  --line: rgba(61, 58, 53, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-out: 8px 8px 20px rgba(180, 168, 152, 0.35), -8px -8px 20px rgba(255, 255, 255, 0.9);
  --shadow-in: inset 3px 3px 8px rgba(180, 168, 152, 0.28), inset -3px -3px 8px rgba(255, 255, 255, 0.85);
  --font-heading: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, serif;
  --font-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 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: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: .02em;
}

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 233, 0.92);
  backdrop-filter: blur(8px);
  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);
  letter-spacing: .06em;
  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;
  -ms-overflow-style: none;
}

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

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

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

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

.search-box input {
  width: 180px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  box-shadow: var(--shadow-in);
  transition: box-shadow .25s ease, border-color .25s ease;
}

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

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-in), 0 0 0 2px rgba(199, 98, 75, 0.12);
}

.search-box button {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-out);
  transition: transform .25s ease, box-shadow .25s ease;
}

.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 4px 4px 12px rgba(199, 98, 75, 0.35), -4px -4px 12px rgba(255, 255, 255, 0.9);
}

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

.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.03); }

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 28px 24px;
  background: linear-gradient(to top, rgba(30, 26, 22, 0.82), rgba(30, 26, 22, 0));
  color: #fff;
}

.hero-info h2 {
  color: #fff;
  font-size: 26px;
  margin-bottom: 6px;
}

.hero-info p {
  margin: 0 0 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
}

.btn {
  display: inline-block;
  padding: 9px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-out);
  transition: transform .25s ease, box-shadow .25s ease;
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 4px 4px 14px rgba(199, 98, 75, 0.4), -4px -4px 14px rgba(255, 255, 255, 0.9);
}

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

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

.sec-title {
  font-size: 22px;
  position: relative;
  padding-left: 14px;
}

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

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

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

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

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

.card:hover {
  transform: translateY(-4px);
  box-shadow: 10px 10px 24px rgba(180, 168, 152, 0.4), -10px -10px 24px rgba(255, 255, 255, 0.95);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--bg);
}

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(199, 98, 75, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}

.cat-item:hover {
  transform: translateY(-3px);
  color: var(--primary);
  box-shadow: 8px 8px 20px rgba(180, 168, 152, 0.42), -8px -8px 20px rgba(255, 255, 255, 0.95);
}

.cat-item .cat-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  transition: transform .25s ease, box-shadow .25s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 18px rgba(180, 168, 152, 0.4), -8px -8px 18px rgba(255, 255, 255, 0.95);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow-in);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--primary);
  color: #fff;
  box-shadow: 3px 3px 8px rgba(199, 98, 75, 0.4), -3px -3px 8px rgba(255, 255, 255, 0.9);
}

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

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

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

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  margin-bottom: 24px;
}

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

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

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

.detail-meta h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

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

.detail-meta p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text);
}

.detail-meta p span {
  color: var(--muted);
  margin-right: 6px;
}

.detail-score {
  display: inline-block;
  margin: 10px 0 14px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-out);
}

.detail-body {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}

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

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--shadow-in);
  transition: color .25s ease, background .25s ease;
}

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

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-out);
  transition: transform .25s ease, box-shadow .25s ease, color .25s ease;
}

.pg:hover {
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 6px 6px 14px rgba(180, 168, 152, 0.4), -6px -6px 14px rgba(255, 255, 255, 0.95);
}

.pg.current {
  background: var(--primary);
  color: #fff;
  box-shadow: 4px 4px 12px rgba(199, 98, 75, 0.4), -4px -4px 12px rgba(255, 255, 255, 0.9);
}

.pg.disabled {
  color: var(--muted);
  opacity: .5;
  pointer-events: none;
  box-shadow: var(--shadow-in);
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-out);
}

.link-item {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--shadow-in);
  transition: color .25s ease;
}

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

/* ============ Crumbs ============ */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  font-size: 12px;
  color: var(--muted);
}

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

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(199, 98, 75, 0.1);
  padding: 0 2px;
  border-radius: 3px;
}

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

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

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

@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  .logo { font-size: 19px; }

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

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

  .search-box input { width: 120px; height: 34px; padding: 0 12px; }
  .search-box button { height: 34px; padding: 0 14px; }

  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 28px 16px 16px; }
  .hero-info h2 { font-size: 19px; }
  .hero-info p { font-size: 12px; }

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

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-list { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .rank-list { grid-template-columns: 1fr; }

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

  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 21px; text-align: center; }
  .detail-meta .detail-sub { text-align: center; }
  .detail-score { display: block; width: fit-content; margin: 0 auto 14px; }

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

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

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