:root {
  --bg: #1a1817;
  --surface: #252220;
  --surface-2: #2e2a27;
  --primary: #d4a373;
  --accent: #e0b07a;
  --text: #f0ebe6;
  --muted: #8a817c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-out: 6px 6px 14px rgba(0, 0, 0, .55), -6px -6px 14px rgba(255, 255, 255, .03);
  --shadow-in: inset 3px 3px 7px rgba(0, 0, 0, .55), inset -3px -3px 7px rgba(255, 255, 255, .03);
  --shadow-hover: 8px 8px 20px rgba(0, 0, 0, .6), -8px -8px 20px rgba(255, 255, 255, .04);
  --line: rgba(212, 163, 115, .28);
  --font-head: 'Noto Serif SC', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 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: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .25s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), #8a6a45); border-radius: 8px; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 24, 23, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 66px;
}
.logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--primary); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 20px;
  white-space: nowrap;
  transition: all .25s;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-in);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-in);
  padding: 4px 6px 4px 14px;
}
.search-box input {
  width: 130px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  color: #221c15;
  font-weight: 700;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 16px;
  font-family: var(--font-body);
  transition: transform .2s;
}
.search-box button:hover { transform: scale(1.05); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 26px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-out);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 24, 23, .95) 0%, rgba(26, 24, 23, .35) 45%, transparent 75%);
}
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 26px 30px;
}
.hero-info h2 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
  max-width: 620px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn {
  display: inline-block;
  padding: 9px 26px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  color: #221c15;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  box-shadow: 4px 4px 10px rgba(0, 0, 0, .5), -3px -3px 8px rgba(255, 255, 255, .05);
  transition: transform .25s, box-shadow .25s;
}
.btn:hover {
  color: #221c15;
  transform: translateY(-2px);
  box-shadow: 6px 6px 16px rgba(0, 0, 0, .55), -4px -4px 10px rgba(255, 255, 255, .06);
}

/* ===== Section ===== */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(var(--accent), var(--primary));
}
.sec-more { font-size: 13px; color: var(--muted); }
.sec-more:hover { color: var(--primary); }

/* ===== Grid / Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-cover img { transform: scale(1.07); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  color: #221c15;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  padding: 1px 8px;
  border-radius: 10px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .5);
}
.card-info { padding: 12px 12px 14px; }
.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Cat list ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  font-family: var(--font-head);
  font-weight: 700;
  transition: transform .25s, color .25s;
}
.cat-item:hover { transform: translateY(-3px); color: var(--primary); }
.cat-count {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: var(--bg);
  border-radius: 10px;
  padding: 1px 9px;
  box-shadow: var(--shadow-in);
}

/* ===== Rank list ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 26px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-out);
  transition: transform .25s;
}
.rank-item:hover { transform: translateX(4px); }
.rank-num {
  flex-shrink: 0;
  width: 30px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  font-style: italic;
  text-align: center;
  color: var(--muted);
}
.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: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-score {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
}

/* ===== Detail ===== */
.detail {
  margin: 30px 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 28px;
}
.detail-head {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-out);
  background: var(--surface-2);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.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-score {
  display: inline-block;
  margin: 12px 0 16px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
.detail-score::before { content: "评分 "; font-size: 13px; color: var(--muted); font-family: var(--font-body); font-weight: 400; }
.detail-body {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.9;
  color: #d9d2cb;
}
.detail-body h2 {
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--text);
  margin: 18px 0 10px;
}
.detail-body p { margin-bottom: 12px; }

/* ===== Tag list ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-in);
  transition: color .25s;
}
.tag:hover { color: var(--primary); }

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  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;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-out);
  transition: all .25s;
}
.pg:hover { color: var(--primary); transform: translateY(-2px); }
.pg.current {
  color: #221c15;
  font-weight: 700;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  box-shadow: var(--shadow-in);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  box-shadow: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .25s;
}
.link-item:hover { color: var(--primary); }

/* ===== Footer ===== */
.footer {
  margin-top: 50px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  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: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ===== Highlight ===== */
.hl { color: var(--accent); font-weight: 700; background: rgba(212, 163, 115, .12); border-radius: 3px; padding: 0 2px; }

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

@media (max-width: 768px) {
  body { font-size: 14px; }
  .wrap { padding: 0 14px; }
  .header .wrap { height: auto; flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .logo { font-size: 19px; }
  .nav { order: 3; width: 100%; flex: 0 0 100%; overflow-x: auto; padding-bottom: 4px; }
  .nav a { padding: 5px 11px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 90px; }

  .hero { margin: 16px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 16px 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; margin-bottom: 10px; }
  .btn { padding: 7px 20px; font-size: 13px; }

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

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

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

  .detail { padding: 18px; margin: 20px 0; }
  .detail-head { flex-direction: column; gap: 18px; }
  .detail-cover { width: 100%; max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-score { font-size: 22px; }
  .detail-body { font-size: 14px; }

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