:root {
  --bg: #F7EDE0;
  --surface: #FFF9F0;
  --primary: #C13B4A;
  --accent: #5B8A72;
  --text: #2B2119;
  --muted: #8A7563;
  --radius: 14px;
  --border: #2B2119;
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Crimson Pro', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(193,59,74,0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(91,138,114,0.05) 0%, transparent 40%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

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

/* ============ HEADER ============ */
.header {
  background: var(--surface);
  border-bottom: 3px solid var(--text);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
  border: 2px solid var(--text);
  padding: 4px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  transform: rotate(-1.5deg);
  transition: transform .25s ease;
}
.logo:hover { transform: rotate(0deg) translateY(-2px); }

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

.nav a {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: all .2s ease;
}
.nav a:hover {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--text);
  transform: translateY(-2px);
}

.search-box {
  display: flex;
  align-items: center;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  min-width: 220px;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  background: var(--primary);
  color: var(--surface);
  padding: 8px 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ============ HERO 轮播 ============ */
.hero {
  position: relative;
  margin: 32px 0;
  border: 3px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 8px 8px 0 rgba(43,33,25,0.12);
}

.hero-slide {
  display: none;
  position: relative;
  aspect-ratio: 16 / 7;
  animation: heroFade .6s ease;
}
.hero-slide.active { display: block; }

@keyframes heroFade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

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

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 40px 32px 28px;
  background: linear-gradient(to top, rgba(43,33,25,0.92) 0%, rgba(43,33,25,0.55) 55%, transparent 100%);
  color: var(--surface);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}
.hero-info p {
  font-size: 15px;
  color: #E8DDD0;
  max-width: 640px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 26px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--primary);
  color: var(--surface);
  cursor: pointer;
  transition: all .2s ease;
}
.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(0,0,0,0.25);
}

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

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  position: relative;
  padding-left: 18px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  width: 8px;
  height: 26px;
  background: var(--primary);
  border-radius: 3px;
}

.sec-more {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 4px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all .2s ease;
}
.sec-more:hover {
  background: var(--primary);
  color: var(--surface);
  transform: translateX(3px);
}

/* ============ GRID & CARD ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-width .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 6px 8px 0 rgba(193,59,74,0.25);
  border-width: 3px;
}

.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 .4s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: var(--surface);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid var(--surface);
  transform: rotate(6deg);
  box-shadow: 2px 2px 0 rgba(43,33,25,0.3);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-meta span {
  background: var(--bg);
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(138,117,99,0.3);
}

/* ============ CAT LIST ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  transition: all .2s ease;
}
.cat-item:nth-child(3n+1) { transform: rotate(-0.6deg); }
.cat-item:nth-child(3n+2) { transform: rotate(0.5deg); }
.cat-item:hover {
  background: var(--accent);
  color: var(--surface);
  transform: translateY(-3px) rotate(0deg);
  box-shadow: 4px 5px 0 rgba(43,33,25,0.2);
}

.cat-count {
  font-size: 13px;
  color: var(--primary);
  background: var(--bg);
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  padding: 1px 10px;
  font-weight: 700;
}
.cat-item:hover .cat-count {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--surface);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius);
  transition: all .2s ease;
}
.rank-item:hover {
  background: var(--bg);
  transform: translateX(4px);
  box-shadow: 4px 4px 0 rgba(91,138,114,0.25);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--surface);
  background: var(--primary);
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 2px solid var(--text);
  flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-num { background: #D4A017; }
.rank-item:nth-child(2) .rank-num { background: #9AA5B1; }
.rank-item:nth-child(3) .rank-num { background: #B87333; }

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

.rank-score {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ============ DETAIL ============ */
.detail {
  margin: 32px 0;
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 8px 8px 0 rgba(43,33,25,0.1);
}

.detail-head {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 2px dashed var(--muted);
}

.detail-cover {
  width: 240px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  border: 3px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  transform: rotate(-1deg);
  box-shadow: 5px 5px 0 rgba(193,59,74,0.2);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
.detail-meta p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}
.detail-meta p strong { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  color: var(--surface);
  background: var(--primary);
  padding: 6px 20px;
  border-radius: 999px;
  border: 2px solid var(--text);
  transform: rotate(-2deg);
  align-self: flex-start;
  box-shadow: 3px 3px 0 rgba(43,33,25,0.25);
}

.detail-body {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  margin: 24px 0 12px;
  color: var(--primary);
}
.detail-body p { margin-bottom: 14px; }
.detail-body img { border-radius: var(--radius); margin: 16px 0; }

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

.tag {
  font-size: 13px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent);
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 3px 14px;
  transition: all .2s ease;
}
.tag:hover {
  background: var(--accent);
  color: var(--surface);
  transform: translateY(-2px);
}

/* ============ 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: 40px;
  height: 40px;
  padding: 0 14px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 10px;
  transition: all .2s ease;
}
.pg:hover {
  background: var(--accent);
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(43,33,25,0.2);
}
.pg.current {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--text);
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 rgba(43,33,25,0.25);
  pointer-events: none;
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  background: var(--bg);
}

/* ============ LINKS ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--muted);
  border-radius: 999px;
  padding: 4px 14px;
  transition: all .2s ease;
}
.link-item:hover {
  color: var(--surface);
  background: var(--accent);
  border-color: var(--accent);
}

/* ============ FOOTER ============ */
.footer {
  margin-top: 64px;
  background: var(--text);
  color: #D8CCBE;
  border-top: 4px solid var(--primary);
  padding: 40px 0 28px;
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer p { font-size: 13px; line-height: 1.8; }
.footer a { color: #E8DDD0; transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer .footer-brand {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--surface);
}

/* ============ CRUMBS ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a { color: var(--primary); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

/* ============ HIGHLIGHT ============ */
.hl {
  background: var(--primary);
  color: var(--surface);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .hero-info h2 { font-size: 26px; }
}

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

  .header .wrap {
    flex-wrap: nowrap;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { font-size: 20px; padding: 3px 10px; }
  .nav {
    order: 3;
    flex-basis: 100%;
    padding-bottom: 4px;
  }
  .nav a { font-size: 14px; padding: 5px 12px; }
  .search-box { min-width: 0; flex: 1; }
  .search-box input { padding: 7px 12px; font-size: 13px; }
  .search-box button { padding: 7px 14px; font-size: 13px; }

  .hero { margin: 20px 0; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 24px 18px 18px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 3; }
  .btn { font-size: 14px; padding: 8px 20px; }

  .sec { margin: 32px 0; }
  .sec-title { font-size: 22px; padding-left: 14px; }
  .sec-title::before { width: 6px; height: 20px; }
  .sec-more { font-size: 12px; padding: 3px 12px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-title { font-size: 14px; }

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

  .rank-list { grid-template-columns: 1fr; gap: 10px; }
  .rank-num { min-width: 32px; height: 32px; font-size: 18px; }

  .detail { padding: 20px 16px; margin: 20px 0; }
  .detail-head {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
  }
  .detail-cover { width: 60%; max-width: 220px; }
  .detail-meta h1 { font-size: 24px; }
  .detail-meta { align-items: center; }
  .detail-score { align-self: center; }

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

  .footer { padding: 28px 0 20px; }
  .footer .footer-brand { font-size: 18px; }
}