:root {
  --bg: #0C0A12;
  --surface: #15121F;
  --primary: #8B5CF6;
  --accent: #2BE8D8;
  --text: #F2EFFA;
  --muted: #9A93B3;
  --radius: 14px;
  --line: rgba(242, 239, 250, 0.08);
  --line-strong: rgba(43, 232, 216, 0.35);
  --font-heading: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(139, 92, 246, 0.12), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(43, 232, 216, 0.08), transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
}

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 18, 0.72);
  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: 66px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--text);
  text-shadow: 0 0 18px rgba(43, 232, 216, 0.35);
}

.logo:hover {
  color: var(--accent);
}

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

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 8px;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  background: rgba(43, 232, 216, 0.07);
}

.search-box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 18, 31, 0.7);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(43, 232, 216, 0.1);
}

.search-box input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

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

.search-box button {
  border: 0;
  cursor: pointer;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  color: #0C0A12;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transition: filter 0.25s ease;
}

.search-box button:hover {
  filter: brightness(1.12);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 26px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 20px 60px -30px rgba(139, 92, 246, 0.55);
}

.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 21 / 9;
  animation: heroFade 0.7s ease both;
}

.hero-slide.active {
  display: block;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 18, 0.94) 0%, rgba(12, 10, 18, 0.6) 46%, rgba(12, 10, 18, 0.1) 100%),
    linear-gradient(0deg, rgba(12, 10, 18, 0.8), transparent 55%);
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.hero-info h2 {
  font-size: 34px;
  line-height: 1.3;
  margin-bottom: 12px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

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

.hero-info .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--accent);
}

.hero-info .hero-meta span {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #0C0A12;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 8px 26px -10px rgba(43, 232, 216, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  color: #0C0A12;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -12px rgba(43, 232, 216, 0.95);
}

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

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

.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: 2px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  box-shadow: 0 0 12px rgba(43, 232, 216, 0.7);
}

.sec-more {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.sec-more:hover {
  color: var(--accent);
}

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

.card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -20px rgba(43, 232, 216, 0.55);
}

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

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

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

.card-score {
  position: absolute;
  top: 10px;
  right: 0;
  padding: 3px 12px 3px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: #0C0A12;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
  box-shadow: 0 4px 14px -6px rgba(43, 232, 216, 0.9);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ---------- Category list ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(21, 18, 31, 0.75);
  border: 1px solid var(--line);
  font-size: 13px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.cat-item:hover {
  color: var(--accent);
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -18px rgba(43, 232, 216, 0.7);
}

.cat-count {
  font-size: 11px;
  color: var(--muted);
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
}

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

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

.rank-item:hover {
  background: rgba(43, 232, 216, 0.05);
  border-color: var(--line-strong);
}

.rank-num {
  flex: 0 0 auto;
  width: 26px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(43, 232, 216, 0.6);
}

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

.rank-score {
  flex: 0 0 auto;
  font-size: 12px;
  font-family: var(--font-heading);
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(21, 18, 31, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 44px -22px rgba(43, 232, 216, 0.6);
}

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

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.detail-meta h1 {
  font-size: 30px;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 4px;
}

.detail-meta .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.detail-meta .meta-row b {
  color: var(--text);
  font-weight: 500;
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(43, 232, 216, 0.5);
}

.detail-score small {
  font-size: 12px;
  color: var(--muted);
  text-shadow: none;
}

.detail-body {
  margin-top: 26px;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(21, 18, 31, 0.6);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.detail-body h2 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 12px;
}

.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: 3px 12px;
  font-size: 12px;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  background: rgba(43, 232, 216, 0.06);
  transition: background 0.25s ease, color 0.25s ease;
}

.tag:hover {
  color: #0C0A12;
  background: var(--accent);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 10px;
}

.pg {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(21, 18, 31, 0.7);
  transition: all 0.25s ease;
}

.pg:hover {
  color: var(--accent);
  border-color: var(--line-strong);
}

.pg.current {
  color: #0C0A12;
  font-weight: 700;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 8px 22px -12px rgba(43, 232, 216, 0.9);
}

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

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

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

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 56px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}

.footer a {
  color: var(--muted);
}

.footer a:hover {
  color: var(--accent);
}

/* ---------- Crumbs ---------- */
.crumbs {
  margin-top: 22px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

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

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

.crumbs span {
  margin: 0 6px;
  opacity: 0.5;
}

/* ---------- Highlight ---------- */
.hl {
  color: var(--accent);
  font-style: normal;
  background: rgba(43, 232, 216, 0.12);
  border-radius: 3px;
  padding: 0 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cat-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero-info h2 {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 14px;
  }
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo {
    font-size: 18px;
  }
  .nav {
    order: 3;
    flex: 1 0 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a {
    padding: 5px 10px;
    font-size: 12px;
  }
  .search-box {
    margin-left: auto;
  }
  .search-box input {
    width: 96px;
  }
  .hero {
    margin-top: 16px;
  }
  .hero-slide {
    aspect-ratio: 4 / 5;
  }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(12, 10, 18, 0.96) 0%, rgba(12, 10, 18, 0.5) 55%, rgba(12, 10, 18, 0.15) 100%);
  }
  .hero-info {
    padding: 22px 18px;
    max-width: 100%;
  }
  .hero-info h2 {
    font-size: 21px;
  }
  .hero-info p {
    -webkit-line-clamp: 2;
    font-size: 12px;
  }
  .btn {
    padding: 8px 20px;
    font-size: 12px;
  }
  .sec {
    margin-top: 32px;
  }
  .sec-title {
    font-size: 18px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }
  .cat-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .rank-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }
  .detail-cover {
    max-width: 200px;
  }
  .detail-meta h1 {
    font-size: 22px;
  }
  .detail-body {
    padding: 18px;
    font-size: 13px;
  }
  .footer {
    margin-top: 36px;
    padding: 22px 0 30px;
  }
}