:root {
  --bg: #121216;
  --surface: #1C1C23;
  --primary: #FF8A1E;
  --accent: #FFC24B;
  --text: #F4F2EE;
  --muted: #8B8B96;
  --radius: 14px;
  --radius-sm: 8px;
  --font-heading: 'Barlow Condensed', 'Oswald', 'PingFang SC', sans-serif;
  --font-body: 'IBM Plex Mono', 'JetBrains Mono', 'Noto Sans SC', monospace;
  --glow: 0 0 18px rgba(255, 138, 30, .35);
  --border: 1px solid rgba(255, 138, 30, .16);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 20% 0%, rgba(255,138,30,.06), transparent 55%);
}

a { color: inherit; text-decoration: none; transition: color .2s; }
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(18, 18, 22, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: var(--border);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  text-shadow: var(--glow);
}
.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: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(255, 138, 30, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 30, .25);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  min-width: 200px;
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #1a1206;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  transition: box-shadow .2s;
}
.search-box button:hover { box-shadow: var(--glow); }

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

.hero-slide {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18,18,22,.94) 0%, rgba(18,18,22,.55) 55%, rgba(18,18,22,.15) 100%),
              linear-gradient(0deg, rgba(18,18,22,.95) 0%, transparent 60%);
}

.hero-info {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 620px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: .5px;
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.hero-info .meta span {
  font-size: 12px;
  color: var(--accent);
  padding: 2px 10px;
  border: 1px solid rgba(255, 194, 75, .3);
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: #1a1206;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}
.btn:hover { color: #1a1206; box-shadow: var(--glow); transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(255, 138, 30, .5);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 138, 30, .1); color: var(--accent); }

/* ===== 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 rgba(255, 138, 30, .14);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .5px;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.sec-more {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.08);
  padding: 5px 14px;
  border-radius: 999px;
  transition: all .2s;
}
.sec-more:hover {
  color: var(--primary);
  border-color: rgba(255, 138, 30, .4);
}

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 30, .45);
  box-shadow: 0 10px 30px rgba(0,0,0,.5), var(--glow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0d0d10;
}
.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;
  z-index: 2;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: #1a1206;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 1px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(255, 138, 30, .5);
  transition: transform .25s;
}
.card:hover .card-score { transform: translateY(-3px); }

.card-info { padding: 10px 12px 12px; }
.card-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-title:hover { color: var(--primary); }
.card-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 分类列表 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all .2s;
}
.cat-item:hover {
  border-color: rgba(255, 138, 30, .45);
  color: var(--primary);
  box-shadow: var(--glow);
}
.cat-count {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 138, 30, .1);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ===== 排行榜 ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all .2s;
}
.rank-item:hover {
  background: var(--surface);
  border-color: var(--border);
}
.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #1a1206;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.rank-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== 详情页 ===== */
.detail { margin: 28px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.detail-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255,138,30,.08), transparent 60%);
  pointer-events: none;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 138, 30, .25);
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta { position: relative; z-index: 1; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 6px;
}
.detail-meta .sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.detail-meta .info-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.detail-meta .info-list b { color: var(--text); font-weight: 500; }
.detail-meta .info-list a { color: var(--accent); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 40px;
  color: var(--accent);
  text-shadow: var(--glow);
  margin-bottom: 16px;
}
.detail-score small { font-size: 13px; color: var(--muted); font-family: var(--font-body); font-weight: 400; }

.detail-body {
  margin-top: 24px;
  padding: 24px 28px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.9;
  color: #d8d6d0;
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 18px 0 10px;
  font-size: 20px;
}
.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: var(--radius-sm); margin: 12px auto; }

/* ===== 标签 ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag {
  font-size: 12px;
  color: var(--accent);
  padding: 3px 12px;
  border: 1px solid rgba(255, 194, 75, .28);
  border-radius: 999px;
  transition: all .2s;
}
.tag:hover {
  background: rgba(255, 138, 30, .12);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== 分页 ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: 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-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: rgba(255, 138, 30, .45);
}
.pg.current {
  color: #1a1206;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: var(--glow);
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.link-item {
  font-size: 12px;
  color: var(--muted);
  transition: color .2s;
}
.link-item:hover { color: var(--primary); }

/* ===== 面包屑 ===== */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: rgba(255,255,255,.2); }

/* ===== 搜索高亮 ===== */
.hl {
  color: #1a1206;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 700;
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: var(--border);
  background: linear-gradient(180deg, transparent, rgba(255, 138, 30, .03));
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer .copy { margin-top: 8px; opacity: .7; }

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

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo { font-size: 22px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 6px 10px; font-size: 12px; }
  .search-box {
    order: 2;
    margin-left: auto;
    min-width: 0;
    width: 160px;
  }
  .search-box input { font-size: 12px; }

  .hero { margin: 16px 0; }
  .hero-slide { min-height: 300px; }
  .hero-info { padding: 22px 18px; }
  .hero-info h2 { font-size: 24px; }
  .hero-info p { -webkit-line-clamp: 2; font-size: 12px; }
  .btn { padding: 9px 20px; font-size: 12px; }

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

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-info { padding: 8px 10px 10px; }
  .card-title { font-size: 12px; }
  .card-meta { font-size: 10px; }

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .detail-cover { max-width: 180px; margin: 0 auto; }
  .detail-meta h1 { font-size: 24px; text-align: center; }
  .detail-meta .sub { text-align: center; }
  .detail-meta .info-list { grid-template-columns: 1fr; }
  .detail-score { display: flex; justify-content: center; font-size: 32px; }
  .detail-body { padding: 18px; font-size: 13px; }

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

  .footer { margin-top: 32px; padding: 24px 0 32px; }
}