:root {
  --bg: #14100C;
  --surface: #1E1812;
  --primary: #D9A441;
  --accent: #A64B2A;
  --text: #F2E8D5;
  --muted: #8C7A63;
  --radius: 6px;
  --font-heading: 'Playfair Display', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Serif SC', 'Georgia', 'Songti SC', serif;
  --line: rgba(217, 164, 65, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(217, 164, 65, 0.06), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(166, 75, 42, 0.06), transparent 45%);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--text); }

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

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

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 16, 12, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(217, 164, 65, 0.35);
}

.logo img { max-height: 40px; }

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

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

.nav a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .06em;
  white-space: nowrap;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.nav a:hover {
  color: var(--primary);
  border-color: var(--line);
  background: rgba(217, 164, 65, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 6px 4px 12px;
}

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

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

.search-box button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #b9822e);
  color: #1a130b;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: .08em;
  padding: 6px 14px;
  border-radius: calc(var(--radius) - 2px);
  transition: filter .25s ease;
}

.search-box button:hover { filter: brightness(1.1); }

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

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

.hero-slide:first-child,
.hero-slide.active { display: block; }

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 16, 12, 0.92) 0%, rgba(20, 16, 12, 0.55) 45%, transparent 80%);
}

.hero-info {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  padding: 32px;
  max-width: 560px;
}

.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

/* ============ Button ============ */
.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #b9822e);
  color: #1a130b;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: .1em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.btn:hover {
  color: #1a130b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 164, 65, 0.3);
}

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

.btn.ghost:hover {
  background: rgba(217, 164, 65, 0.1);
  box-shadow: none;
}

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

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

.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: .1em;
  color: var(--text);
  margin: 0;
}

.sec-title::before {
  content: "◆";
  color: var(--primary);
  font-size: 12px;
  margin-right: 10px;
  vertical-align: middle;
}

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

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

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(217, 164, 65, 0.35);
}

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

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 16, 12, 0.85) 100%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  font-size: 12px;
  font-family: var(--font-heading);
  color: #1a130b;
  background: linear-gradient(135deg, var(--primary), #b9822e);
  border-radius: 3px;
  letter-spacing: .04em;
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.4;
  margin: 0 0 6px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  letter-spacing: .03em;
}

/* ============ Category list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  letter-spacing: .05em;
  transition: background .25s ease, transform .25s ease;
}

.cat-item:hover {
  background: rgba(217, 164, 65, 0.08);
  color: var(--primary);
  transform: translateX(3px);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
  transition: background .25s ease;
}

.rank-item:hover { background: rgba(217, 164, 65, 0.05); }

.rank-num {
  flex: 0 0 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rank-item:nth-child(-n+3) .rank-num {
  color: #1a130b;
  background: linear-gradient(135deg, var(--primary), #b9822e);
  border-color: transparent;
}

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

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

.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.detail-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0;
}

.detail-meta span { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 34px;
  color: var(--primary);
  line-height: 1;
  margin: 6px 0 14px;
}

.detail-score small {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .1em;
}

.detail-body {
  margin-top: 28px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.detail-body p { margin: 0 0 1em; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--muted);
  background: rgba(217, 164, 65, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .25s ease, border-color .25s ease;
}

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

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: 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: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .25s ease;
}

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

.pg.current {
  color: #1a130b;
  background: linear-gradient(135deg, var(--primary), #b9822e);
  border-color: transparent;
  font-family: var(--font-heading);
}

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

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .04em;
}

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

/* ============ Footer ============ */
.footer {
  margin-top: 50px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  background: rgba(30, 24, 18, 0.6);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .05em;
}

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

.footer p { margin: 6px 0; }

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

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

/* ============ Highlight ============ */
.hl {
  color: #1a130b;
  background: var(--primary);
  padding: 0 3px;
  border-radius: 2px;
  font-style: normal;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  body { font-size: 14px; }

  .wrap { padding: 0 14px; }

  .header .wrap {
    gap: 12px;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    padding-bottom: 4px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

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

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

  .hero { margin: 18px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(20, 16, 12, 0.95) 0%, rgba(20, 16, 12, 0.4) 60%, transparent 100%);
  }
  .hero-info { padding: 18px; max-width: 100%; }
  .hero-info h2 { font-size: 20px; }

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

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

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

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

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

  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }

  .detail-score { font-size: 28px; }

  .detail-body { padding: 18px; }

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