:root {
  --bg: #120B1F;
  --surface: #1F1530;
  --primary: #FF4FCB;
  --accent: #7C5CFF;
  --text: #F5EEFF;
  --muted: #A896C9;
  --radius: 2px;
  --font-heading: 'Helvetica Neue', 'Arial Black', 'Noto Sans SC', sans-serif;
  --font-body: 'Helvetica Neue', 'Segoe UI', 'Noto Sans SC', sans-serif;
  --border: #000;
  --shadow: 4px 4px 0 var(--border);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 0%, rgba(124,92,255,0.18), transparent 60%);
}

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 16px;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18,11,31,0.92);
  border-bottom: 2px solid var(--border);
  backdrop-filter: blur(8px);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  background: linear-gradient(180deg, #fff 0%, #d9c8ff 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  border: 2px solid transparent;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--accent);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  width: 160px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  background: var(--primary);
  color: #120B1F;
  font-weight: 700;
  padding: 8px 14px;
  font-size: 14px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 24px 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: block;
  min-height: 320px;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.55;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18,11,31,0.95) 0%, rgba(18,11,31,0.5) 55%, transparent 100%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 32px 24px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-info h2, .hero-info h3 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  max-height: 3.2em;
  overflow: hidden;
}

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  align-self: flex-start;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #120B1F;
  background: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--border); }
.btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--border); }

/* ---------- Section ---------- */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
}
.sec-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.5px;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 70%;
  background: var(--primary);
  border: 2px solid var(--border);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  border: 2px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.sec-more:hover { color: #120B1F; background: var(--accent); }

/* ---------- Grid & Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translate(-3px,-3px); box-shadow: 7px 7px 0 var(--border); }
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0c0716;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-cover img { transform: scale(1.05); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 13px;
  color: #120B1F;
  background: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1px 7px;
  box-shadow: 2px 2px 0 var(--border);
}
.card-info { padding: 10px 10px 12px; }
.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

/* ---------- Category list ---------- */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s, background .2s;
}
.cat-item:hover { transform: translate(-2px,-2px); background: var(--accent); }
.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,79,203,0.12);
  border: 1px solid var(--border);
  padding: 0 6px;
  border-radius: var(--radius);
}

/* ---------- Rank list ---------- */
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s, background .2s;
}
.rank-item:hover { transform: translate(-2px,-2px); background: #291a42; }
.rank-num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 20px;
  min-width: 34px;
  text-align: center;
  color: var(--primary);
}
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 13px;
  color: #120B1F;
  background: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1px 7px;
}

/* ---------- Detail ---------- */
.detail { margin: 32px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0c0716;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; flex-direction: column; gap: 12px; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.detail-score {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 18px;
  color: #120B1F;
  background: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 12px;
  box-shadow: var(--shadow);
}
.detail-meta ul { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.detail-meta ul li { color: var(--muted); }
.detail-meta ul li span { color: var(--text); }
.detail-body {
  margin-top: 28px;
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.detail-body p { margin-bottom: 12px; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 10px;
  transition: color .2s, background .2s;
}
.tag:hover { color: #120B1F; background: var(--primary); }

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 36px 0;
}
.pg {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--border);
  transition: transform .15s, background .2s;
}
.pg:hover { transform: translate(-2px,-2px); background: var(--accent); }
.pg.current {
  color: #120B1F;
  background: var(--primary);
  box-shadow: 3px 3px 0 var(--border);
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 10px;
  background: var(--surface);
  transition: color .2s, background .2s;
}
.link-item:hover { color: #120B1F; background: var(--accent); }

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

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 56px;
  border-top: 2px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  font-size: 13px;
  color: var(--muted);
}
.footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero-slide { min-height: 240px; }
  .hero-info { padding: 20px 16px; }

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-meta h1 { text-align: center; }
  .detail-score { align-self: center; }

  .sec { margin: 28px 0; }
  .sec-head { flex-wrap: wrap; }
}