:root {
  --bg: #0A0A0C;
  --surface: #16161A;
  --primary: #00E5C0;
  --accent: #B14EFF;
  --text: #E8E8F0;
  --muted: #8A8A9A;
  --radius: 16px;
  --font-heading: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { 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;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(177, 78, 255, 0.08), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(0, 229, 192, 0.07), transparent 40%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 229, 192, 0.12);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

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

.nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav a:hover {
  color: var(--primary);
  background: rgba(0, 229, 192, 0.08);
  text-shadow: 0 0 12px rgba(0, 229, 192, 0.5);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-box input {
  width: 180px;
  height: 38px;
  padding: 0 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 229, 192, 0.2);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.12);
}
.search-box button {
  height: 38px;
  padding: 0 18px;
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.search-box button:hover { filter: brightness(1.12); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 28px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 229, 192, 0.16);
  background: var(--surface);
  box-shadow: 0 0 40px rgba(0, 229, 192, 0.06), 0 0 60px rgba(177, 78, 255, 0.05);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 12, 0.92) 0%, rgba(10, 10, 12, 0.4) 55%, transparent 100%),
              linear-gradient(0deg, rgba(10, 10, 12, 0.85) 0%, transparent 45%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: 620px;
  padding: 32px;
}
.hero-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 229, 192, 0.35);
}

/* ===== Section ===== */
.sec { margin: 40px auto; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  box-shadow: -4px 0 12px -4px rgba(0, 229, 192, 0.5);
}

.sec-title {
  font-size: 22px;
  letter-spacing: 0.5px;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 14px;
  border: 1px solid rgba(138, 138, 154, 0.3);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.sec-more:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(0, 229, 192, 0.3);
}

/* ===== Grid 卡片 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 192, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 229, 192, 0.15);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #101014;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(0, 229, 192, 0.4);
}

.card-info { padding: 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 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
}
.cat-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(177, 78, 255, 0.25);
  transform: translateY(-3px);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: all 0.25s ease;
}
.rank-item:hover {
  border-color: rgba(0, 229, 192, 0.4);
  background: rgba(0, 229, 192, 0.04);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.rank-item:nth-child(1) .rank-num { color: #FFD700; background: rgba(255, 215, 0, 0.12); }
.rank-item:nth-child(2) .rank-num { color: #C0C0C0; background: rgba(192, 192, 192, 0.12); }
.rank-item:nth-child(3) .rank-num { color: #CD7F32; background: rgba(205, 127, 50, 0.12); }

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

.rank-score {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== 详情页 ===== */
.detail { margin: 32px auto; }

.detail-head {
  display: flex;
  gap: 32px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 28px;
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 192, 0.2);
  box-shadow: 0 0 30px rgba(0, 229, 192, 0.1);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  min-width: 0;
}
.detail-meta h1 {
  font-size: 26px;
  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: 12px 0;
  padding: 4px 14px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 229, 192, 0.35);
}

.detail-body {
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: #C8C8D4;
}
.detail-body h2, .detail-body h3 { margin: 20px 0 10px; color: var(--text); }
.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: 10px; margin: 12px 0; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(0, 229, 192, 0.08);
  border: 1px solid rgba(0, 229, 192, 0.25);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.tag:hover {
  color: var(--bg);
  background: var(--primary);
  box-shadow: 0 0 14px rgba(0, 229, 192, 0.4);
}

/* ===== 分页 ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: 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: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.pg.current {
  color: var(--bg);
  font-weight: 700;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 0 16px rgba(0, 229, 192, 0.4);
}

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

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

.link-item {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.link-item:hover {
  color: var(--primary);
  border-color: rgba(0, 229, 192, 0.4);
}

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

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--bg);
  background: var(--primary);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  border-top: 1px solid rgba(0, 229, 192, 0.12);
  background: linear-gradient(180deg, transparent, rgba(22, 22, 26, 0.6));
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .logo { font-size: 19px; }

  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    padding-bottom: 4px;
  }
  .nav a { padding: 6px 12px; font-size: 13px; }

  .search-box { margin-left: auto; }
  .search-box input { width: 130px; height: 34px; }
  .search-box button { height: 34px; padding: 0 14px; }

  .hero { margin: 18px auto; border-radius: 12px; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 18px; max-width: 100%; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; margin-bottom: 12px; -webkit-line-clamp: 2; }
  .btn { padding: 8px 18px; font-size: 13px; }

  .sec { margin: 28px auto; }
  .sec-title { font-size: 18px; }
  .sec-more { font-size: 12px; padding: 5px 12px; }

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

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

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

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

  .pager { gap: 6px; margin: 24px 0; }
  .pg { min-width: 34px; height: 34px; font-size: 13px; padding: 0 10px; }
}