:root {
  --bg: #0B0B0C;
  --surface: #141416;
  --primary: #C0392B;
  --accent: #E8DCC8;
  --text: #F0EDE6;
  --muted: #8A857C;
  --radius: 4px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'Times New Roman', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Helvetica Neue', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1, h2, h3, h4, h5, h6 {
  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 {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 12, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(232, 220, 200, .08);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--primary);
  margin-right: 10px;
  vertical-align: -3px;
}

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

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--surface);
}

.nav a:hover::after {
  content: "";
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid rgba(232, 220, 200, .12);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}

.search-box:focus-within { border-color: var(--primary); }

.search-box input {
  width: 160px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}

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

.search-box button {
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  transition: opacity .2s;
}

.search-box button:hover { opacity: .85; }

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

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  animation: fadeIn .6s ease;
}

.hero-slide.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 40px 32px;
  background: linear-gradient(to top, rgba(11,11,12,.95), transparent);
}

.hero-info h2 {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--text);
}

.hero-info p {
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn:hover {
  background: transparent;
  color: var(--primary);
}

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(232, 220, 200, .1);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}

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

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

.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);
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform .25s, border-color .25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1c1f;
}

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid rgba(232, 220, 200, .08);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 15px;
  transition: border-color .2s, color .2s;
}

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

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(232, 220, 200, .06);
  transition: color .2s;
}

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

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  color: var(--primary);
  width: 32px;
  flex-shrink: 0;
}

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

.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

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

.detail-meta h1 {
  font-size: 32px;
  margin-bottom: 14px;
}

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

.detail-meta p strong { color: var(--text); font-weight: 500; }

.detail-score {
  display: inline-block;
  margin: 14px 0;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  max-width: 860px;
}

.detail-body p { margin-bottom: 16px; color: #cfcbc2; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(232, 220, 200, .1);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s;
}

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

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

.pg {
  display: inline-block;
  min-width: 38px;
  padding: 8px 14px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(232, 220, 200, .1);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s, background .2s;
}

.pg:hover {
  color: var(--text);
  border-color: var(--primary);
}

.pg.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

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

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

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

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

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

/* ===== Crumbs ===== */
.crumbs {
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted);
}

.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--muted); }

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  font-style: normal;
  font-weight: 700;
}

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

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    padding-bottom: 4px;
    gap: 2px;
  }

  .nav a { padding: 5px 10px; font-size: 13px; }

  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 16px 0; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 40px 18px 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 19px; }
  .sec-head { margin-bottom: 16px; }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card-info { padding: 8px 10px 12px; }
  .card-title { font-size: 14px; }

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-cover { max-width: 220px; margin: 0 auto; }
  .detail-meta h1 { font-size: 24px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: block; text-align: center; font-size: 34px; }

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

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

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