:root {
  --bg: #0A0C0E;
  --surface: #141A1F;
  --primary: #B4FF3C;
  --accent: #7A5CFF;
  --text: #E8F2EC;
  --muted: #7E8B84;
  --radius: 10px;
  --font-heading: 'Inter', 'PingFang SC', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Segoe UI', system-ui, sans-serif;
  --glass: rgba(20, 26, 31, 0.62);
  --line: rgba(180, 255, 60, 0.14);
  --glow: 0 0 0 1px rgba(180, 255, 60, 0.18), 0 8px 30px rgba(122, 92, 255, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 500px at 12% -8%, rgba(180, 255, 60, 0.07), transparent 60%),
    radial-gradient(800px 460px at 92% 4%, rgba(122, 92, 255, 0.10), transparent 62%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.01em; margin: 0; }

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

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

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(180, 255, 60, 0.35);
}

.logo span, .logo em { color: var(--primary); font-style: normal; }

.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 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav a:hover, .nav a.active {
  color: var(--primary);
  background: rgba(180, 255, 60, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  min-width: 210px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  background: transparent;
  border: 0;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 26px 0 34px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--glow);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
}

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

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: 560px;
  padding: 30px;
}

.hero-info h2 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}

.hero-info p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #0A0C0E;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 22px rgba(180, 255, 60, 0.28);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(180, 255, 60, 0.45); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Section ---------- */
.sec { margin: 46px 0; }

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

.sec-title {
  position: relative;
  font-size: 21px;
  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));
  box-shadow: 0 0 12px rgba(180, 255, 60, 0.5);
}

.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 {
  display: block;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(180, 255, 60, 0.4);
  box-shadow: 0 10px 32px rgba(122, 92, 255, 0.18), 0 0 0 1px rgba(180, 255, 60, 0.22);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0d1114;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: #0A0C0E;
  background: var(--primary);
  box-shadow: 0 0 14px rgba(180, 255, 60, 0.45);
}

.card-info { padding: 10px 12px 12px; }

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ---------- Cat list ---------- */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  transition: border-color .2s, color .2s, transform .2s;
}

.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(180, 255, 60, 0.08);
  border-radius: 20px;
  padding: 0 8px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid transparent;
  transition: border-color .2s, background .2s;
}

.rank-item:hover { border-color: var(--line); background: var(--surface); }

.rank-num {
  flex: 0 0 26px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}

.rank-item:nth-child(-n+3) .rank-num {
  color: var(--primary);
  text-shadow: 0 0 14px rgba(180, 255, 60, 0.5);
}

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

.rank-score {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail { margin: 30px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  padding: 24px;
  border-radius: calc(var(--radius) + 2px);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glow);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1114;
}

.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta { font-size: 14px; color: var(--muted); line-height: 2; }
.detail-meta strong { color: var(--text); font-weight: 500; }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 24px rgba(180, 255, 60, 0.4);
  margin-bottom: 8px;
}

.detail-score small { font-size: 14px; color: var(--muted); font-weight: 400; }

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

.detail-body p { margin: 0 0 14px; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 20px;
  color: var(--muted);
  background: rgba(122, 92, 255, 0.10);
  border: 1px solid rgba(122, 92, 255, 0.28);
  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;
  align-items: center;
  gap: 8px;
  margin: 40px 0 10px;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: color .2s, border-color .2s, background .2s;
}

.pg:hover { color: var(--primary); border-color: var(--primary); }

.pg.current {
  color: #0A0C0E;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(180, 255, 60, 0.35);
}

.pg.disabled { opacity: .35; pointer-events: none; }

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}

.link-item:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 60px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  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 {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

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

/* ---------- 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;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .search-box { min-width: 0; flex: 1; }

  .hero { margin: 18px 0 26px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 18px; max-width: 100%; }
  .hero-info h2 { font-size: 21px; }

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

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

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

  .detail-head { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .detail-cover { max-width: 200px; }
  .detail-score { font-size: 28px; }
  .detail-body { padding: 16px; }

  .cat-item { padding: 8px 12px; font-size: 13px; }
}