:root {
  --bg: #0d0f0e;
  --surface: #1a1f1d;
  --primary: #00e6b8;
  --accent: #e63946;
  --text: #e8e3d9;
  --muted: #7a8a82;
  --radius: 12px;
  --font-heading: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(0, 230, 184, 0.16);
  --glass: rgba(26, 31, 29, 0.72);
}

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

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

body {
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 230, 184, 0.025) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 20% 0%, rgba(0, 230, 184, 0.06), transparent 45%),
    radial-gradient(circle at 90% 100%, rgba(230, 57, 70, 0.05), transparent 40%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

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

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

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

.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: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(0, 230, 184, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-box input {
  width: 180px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
  background: rgba(13, 15, 14, 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 230, 184, 0.12);
}
.search-box button {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--bg);
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: filter .2s;
}
.search-box button:hover { filter: brightness(1.1); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 380px;
  background-size: cover;
  background-position: center;
}
.hero-slide.active { display: block; }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 15, 14, 0.92) 0%, rgba(13, 15, 14, 0.55) 45%, transparent 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 56px 48px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.hero-info .hero-meta span {
  padding: 3px 10px;
  font-size: 12px;
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 230, 184, 0.06);
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: linear-gradient(135deg, var(--primary), #00b894);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  font-family: var(--font-body);
}
.btn:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 230, 184, 0.28);
}
.btn.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}
.btn.ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
}

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

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

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

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

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 230, 184, 0.4);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111;
}
.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 9px;
  font-size: 12px;
  font-weight: 700;
  color: #1a1200;
  background: linear-gradient(135deg, #f6d365, #fda085);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card-info { padding: 12px; }

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.card:hover .card-title { color: var(--primary); }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.card-meta span {
  padding: 1px 7px;
  border: 1px solid rgba(122, 138, 130, 0.25);
  border-radius: 4px;
}

/* ============ Cat list ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  color: var(--primary);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
.rank-item:hover {
  border-color: var(--line);
  background: rgba(0, 230, 184, 0.04);
}

.rank-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 6px;
  background: rgba(0, 230, 184, 0.06);
}
.rank-item:nth-child(1) .rank-num { color: #f6d365; background: rgba(246, 211, 101, 0.12); }
.rank-item:nth-child(2) .rank-num { color: #cfd8dc; background: rgba(207, 216, 220, 0.1); }
.rank-item:nth-child(3) .rank-num { color: #e0a06a; background: rgba(224, 160, 106, 0.12); }

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

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

/* ============ Detail ============ */
.detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  margin: 32px 0;
}

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

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  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: 28px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.detail-meta .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.detail-meta ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 24px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.detail-meta ul li strong { color: var(--text); font-weight: 500; }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: #1a1200;
  background: linear-gradient(135deg, #f6d365, #fda085);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.detail-score small { font-size: 12px; font-weight: 400; }

.detail-body {
  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 h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 20px 0 10px;
  color: var(--primary);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; color: var(--muted); }
.detail-body img { border-radius: var(--radius); margin: 12px 0; }

/* ============ Tag list ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(0, 230, 184, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ============ 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: 8px;
  transition: color .2s, border-color .2s, background .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.pg.current {
  color: var(--bg);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--primary); }

/* ============ Footer ============ */
.footer {
  margin-top: 56px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: rgba(13, 15, 14, 0.6);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ============ Crumbs ============ */
.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); }

/* ============ Highlight ============ */
.hl {
  padding: 0 2px;
  color: var(--bg);
  background: var(--primary);
  border-radius: 3px;
}

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

@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: none;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 120px; }

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

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

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

  .detail { grid-template-columns: 1fr; gap: 20px; }
  .detail-head { flex-direction: column; padding: 18px; }
  .detail-cover { width: 140px; }
  .detail-meta h1 { font-size: 22px; }
  .detail-meta ul { grid-template-columns: 1fr; }
  .detail-body { padding: 18px; }

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