:root {
  --bg: #0C0B10;
  --surface: #15131C;
  --primary: #E8355F;
  --accent: #B48CFF;
  --text: #F2EFF7;
  --muted: #8B8499;
  --radius: 2px;
  --font-heading: 'Helvetica Neue', 'Arial Black', 'PingFang SC', sans-serif;
  --font-body: 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --line: rgba(242, 239, 247, 0.12);
  --line-strong: rgba(242, 239, 247, 0.28);
  --grad: linear-gradient(135deg, var(--accent), var(--primary));
}

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

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;
  -webkit-font-smoothing: antialiased;
  background-image:
    repeating-linear-gradient(0deg, rgba(180, 140, 255, 0.035) 0 1px, transparent 1px 4px);
}

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

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 11, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--primary);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 6px rgba(180, 140, 255, 0.35));
}

.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;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  border-left: 1px solid var(--line);
  transition: color 0.2s;
}
.nav a:first-child { border-left: none; }
.nav a:hover { color: var(--primary); }

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.search-box input {
  width: 150px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.hero-slide {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-slide:hover img { transform: scale(1.03); }
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 32px 28px;
  background: linear-gradient(to top, rgba(12, 11, 16, 0.96), transparent);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: filter 0.2s, transform 0.2s;
}
.btn:hover { filter: brightness(1.15); transform: translateY(-1px); }

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

.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);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 2px;
  background: var(--primary);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.1;
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s;
}
.sec-more:hover { color: var(--accent); }

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 34px;
  padding: 2px 6px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

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

/* ---------- Cat list ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}
.cat-item:hover { border-left-color: var(--primary); color: var(--primary); }
.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 32px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.rank-num {
  flex-shrink: 0;
  width: 34px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  color: var(--muted);
  text-align: center;
  line-height: 1;
}
.rank-item:nth-child(-n+3) .rank-num {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-title:hover { color: var(--primary); }
.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 900;
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--line-strong);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0910;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta { display: flex; flex-direction: column; gap: 14px; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.detail-meta ul { display: flex; flex-direction: column; gap: 8px; }
.detail-meta li {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}
.detail-meta li b { color: var(--text); font-weight: 600; flex-shrink: 0; }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.detail-score small { font-size: 14px; color: var(--muted); -webkit-text-fill-color: var(--muted); }

.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: #cfc9db;
}
.detail-body p { margin-bottom: 16px; }
.detail-body img { margin: 16px auto; border-radius: var(--radius); }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(180, 140, 255, 0.35);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.tag:hover { background: var(--accent); color: #0C0B10; }

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s;
}
.pg:hover { color: var(--text); border-color: var(--line-strong); }
.pg.current {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.link-item:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 2px solid var(--primary);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 18px 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--line-strong); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  font-weight: 700;
  font-style: normal;
  background: rgba(232, 53, 95, 0.12);
  padding: 0 2px;
  border-radius: var(--radius);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { grid-template-columns: 200px 1fr; gap: 24px; }
  .detail-meta h1 { font-size: 28px; }
}

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .logo { font-size: 19px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 18px 0; }
  .hero-slide { aspect-ratio: 4 / 5; }
  .hero-info { padding: 48px 18px 20px; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 3; }
  .btn { padding: 9px 18px; font-size: 13px; }

  .sec { margin: 28px 0; }
  .sec-title { font-size: 19px; }
  .sec-head { margin-bottom: 16px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-info { padding: 8px 10px 12px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; gap: 6px; }

  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-item { padding: 12px; font-size: 13px; }

  .rank-list { grid-template-columns: 1fr; gap: 0; }
  .rank-num { width: 28px; font-size: 18px; }

  .detail { margin: 20px 0; }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 24px; }
  .detail-meta li { font-size: 13px; }
  .detail-score { font-size: 32px; }
  .detail-body { font-size: 14px; line-height: 1.8; }

  .pager { gap: 6px; margin: 28px 0; }
  .pg { min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; }

  .links { gap: 8px 16px; padding: 18px 0; }
  .footer { padding: 24px 0 32px; margin-top: 32px; }
}