:root {
  --bg: #111213;
  --surface: #1C1D1F;
  --primary: #D9381E;
  --accent: #FF8A1E;
  --text: #EDEAE4;
  --muted: #8C8880;
  --radius: 10px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'STSong', 'Times New Roman', serif;
  --font-body: 'Courier New', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
  --line: rgba(237, 234, 228, 0.12);
  --shadow: 0 8px 24px rgba(217, 56, 30, 0.18);
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  background-image:
    repeating-linear-gradient(90deg, rgba(237,234,228,0.015) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 20% 0%, rgba(217,56,30,0.06), transparent 45%);
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 18, 19, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 10px;
  height: 22px;
  background: var(--primary);
  transform: skewX(-18deg);
  display: inline-block;
}
.logo:hover { color: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  white-space: nowrap;
  border-radius: 6px;
  transition: all .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  width: 160px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--primary);
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: none;
}
.hero-slide.active,
.hero-slide:first-child { display: block; }
.hero-slide img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  opacity: 0.75;
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 40px 32px 28px;
  background: linear-gradient(to top, rgba(17,18,19,0.98), rgba(17,18,19,0.4) 60%, transparent);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  max-width: 640px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ Button ============ */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all .2s;
  transform: skewX(-6deg);
}
.btn span, .btn { display: inline-block; }
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  transform: skewX(-6deg) translateY(-2px);
  box-shadow: var(--shadow);
}

/* ============ Section ============ */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 2px;
  background: var(--primary);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title::before {
  content: "";
  width: 6px;
  height: 20px;
  background: var(--accent);
  transform: skewX(-18deg);
  display: inline-block;
}
.sec-more {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.sec-more:hover { color: var(--accent); }

/* ============ Grid & Card ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0a0a0b;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.card-info { padding: 10px 12px 12px; }
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.card-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

/* ============ Category list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.cat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.cat-item:hover {
  color: var(--text);
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}
.cat-item:hover::before { transform: scaleX(1); }
.cat-count {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ============ Rank list ============ */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all .2s;
}
.rank-item:hover {
  border-color: var(--primary);
  background: #222325;
  transform: translateX(4px);
}
.rank-num {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  min-width: 32px;
  text-align: center;
  letter-spacing: 0.5px;
}
.rank-item:nth-child(-n+3) .rank-num { color: var(--accent); }
.rank-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-score {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ============ Detail ============ */
.detail { margin: 28px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--line);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
}
.detail-meta p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}
.detail-meta p b { color: var(--text); font-weight: 700; }
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  align-self: flex-start;
  letter-spacing: 1px;
}
.detail-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 20px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; color: var(--muted); }

/* ============ Tag list ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  background: rgba(237,234,228,0.05);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
  transition: all .2s;
}
.tag:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: 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-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all .2s;
}
.pg:hover {
  color: var(--text);
  border-color: var(--primary);
}
.pg.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}
.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
  transition: color .2s;
}
.link-item:hover { color: var(--accent); }

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ============ Crumbs ============ */
.crumbs {
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
  letter-spacing: 0.3px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--text); }

/* ============ Highlight ============ */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(255, 138, 30, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

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

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }
  .nav a { padding: 5px 10px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 16px 0; }
  .hero-slide img { aspect-ratio: 16 / 10; }
  .hero-info { padding: 24px 16px 16px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }

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

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

  .rank-item { padding: 10px 12px; gap: 10px; }
  .rank-title { font-size: 13px; }

  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 16px; }

  .pager { gap: 6px; }
  .pg { min-width: 34px; height: 34px; font-size: 12px; padding: 0 8px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: repeat(2, 1fr); }
}