:root {
  --bg: #1A1A1D;
  --surface: #26262A;
  --primary: #FF6B1A;
  --accent: #D4AF37;
  --text: #E8E6E3;
  --muted: #8A8A8F;
  --radius: 8px;
  --font-heading: 'Courier New', Courier, monospace;
  --font-body: 'Helvetica Neue', Arial, sans-serif;
  --line: rgba(212, 175, 55, 0.18);
  --metal: repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px);
}

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

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

body {
  background-color: var(--bg);
  background-image: var(--metal);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

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: 100;
  background: rgba(26, 26, 29, 0.94);
  backdrop-filter: blur(8px);
  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: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  white-space: nowrap;
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}
.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: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 4px;
  position: relative;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(255, 107, 26, 0.08);
}

.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: 14px;
  padding: 8px 12px;
  width: 180px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--primary);
  border: none;
  color: #1A1A1D;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: filter .25s ease;
}
.search-box button:hover { filter: brightness(1.15); }

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

.hero-slide {
  display: none;
  position: relative;
  aspect-ratio: 16 / 7;
  animation: heroFade .8s ease;
}
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.7);
}

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

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 40px 32px 28px;
  background: linear-gradient(to top, rgba(26,26,29,0.96), rgba(26,26,29,0));
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: var(--text);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
  max-width: 640px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #1A1A1D;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: transform .25s ease, filter .25s ease;
}
.btn:hover {
  color: #1A1A1D;
  filter: brightness(1.12);
  transform: translateY(-2px);
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn.ghost:hover { color: var(--accent); background: rgba(212,175,55,0.1); }

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

/* ===== 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: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255,107,26,0.5);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1e1e21;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .3s ease, transform .3s ease;
}
.card:hover .card-cover img {
  filter: brightness(1.12);
  transform: scale(1.05);
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(26,26,29,0.85);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}

.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: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  transition: border-color .25s ease, color .25s ease;
}
.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cat-count {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 1px 7px;
  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);
  transition: border-color .25s ease, transform .25s ease;
}
.rank-item:hover {
  border-color: rgba(255,107,26,0.5);
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
}
.rank-item:nth-child(1) .rank-num { color: var(--primary); }
.rank-item:nth-child(2) .rank-num { color: var(--accent); }
.rank-item:nth-child(3) .rank-num { color: #b87333; }

.rank-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Detail ===== */
.detail {
  margin: 28px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-head {
  display: flex;
  gap: 28px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.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: 26px;
  letter-spacing: 1px;
  margin-bottom: 14px;
  color: var(--text);
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 4px 14px;
  margin: 10px 0 16px;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}

.detail-body {
  padding: 24px 28px 32px;
  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;
  letter-spacing: 1px;
}
.detail-body p { margin-bottom: 14px; color: #cfccc8; }

/* ===== Tag list ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 12px;
  transition: color .25s ease, border-color .25s ease;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: 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);
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #1A1A1D;
  font-weight: 700;
}

.pg.disabled {
  color: var(--muted);
  opacity: .45;
  pointer-events: none;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .25s ease;
}
.link-item:hover { color: var(--accent); }

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

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

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(38,38,42,0.6);
  padding: 28px 0 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 6px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero-info h2 { font-size: 24px; }
}

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

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

  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 24px 16px 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

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

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

  .sec-title { font-size: 17px; }

  .detail-head {
    flex-direction: column;
    padding: 18px;
    gap: 18px;
  }
  .detail-cover { width: 140px; }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 18px; font-size: 14px; }

  .cat-item { padding: 6px 12px; font-size: 13px; }

  .footer { margin-top: 32px; font-size: 12px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}