:root {
  --bg: #14110E;
  --surface: #1E1A15;
  --primary: #C9A24A;
  --accent: #8C5A2B;
  --text: #F2EADB;
  --muted: #9A8E7C;
  --radius: 10px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'Helvetica Neue', Arial, 'PingFang SC', sans-serif;
  --line: rgba(201, 162, 74, 0.18);
  --glow: inset 0 1px 0 rgba(242, 234, 219, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

* { 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;
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(201, 162, 74, 0.06), transparent 60%),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(201, 162, 74, 0.03) 80px);
}

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

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 17, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(201, 162, 74, 0.08);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 0 18px rgba(201, 162, 74, 0.25);
}
.logo img { height: 34px; 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: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 6px;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  overflow: hidden;
}
.search-box input {
  width: 180px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 8px 16px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border: none;
  color: #14110E;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
}
.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);
  box-shadow: var(--glow), 0 20px 50px rgba(0, 0, 0, 0.5);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  animation: scrollShift 24s ease-in-out infinite alternate;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 17, 14, 0.96) 8%, rgba(20, 17, 14, 0.55) 45%, rgba(20, 17, 14, 0.15) 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 32px;
  max-width: 640px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--text);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@keyframes scrollShift {
  from { background-position: center 40%; }
  to { background-position: center 60%; }
}

/* ===== Button ===== */
.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--primary), var(--accent));
  color: #14110E;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  border: 1px solid rgba(242, 234, 219, 0.15);
  box-shadow: 0 4px 16px rgba(201, 162, 74, 0.25);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover {
  color: #14110E;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 162, 74, 0.35);
}

/* ===== Section ===== */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 22px;
  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;
  color: var(--text);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title::before {
  content: "◆";
  color: var(--primary);
  font-size: 12px;
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 14px;
  border-radius: 20px;
}
.sec-more:hover { color: var(--primary); border-color: var(--primary); }

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glow);
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 74, 0.45);
  box-shadow: var(--glow), 0 12px 30px rgba(0, 0, 0, 0.55);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0e0c0a;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #14110E;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.card-info { padding: 10px 12px 12px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  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(5, 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);
  box-shadow: var(--glow);
  font-size: 14px;
  color: var(--text);
  transition: border-color .25s, transform .25s;
}
.cat-item:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--primary); }
.cat-count {
  font-size: 12px;
  color: var(--primary);
  background: rgba(201, 162, 74, 0.1);
  padding: 1px 8px;
  border-radius: 10px;
}

/* ===== Rank List ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  transition: border-color .25s;
}
.rank-item:hover { border-color: rgba(201, 162, 74, 0.45); }
.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #14110E;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-color: transparent;
}
.rank-title {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== Detail ===== */
.detail {
  margin: 32px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  overflow: hidden;
}
.detail-head {
  display: flex;
  gap: 28px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(201, 162, 74, 0.05), transparent);
}
.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 10px;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p span { color: var(--text); }
.detail-score {
  display: inline-block;
  margin: 12px 0;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 20px rgba(201, 162, 74, 0.3);
}
.detail-body {
  padding: 28px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--primary);
  margin: 20px 0 10px;
}
.detail-body p { margin-bottom: 12px; color: var(--muted); }

/* ===== Tag ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(201, 162, 74, 0.08);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.tag:hover { background: rgba(201, 162, 74, 0.18); border-color: var(--primary); }

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}
.pg {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow);
}
.pg:hover { color: var(--primary); border-color: var(--primary); }
.pg.current {
  color: #14110E;
  font-weight: 700;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-color: transparent;
}
.pg.disabled {
  color: var(--muted);
  opacity: .45;
  pointer-events: none;
}

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

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(201, 162, 74, 0.08);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 6px; }

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

/* ===== Highlight ===== */
.hl {
  color: #14110E;
  background: var(--primary);
  padding: 0 3px;
  border-radius: 3px;
}

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

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }

  .hero-slide { min-height: 260px; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 22px; }

  .sec { margin: 28px 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; }

  .detail-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    gap: 18px;
  }
  .detail-cover { width: 160px; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 20px; }
  .tag-list { justify-content: center; }

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