:root {
  --bg: #F6F1E7;
  --surface: #FFFFFF;
  --primary: #2B6B5E;
  --accent: #C7452B;
  --text: #1E1C1A;
  --muted: #6F6A60;
  --radius: 8px;
  --border: 2px solid #1E1C1A;
  --shadow: 4px 4px 0 #1E1C1A;
  --font-heading: 'Noto Serif SC', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

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

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; }
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: 700;
  line-height: 1.3;
}

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

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

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

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  transform: translateY(-2px);
}

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

.nav a {
  display: block;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all .2s;
}
.nav a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(43, 107, 94, .06);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--text);
  transition: transform .2s;
}
.search-box:focus-within { transform: translate(-1px, -1px); }
.search-box input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  width: 160px;
  background: transparent;
  color: var(--text);
}
.search-box button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 7px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ============ Hero 轮播 ============ */
.hero {
  position: relative;
  margin: 28px 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.hero::-webkit-scrollbar { display: none; }

.hero-slide {
  scroll-snap-align: start;
  position: relative;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--primary);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,28,26,.85) 0%, rgba(30,28,26,.35) 50%, transparent 100%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px;
  max-width: 60%;
  color: #fff;
}
.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.hero-info p {
  font-size: 14px;
  color: rgba(255,255,255,.85);
  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(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #1E1C1A;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover {
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #1E1C1A;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: var(--border);
  position: relative;
}
.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 56px;
  height: 4px;
  background: var(--accent);
}

.sec-title {
  font-size: 22px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--primary);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.sec-more {
  font-size: 14px;
  color: var(--muted);
  border: 2px solid var(--muted);
  border-radius: var(--radius);
  padding: 3px 12px;
  transition: all .2s;
}
.sec-more:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #1E1C1A;
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--primary);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 2px solid #1E1C1A;
  z-index: 2;
}

.card-info {
  padding: 10px 12px 12px;
  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.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.card:hover .card-title { color: var(--primary); }

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--text);
  font-weight: 600;
  transition: all .2s;
}
.cat-item:hover {
  background: var(--primary);
  color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text);
}
.cat-item:hover .cat-count { background: var(--accent); color: #fff; }

.cat-count {
  font-size: 12px;
  background: var(--bg);
  color: var(--muted);
  padding: 1px 8px;
  border-radius: 10px;
  border: 1px solid var(--text);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--text);
  transition: all .2s;
}
.rank-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--text);
}

.rank-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: var(--primary);
  border: 2px solid var(--text);
  border-radius: 4px;
}
.rank-item:nth-child(1) .rank-num { background: var(--accent); }
.rank-item:nth-child(2) .rank-num { background: #8a6d3b; }
.rank-item:nth-child(3) .rank-num { background: #6F6A60; }

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--primary);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.detail-meta h1 {
  font-size: 28px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--muted);
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 4px 16px;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--text);
}
.detail-score::before { content: "★"; font-size: 14px; }

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

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  margin: 20px 0 10px;
  color: var(--primary);
}

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--primary);
  background: rgba(43, 107, 94, .08);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  transition: all .2s;
}
.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* ============ Pager ============ */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  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;
  font-weight: 500;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--text);
  transition: all .15s;
}
.pg:hover {
  background: var(--primary);
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--text);
}
.pg.current {
  background: var(--accent);
  color: #fff;
  cursor: default;
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  transition: all .2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  background: var(--primary);
  color: rgba(255,255,255,.85);
  border-top: var(--border);
  font-size: 13px;
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer a { color: #fff; }
.footer a:hover { color: var(--accent); }

/* ============ Crumbs ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0;
  padding: 8px 0;
}
.crumbs a { color: var(--primary); }
.crumbs a:hover { color: var(--accent); }

/* ============ Highlight ============ */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(199, 69, 43, .1);
  padding: 0 2px;
  border-radius: 2px;
}

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

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav a { padding: 5px 12px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 18px 0; gap: 14px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { max-width: 100%; padding: 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { display: none; }

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

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

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 20px; }

  .detail-body { padding: 16px; font-size: 14px; }

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

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