:root {
  --bg: #0D0616;
  --surface: rgba(30, 15, 50, 0.6);
  --primary: #7B5CFF;
  --accent: #FF3CAC;
  --text: #F0E6FF;
  --muted: #A08FC0;
  --cyan: #00E5FF;
  --radius: 16px;
  --font-heading: 'Orbitron', 'Arial Black', 'Impact', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --glow: 0 0 18px rgba(123, 92, 255, 0.55);
  --glow-accent: 0 0 18px rgba(255, 60, 172, 0.55);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(123, 92, 255, 0.18), transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(255, 60, 172, 0.14), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 229, 255, 0.08), transparent 60%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--accent); }
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: 100;
  background: rgba(13, 6, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(123, 92, 255, 0.22);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--primary), var(--accent) 60%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(123, 92, 255, 0.4);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
  transition: all .2s;
}
.nav a:hover {
  color: var(--text);
  background: rgba(123, 92, 255, 0.18);
  box-shadow: var(--glow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.3);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .25s, border-color .25s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  font-family: var(--font-body);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
  transition: transform .2s, box-shadow .2s;
}
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-accent);
}

/* ============ HERO 轮播 ============ */
.hero {
  position: relative;
  margin: 22px auto;
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
}

.hero-slide {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: linear-gradient(135deg, #1a0b2e, #2a1045);
  border: 1px solid rgba(123, 92, 255, 0.3);
  box-shadow: 0 10px 40px rgba(123, 92, 255, 0.25), inset 0 0 60px rgba(255, 60, 172, 0.08);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: transform .6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 6, 22, 0.95) 0%, rgba(13, 6, 22, 0.35) 45%, transparent 75%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-info h2, .hero-info h1 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3.2vw, 34px);
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 0 20px rgba(123, 92, 255, 0.7);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  max-width: 620px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 6px;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(255, 60, 172, 0.7);
}

/* ============ 版块 ============ */
.sec {
  margin: 34px auto;
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  padding-left: 14px;
  background: linear-gradient(90deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  box-shadow: var(--glow-accent);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(123, 92, 255, 0.35);
  transition: all .2s;
  white-space: nowrap;
}
.sec-more:hover {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

/* ============ 卡片网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 60, 172, 0.55);
  box-shadow: 0 14px 34px rgba(123, 92, 255, 0.35), 0 0 22px rgba(255, 60, 172, 0.28);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1a0b2e, #2a1045);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.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;
  transition: color .2s;
}
.card:hover .card-title { color: var(--accent); }

.card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ 分类入口 ============ */
.cat-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.cat-list::-webkit-scrollbar { height: 6px; }
.cat-list::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
}

.cat-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  transition: all .22s;
}
.cat-item:hover {
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
  transform: translateY(-2px);
}

.cat-count {
  font-size: 11px;
  color: var(--muted);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(123, 92, 255, 0.22);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .22s;
}
.rank-item:hover {
  border-color: rgba(255, 60, 172, 0.5);
  box-shadow: var(--glow);
  transform: translateX(3px);
}

.rank-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.rank-item:nth-child(1) .rank-num { background: linear-gradient(135deg, #FFD86B, #FF3CAC); }
.rank-item:nth-child(2) .rank-num { background: linear-gradient(135deg, #C0C0D8, #7B5CFF); }
.rank-item:nth-child(3) .rank-num { background: linear-gradient(135deg, #E0A46B, #FF3CAC); }

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

.rank-score {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* ============ 详情页 ============ */
.detail {
  margin: 26px auto;
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
}

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(123, 92, 255, 0.18);
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(123, 92, 255, 0.35);
  box-shadow: var(--glow);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--text), var(--primary) 70%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow-accent);
}

.detail-body {
  margin-top: 24px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 18px 0 10px;
  color: var(--text);
}
.detail-body p { margin-bottom: 12px; color: #d8cdec; }
.detail-body a { color: var(--cyan); }
.detail-body a:hover { color: var(--accent); }

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid rgba(123, 92, 255, 0.35);
  background: rgba(123, 92, 255, 0.1);
  transition: all .2s;
}
.tag:hover {
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

/* ============ 分页 ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 34px auto;
  padding: 0 16px;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .2s;
}
.pg:hover {
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}
.pg.current {
  color: #fff;
  font-weight: 700;
  border-color: transparent;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
}

/* ============ 友情链接 ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px;
  max-width: 1200px;
  margin: 26px auto;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid rgba(123, 92, 255, 0.2);
  transition: all .2s;
}
.link-item:hover {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

/* ============ 面包屑 ============ */
.crumbs {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--primary); }

/* ============ 搜索高亮 ============ */
.hl {
  color: #fff;
  padding: 0 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(123, 92, 255, 0.7), rgba(255, 60, 172, 0.7));
  box-shadow: 0 0 10px rgba(255, 60, 172, 0.5);
}

/* ============ 页脚 ============ */
.footer {
  margin-top: 50px;
  padding: 30px 16px 40px;
  border-top: 1px solid rgba(123, 92, 255, 0.22);
  background: linear-gradient(180deg, transparent, rgba(30, 15, 50, 0.5));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.footer p { margin: 2px 0; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .detail-head { grid-template-columns: 200px 1fr; gap: 20px; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }

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

  .hero { margin: 14px auto; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 16px; }
  .hero-info p { display: none; }

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

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

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

  .detail { margin: 16px auto; }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta { text-align: center; }
  .detail-score { align-self: center; }
  .detail-body { padding: 16px; font-size: 14px; }

  .pg { min-width: 34px; height: 34px; font-size: 13px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .search-box input { width: 70px; }
}