:root {
  --bg: #080B0E;
  --surface: #11161C;
  --primary: #2EF2C4;
  --accent: #B26BFF;
  --text: #E9F1ED;
  --muted: #7E8C93;
  --radius: 14px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(46, 242, 196, 0.18);
  --glow: 0 0 18px rgba(46, 242, 196, 0.22);
}

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

html { -webkit-text-size-adjust: 100%; }

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(178, 107, 255, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(46, 242, 196, 0.08), transparent 55%);
  background-attachment: fixed;
}

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

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

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

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-shadow: var(--glow);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.nav a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover {
  color: var(--primary);
  background: rgba(46, 242, 196, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 4px 4px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.search-box input {
  width: 150px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: #05100c;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(46, 242, 196, 0.08);
}

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

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 32px 28px;
  background: linear-gradient(to top, rgba(8, 11, 14, 0.95), transparent);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 24px;
  font-size: 14px;
  font-weight: 700;
  color: #05100c;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  border: none;
  box-shadow: var(--glow);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(178, 107, 255, 0.4);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  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(var(--primary), var(--accent));
  box-shadow: var(--glow);
}

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

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

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(46, 242, 196, 0.16);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0d1216;
}
.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: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(8, 11, 14, 0.78);
  border: 1px solid var(--primary);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.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;
  margin-bottom: 4px;
}

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

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

.cat-item {
  flex-shrink: 0;
  padding: 10px 22px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s;
}
.cat-item:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
}

/* ===== Rank list ===== */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.rank-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(178, 107, 255, 0.2);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  min-width: 48px;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--primary);
  opacity: .9;
}
.rank-item:nth-child(-n+3) .rank-num {
  color: var(--accent);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 16px rgba(178, 107, 255, 0.6);
}

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

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

/* ===== Detail ===== */
.detail { margin: 28px 0; }

.detail-head {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-cover {
  width: 220px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.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: 26px;
  margin-bottom: 10px;
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-block;
  margin: 12px 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-shadow: var(--glow);
}

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body p { margin-bottom: 12px; }

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(46, 242, 196, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s;
}
.tag:hover {
  background: rgba(46, 242, 196, 0.18);
  box-shadow: var(--glow);
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  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 var(--line);
  border-radius: 10px;
  transition: all .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.pg.current {
  color: #05100c;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: var(--glow);
}

.pg.disabled {
  opacity: .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: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--primary); }

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

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  background: rgba(46, 242, 196, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

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

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

  .hero { margin: 16px auto; border-radius: 12px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 40px 18px 18px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; }

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

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

  .rank-list { grid-template-columns: 1fr; }
  .rank-num { font-size: 28px; min-width: 40px; }

  .detail-head { flex-direction: column; padding: 16px; gap: 16px; }
  .detail-cover { width: 140px; }
  .detail-meta h1 { font-size: 20px; }
  .detail-body { padding: 16px; font-size: 14px; }

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