:root {
  --bg: #121214;
  --surface: #1C1C1F;
  --primary: #FF5E1F;
  --accent: #B44CFF;
  --text: #EDEDF2;
  --muted: #8A8A95;
  --radius: 10px;
  --font-heading: 'Courier New', monospace, 'Microsoft YaHei';
  --font-body: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --line: rgba(255, 255, 255, 0.08);
}

* { 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: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(180, 76, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 76, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font-family: inherit; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  background: linear-gradient(120deg, #fff 0%, #c9c9d4 40%, var(--primary) 60%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(255, 94, 31, 0.25);
}

.logo img { height: 32px; width: auto; }

.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;
  font-size: 14px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(255, 94, 31, 0.08);
  text-shadow: 0 0 12px rgba(255, 94, 31, 0.5);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 4px 4px 12px;
  min-width: 200px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  padding: 6px 0;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  background: var(--primary);
  color: #121214;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.search-box button:hover {
  box-shadow: 0 0 16px rgba(255, 94, 31, 0.6);
  transform: translateY(-1px);
}

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  width: 100%;
  height: 78vh;
  min-height: 420px;
  max-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  background-size: cover;
  background-position: center;
}
.hero-slide.active { opacity: 1; }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 18, 20, 0.95) 0%, rgba(18, 18, 20, 0.55) 45%, rgba(18, 18, 20, 0.15) 100%),
    repeating-linear-gradient(0deg, rgba(180, 76, 255, 0.05) 0 1px, transparent 1px 4px);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 16px 56px;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
}

.hero-info p {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 11px 28px;
  background: var(--primary);
  color: #121214;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}
.btn:hover {
  box-shadow: 0 0 24px rgba(255, 94, 31, 0.65);
  transform: translateY(-2px);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.ghost:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(180, 76, 255, 0.4);
}

/* ===== Section ===== */
.sec { padding: 40px 0; }

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

.sec-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px rgba(255, 94, 31, 0.7);
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 94, 31, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(255, 94, 31, 0.18);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0c0c0e;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(180, 76, 255, 0.06) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #121214;
  background: var(--primary);
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(255, 94, 31, 0.55);
}

.card-info { padding: 10px 12px 12px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.card:hover .card-title { color: var(--primary); }

.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== 分类 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.cat-item:hover {
  color: var(--primary);
  border-color: rgba(180, 76, 255, 0.5);
  box-shadow: 0 0 16px rgba(180, 76, 255, 0.2);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-heading);
}

/* ===== 排行榜 ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.rank-item:hover {
  border-color: rgba(255, 94, 31, 0.45);
  transform: translateX(4px);
}

.rank-num {
  flex: 0 0 28px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
}
.rank-item:nth-child(1) .rank-num { color: var(--primary); text-shadow: 0 0 10px rgba(255, 94, 31, 0.7); }
.rank-item:nth-child(2) .rank-num { color: var(--accent); }
.rank-item:nth-child(3) .rank-num { color: #ffd166; }

.rank-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--primary);
}

/* ===== 详情 ===== */
.detail { padding: 32px 0; }

.detail-head {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.detail-cover {
  flex: 0 0 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.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: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  margin-bottom: 14px;
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  margin: 10px 0 16px;
  padding: 4px 14px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid rgba(255, 94, 31, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 0 18px rgba(255, 94, 31, 0.25), inset 0 0 14px rgba(255, 94, 31, 0.08);
}

.detail-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-size: 15px;
  line-height: 1.85;
  color: #c9c9d4;
}
.detail-body p { margin-bottom: 12px; }
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 18px 0 10px;
}

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(180, 76, 255, 0.08);
  border: 1px solid rgba(180, 76, 255, 0.25);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--accent); border-color: var(--accent); }

/* ===== 分页 ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0 12px;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pg:hover { color: var(--primary); border-color: rgba(255, 94, 31, 0.5); }

.pg.current {
  color: #121214;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255, 94, 31, 0.5);
}

.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 24px 0;
}

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

/* ===== 面包屑 ===== */
.crumbs {
  padding: 18px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color 0.2s; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; opacity: 0.5; }

/* ===== 高亮 ===== */
.hl {
  color: var(--primary);
  background: rgba(255, 94, 31, 0.12);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(28, 28, 31, 0.6));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

  .nav a { padding: 6px 10px; font-size: 13px; }

  .search-box { min-width: 0; flex: 1; }

  .hero { height: 62vh; min-height: 340px; }
  .hero-info { padding-bottom: 36px; }

  .sec { padding: 28px 0; }

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

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

  .detail-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .detail-cover { flex: 0 0 auto; width: 60%; max-width: 240px; }
  .detail-meta { width: 100%; }

  .detail-body { padding: 18px 16px; }

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