:root {
  --bg: #0E1116;
  --surface: #1A1F26;
  --primary: #3B82F6;
  --accent: #22D3EE;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --radius: 14px;
  --radius-sm: 8px;
  --border: rgba(148, 163, 184, 0.14);
  --glass: rgba(26, 31, 38, 0.72);
  --glow: 0 8px 30px rgba(34, 211, 238, 0.12);
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

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(1200px 600px at 80% -10%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(34, 211, 238, 0.08), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.25;
  font-weight: 700;
}

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 17, 22, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo img { height: 30px; 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: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.16);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  min-width: 220px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #06121f;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
}

/* ============ Hero 轮播 ============ */
.hero {
  position: relative;
  margin: 26px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--glow);
}

.hero-slide {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  animation: heroFade 1s ease both;
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14,17,22,0.94) 0%, rgba(14,17,22,0.72) 45%, rgba(14,17,22,0.15) 100%),
              linear-gradient(0deg, rgba(14,17,22,0.9), transparent 55%);
}

@keyframes heroFade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 40px;
}
.hero-info h2 {
  font-size: 34px;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-info p {
  color: var(--muted);
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: #06121f;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 22px rgba(34, 211, 238, 0.28);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.4);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--accent); }

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

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

.sec-title {
  position: relative;
  font-size: 22px;
  padding-left: 14px;
}
.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(--primary), var(--accent));
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.sec-more:hover { color: var(--accent); }

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

.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.16);
}

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35);
}

.card-info {
  padding: 12px 13px 14px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-head);
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ Cat list ============ */
.cat-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.cat-list::-webkit-scrollbar { display: none; }

.cat-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  transition: border-color .2s, background .2s;
  white-space: nowrap;
}
.cat-item:hover {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

/* ============ Rank ============ */
.rank-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
}
.rank-item:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateX(4px);
}

.rank-num {
  flex: 0 0 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
}
.rank-item:nth-child(1) .rank-num { color: #06121f; background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-item:nth-child(2) .rank-num { color: #06121f; background: linear-gradient(135deg, #e2e8f0, #94a3b8); }
.rank-item:nth-child(3) .rank-num { color: #06121f; background: linear-gradient(135deg, #f59e0b, #b45309); }

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

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

/* ============ Detail ============ */
.detail { margin: 32px auto; }

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--glow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0b0e13;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-meta h1 {
  font-size: 28px;
  margin-bottom: 4px;
}
.detail-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
}
.detail-score small { font-size: 13px; color: var(--muted); font-weight: 400; }

.detail-body {
  margin-top: 26px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  line-height: 1.85;
  color: #cbd5e1;
}
.detail-body h2, .detail-body h3 {
  color: var(--text);
  margin: 18px 0 10px;
}
.detail-body p { margin: 0 0 12px; }
.detail-body img { border-radius: var(--radius-sm); margin: 12px 0; }

/* ============ Tags ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  transition: background .2s;
}
.tag:hover { background: rgba(34, 211, 238, 0.2); }

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0;
}
.pg {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s, background .2s;
}
.pg:hover {
  color: var(--text);
  border-color: var(--primary);
}
.pg.current {
  color: #06121f;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.4);
}

/* ============ Footer ============ */
.footer {
  margin-top: 50px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: rgba(14, 17, 22, 0.6);
  color: var(--muted);
  font-size: 13px;
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--accent); }

/* ============ Crumbs ============ */
.crumbs {
  padding: 18px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--text); }

/* ============ Highlight ============ */
.hl {
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 600;
}

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 12px;
  }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .search-box {
    min-width: 0;
    flex: 1;
  }

  .hero { margin: 16px auto; }
  .hero-slide { min-height: 300px; }
  .hero-info { padding: 22px; max-width: 100%; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { -webkit-line-clamp: 2; font-size: 13px; }

  .sec { margin: 26px auto; }
  .sec-title { font-size: 18px; }

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }
  .detail-cover {
    max-width: 180px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 18px; margin-top: 18px; }

  .rank-item { padding: 10px 12px; gap: 10px; }
  .rank-title { font-size: 13px; }

  .footer .wrap {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-info { padding: 9px 10px 11px; }
  .card-title { font-size: 13px; }
}
</style>