:root {
  --bg: #1B1512;
  --surface: #2A201A;
  --primary: #C9973F;
  --accent: #C2452E;
  --text: #F2E6D2;
  --muted: #9A8672;
  --radius: 10px;
  --font-heading: 'Playfair Display', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
  --line: rgba(201, 151, 63, .28);
  --shadow: 0 6px 20px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 20% 0%, rgba(201, 151, 63, .08), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(194, 69, 46, .06), transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s ease;
}

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

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

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

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 21, 18, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .5);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(201, 151, 63, .35);
  flex-shrink: 0;
}

.logo img {
  height: 38px;
  width: auto;
}

.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: 8px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all .25s ease;
}

.nav a:hover {
  color: var(--primary);
  border-color: var(--line);
  background: rgba(201, 151, 63, .06);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

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

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

.search-box button {
  padding: 8px 16px;
  border: 0;
  background: var(--primary);
  color: #1B1512;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .25s ease;
}

.search-box button:hover { background: var(--accent); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--surface);
}

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

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  aspect-ratio: 21 / 9;
  scroll-snap-align: start;
  overflow: hidden;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(27, 21, 18, .92) 0%, rgba(27, 21, 18, .55) 45%, transparent 75%);
}

.hero-info {
  position: absolute;
  left: 40px;
  bottom: 40px;
  z-index: 2;
  max-width: 55%;
}

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

.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;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #1B1512;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all .25s ease;
}

.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: 0 0 18px rgba(201, 151, 63, .4);
}

/* ---------- Section ---------- */
.sec { margin: 40px auto; }

.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: 60px;
  height: 2px;
  background: var(--primary);
}

.sec-title {
  font-size: 24px;
  color: var(--text);
}

.sec-title::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

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

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

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

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

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 26px rgba(201, 151, 63, .22);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: var(--radius);
  background: rgba(27, 21, 18, .82);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.card-info { padding: 12px; }

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

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

/* ---------- 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;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-heading);
  transition: all .25s ease;
}

.cat-item:hover {
  border-color: var(--primary);
  background: rgba(201, 151, 63, .08);
  color: var(--primary);
}

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

/* ---------- 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: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .25s ease;
}

.rank-item:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(201, 151, 63, .16);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(201, 151, 63, .12);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--accent);
  color: var(--text);
}

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

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

/* ---------- Detail ---------- */
.detail {
  margin: 32px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.detail-head {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  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 { flex: 1; min-width: 0; }

.detail-meta h1 {
  font-size: 30px;
  color: var(--text);
  margin-bottom: 12px;
}

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

.detail-score {
  display: inline-block;
  margin: 12px 0;
  padding: 6px 16px;
  border-radius: var(--radius);
  background: rgba(201, 151, 63, .12);
  border: 1px solid var(--line);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-heading);
}

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

.detail-body p { margin: 0 0 14px; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius);
  background: rgba(201, 151, 63, .08);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  transition: all .25s ease;
}

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

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

.pg {
  display: inline-block;
  min-width: 38px;
  padding: 8px 14px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  transition: all .25s ease;
}

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

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #1B1512;
  font-weight: 700;
}

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

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

.link-item {
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  transition: all .25s ease;
}

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

.footer p { margin: 6px 0; }

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

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

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

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

/* ---------- Mobile ---------- */
@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;
    flex: 0 0 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

  .search-box { margin-left: auto; }

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

  .hero { margin: 18px auto; }

  .hero-slide { aspect-ratio: 16 / 10; }

  .hero-info {
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: none;
  }

  .hero-info h2 { font-size: 20px; }

  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }

  .btn { padding: 8px 18px; font-size: 13px; }

  .sec { margin: 28px auto; }

  .sec-title { font-size: 19px; }

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

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

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

  .detail { padding: 18px; }

  .detail-head {
    flex-direction: column;
    gap: 16px;
  }

  .detail-cover { width: 140px; }

  .detail-meta h1 { font-size: 22px; }

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

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