:root {
  --bg: #12100E;
  --surface: rgba(255, 248, 235, 0.07);
  --primary: #FF9A3D;
  --accent: #FFD166;
  --text: #FFF6EA;
  --muted: #B8A99A;
  --radius: 24px;
  --font-heading: 'Impact', 'Arial Black', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Serif SC', 'Songti SC', 'Georgia', serif;
  --line: rgba(255, 246, 234, 0.12);
  --glow: 0 0 24px rgba(255, 154, 61, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    radial-gradient(600px 400px at 12% 8%, rgba(255, 154, 61, 0.12), transparent 70%),
    radial-gradient(500px 360px at 88% 22%, rgba(255, 209, 102, 0.10), transparent 70%),
    radial-gradient(700px 500px at 50% 100%, rgba(255, 154, 61, 0.06), transparent 70%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .25s ease; }
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(18, 16, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 154, 61, 0.45);
}
.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;
  border-radius: 999px;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
  transition: all .25s ease;
}
.nav a:hover, .nav a.active {
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  min-width: 220px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  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 {
  border: none;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transition: transform .2s ease, box-shadow .2s ease;
}
.search-box button:hover { transform: translateY(-1px); box-shadow: var(--glow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .5px;
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.hero-slide {
  position: relative;
  display: none;
  min-height: 380px;
}
.hero-slide.active { display: block; animation: fadeIn .6s ease; }
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18,16,14,.92) 0%, rgba(18,16,14,.55) 55%, rgba(18,16,14,.15) 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 56px 48px;
}
.hero-info .tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
  background: rgba(255, 154, 61, 0.14);
  border: 1px solid rgba(255, 154, 61, 0.35);
}
.hero-info h2, .hero-info h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.hero-info p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ---------- Sections ---------- */
.sec { margin: 48px 0; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  padding-left: 18px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.sec-more {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px dashed transparent;
  transition: all .25s ease;
}
.sec-more:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  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;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 154, 61, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), var(--glow);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1916;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 14px rgba(255, 154, 61, 0.45);
}
.card-info { padding: 12px 14px 16px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Categories ---------- */
.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;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px;
  transition: all .25s ease;
}
.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.cat-count {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--accent);
}

/* ---------- Rank ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .25s ease;
}
.rank-item:hover {
  border-color: rgba(255, 154, 61, 0.5);
  transform: translateX(4px);
  box-shadow: var(--glow);
}
.rank-num {
  flex: 0 0 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--muted);
  background: rgba(255, 248, 235, 0.06);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--accent);
}

/* ---------- Detail ---------- */
.detail { margin: 32px 0 48px; }
.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; flex-direction: column; gap: 14px; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 1px;
}
.detail-meta .sub { color: var(--muted); font-size: 15px; }
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 18px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.detail-body {
  margin-top: 28px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body p { margin-bottom: 14px; }
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  margin: 20px 0 12px;
  letter-spacing: .5px;
}

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .25s ease;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(255, 209, 102, 0.25);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 10px;
}
.pg {
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .25s ease;
}
.pg:hover { color: var(--primary); border-color: var(--primary); }
.pg.current {
  color: var(--bg);
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: var(--glow);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}
.link-item {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .25s ease;
}
.link-item:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* ---------- Highlight ---------- */
.hl {
  color: var(--bg);
  padding: 0 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 36px 0 30px;
  border-top: 1px solid var(--line);
  background: rgba(255, 248, 235, 0.03);
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin: 6px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .detail-head { grid-template-columns: 220px 1fr; gap: 24px; }
}

@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: 22px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 2px;
  }
  .nav a { padding: 7px 12px; font-size: 14px; }
  .search-box { min-width: 0; flex: 1; }
  .search-box input { font-size: 13px; }

  .hero { margin: 18px 0 4px; border-radius: 18px; }
  .hero-slide { min-height: 300px; }
  .hero-info { padding: 32px 22px; }
  .hero-info h2, .hero-info h1 { font-size: 26px; }
  .hero-info p { font-size: 14px; -webkit-line-clamp: 2; }

  .sec { margin: 32px 0; }
  .sec-title { font-size: 21px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-info { padding: 10px 11px 13px; }
  .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: 10px; }

  .detail-head {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 24px; text-align: center; }
  .detail-meta .sub { text-align: center; }
  .detail-score { align-self: center; }
  .detail-body { padding: 18px; font-size: 14.5px; }

  .pg { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
  .footer { margin-top: 40px; padding: 26px 0 22px; }
}