:root {
  --bg: #1A1B1D;
  --surface: #242629;
  --primary: #FF6B1A;
  --accent: #E8E4DC;
  --text: #ECEAE5;
  --muted: #8B8E93;
  --radius: 4px;
  --line: #33363A;
  --font-head: 'Courier New', 'PingFang SC', 'Microsoft YaHei', monospace;
  --font-body: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    linear-gradient(180deg, rgba(255,107,26,0.03), transparent 200px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}

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

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #202225, #1A1B1D);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,107,26,0.08);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--primary);
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--primary);
}
.logo:hover { color: var(--primary); }

.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: 13px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(255,107,26,0.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;
  transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input {
  width: 180px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 8px 14px;
  background: var(--primary);
  border: none;
  color: #1A1B1D;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .2s;
}
.search-box button:hover { filter: brightness(1.1); }

/* Hero */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}
.hero-slide:hover img { transform: scale(1.03); }
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 24px 24px;
  background: linear-gradient(0deg, rgba(26,27,29,0.96) 10%, transparent);
}
.hero-info h2 {
  font-family: var(--font-head);
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--accent);
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  max-width: 640px;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary);
  color: #1A1B1D;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all .2s;
}
.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: 0 0 12px rgba(255,107,26,0.3);
}

/* Section */
.sec { margin: 32px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}
.sec-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  margin-right: 10px;
  background: var(--primary);
  vertical-align: -2px;
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-head);
  transition: color .2s;
}
.sec-more:hover { color: var(--primary); }

/* Grid & Card */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .5;
}
.card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,107,26,0.2);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #151618;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  background: rgba(26,27,29,0.85);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.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:hover .card-title { color: var(--primary); }
.card-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-head);
}

/* Category list */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 13px;
  transition: all .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  padding: 1px 8px;
  background: rgba(255,107,26,0.1);
  border-radius: var(--radius);
}
.cat-item:hover .cat-count { color: var(--primary); }

/* Rank list */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s;
}
.rank-item:hover {
  border-color: var(--primary);
  border-left-color: var(--primary);
  background: #2A2C30;
}
.rank-num {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--primary); }
.rank-title {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--primary); }
.rank-score {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* Detail */
.detail { margin: 24px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.detail-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 3px 3px;
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #151618;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta { position: relative; z-index: 1; }
.detail-meta h1 {
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1.3;
}
.detail-score {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 12px;
  background: rgba(255,107,26,0.1);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
}
.detail-meta p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p span { color: var(--text); }
.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-head);
  font-size: 16px;
  color: var(--accent);
  margin: 16px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}
.detail-body h2:first-child { margin-top: 0; }

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  font-family: var(--font-head);
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* Pager */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 32px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.pg.current {
  color: #1A1B1D;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* Links */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 16px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.link-item:hover { color: var(--primary); }

/* Crumbs */
.crumbs {
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-head);
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--primary); }

/* Highlight */
.hl {
  color: var(--primary);
  background: rgba(255,107,26,0.12);
  padding: 0 2px;
  border-radius: 2px;
}

/* Footer */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.2));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-head);
}
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 6px; }

/* 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 12px; }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .logo { font-size: 17px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    padding-bottom: 4px;
  }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }

  .hero { margin: 16px 0; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 40px 16px 16px; }
  .hero-info h2 { font-size: 18px; }

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

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

  .sec-title { font-size: 16px; }
  .pg { min-width: 32px; height: 32px; }
}