:root {
  --bg: #0C0A09;
  --surface: #171310;
  --primary: #E8A23C;
  --accent: #C2410C;
  --text: #F5EFE6;
  --muted: #9A8F82;
  --radius: 10px;
  --line: rgba(232, 162, 60, 0.18);
  --glass: rgba(23, 19, 16, 0.55);
  --font-heading: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', system-ui, sans-serif;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(194, 65, 12, 0.22), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(232, 162, 60, 0.10), transparent 55%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
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(12, 10, 9, 0.82);
  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-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(232, 162, 60, 0.35);
}

.logo span, .logo em { color: var(--primary); font-style: normal; }

.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;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav a:hover, .nav a.active {
  color: var(--primary);
  background: rgba(232, 162, 60, 0.10);
}

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

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

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

.search-box button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #1a1208;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: calc(var(--radius) - 3px);
  font-family: var(--font-body);
}

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

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  min-height: 260px;
  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(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.55) 45%, rgba(194, 65, 12, 0.15) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.85), transparent 55%);
}

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

.hero-info h2, .hero-info h3 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 10px;
  -webkit-text-stroke: 0.4px rgba(232, 162, 60, 0.35);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  color: #1a1208;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 22px rgba(194, 65, 12, 0.35);
  transition: transform .2s, box-shadow .2s;
  border: 0;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232, 162, 60, 0.45);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: none;
}

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

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  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), var(--accent));
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
  line-height: 1.2;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
  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 {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 162, 60, 0.7), transparent);
  z-index: 3;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 162, 60, 0.55);
  box-shadow: 0 0 0 1px rgba(232, 162, 60, 0.25), 0 14px 34px rgba(194, 65, 12, 0.28);
}

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

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.75), transparent 45%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #1a1208;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

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

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

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

.card-meta span { position: relative; }
.card-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--accent);
}

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  font-size: 14px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.cat-item:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 162, 60, 0.55);
  box-shadow: 0 10px 26px rgba(194, 65, 12, 0.25);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(232, 162, 60, 0.10);
  padding: 1px 8px;
  border-radius: 20px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(232, 162, 60, 0.55);
  box-shadow: 0 10px 26px rgba(194, 65, 12, 0.25);
}

.rank-num {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(232, 162, 60, 0.08);
  border-radius: 8px;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #1a1208;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

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

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

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

.detail-head {
  display: flex;
  gap: 30px;
  padding: 26px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.detail-head::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 162, 60, 0.8), transparent);
}

.detail-cover {
  flex: none;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f0c0a;
}

.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: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: .5px;
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(232, 162, 60, 0.35);
}

.detail-score small {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
}

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

.detail-meta p b, .detail-meta p strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.detail-body {
  margin-top: 26px;
  padding: 26px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: #d9d0c4;
}

.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 20px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  font-size: 18px;
}

.detail-body p { margin-bottom: 12px; }

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

.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(232, 162, 60, 0.05);
  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: 34px 0 10px;
}

.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: color .2s, border-color .2s, background .2s;
}

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

.pg.current {
  color: #1a1208;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
}

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

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

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

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

/* ===== Footer ===== */
.footer {
  margin-top: 50px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(194, 65, 12, 0.06));
  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 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
}

.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-weight: 700;
  background: rgba(232, 162, 60, 0.14);
  border-radius: 4px;
  padding: 0 3px;
}

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

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

  .logo { font-size: 19px; }

  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

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

  .search-box {
    flex: 1;
    min-width: 0;
  }

  .hero { margin: 16px 0 24px; }

  .hero-slide {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }

  .hero-info { padding: 20px; }

  .hero-info p { -webkit-line-clamp: 2; }

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

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

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

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

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

  .detail-cover {
    width: 140px;
    align-self: center;
  }

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

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

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