:root {
  --bg: #0B0714;
  --surface: #1A0F2E;
  --primary: #FF3CAC;
  --accent: #00F5D4;
  --text: #F0E6FF;
  --muted: #A78BFA;
  --radius: 16px;
  --font-heading: 'Orbitron', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --line: rgba(167, 139, 250, 0.22);
  --glow: 0 0 12px rgba(255, 60, 172, 0.55);
  --glow-accent: 0 0 12px rgba(0, 245, 212, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 60, 172, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 212, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 0%, rgba(255, 60, 172, 0.18), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 245, 212, 0.10), transparent 55%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.55;
}

a { color: inherit; text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
a:hover { color: var(--accent); text-shadow: var(--glow-accent); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 7, 20, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--primary), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 60, 172, 0.4);
  flex-shrink: 0;
}

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

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: var(--glow);
  background: rgba(255, 60, 172, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.search-box input {
  width: 150px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: all 0.2s;
}
.search-box input::placeholder { color: rgba(167, 139, 250, 0.6); }
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}
.search-box button {
  padding: 7px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: filter 0.2s, box-shadow 0.2s;
}
.search-box button:hover { filter: brightness(1.15); box-shadow: var(--glow); }

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

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 28px 24px;
  background: linear-gradient(to top, rgba(11, 7, 20, 0.96), rgba(11, 7, 20, 0.4) 60%, transparent);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: linear-gradient(120deg, #fff, var(--primary) 60%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 60, 172, 0.5));
}
.hero-info p {
  font-size: 13px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 60, 172, 0.6);
  filter: brightness(1.1);
  text-shadow: none;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sec-title::before {
  content: "";
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: var(--glow);
}

.sec-more {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.2s;
}
.sec-more:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(255, 60, 172, 0.28), var(--glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(160deg, #241338, #120a20);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  color: var(--bg);
  background: linear-gradient(120deg, var(--accent), var(--primary));
  border-radius: 999px;
  box-shadow: var(--glow-accent);
  z-index: 2;
}

.card-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}
.card:hover .card-title { color: var(--primary); }

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

/* ===== Cat list ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.cat-item:hover {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
  transform: translateY(-2px);
}

.cat-count {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--accent);
  background: rgba(0, 245, 212, 0.1);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ===== Rank list ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.2s;
}
.rank-item:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateX(4px);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 60, 172, 0.06);
}
.rank-item:nth-child(1) .rank-num { color: var(--bg); background: linear-gradient(120deg, var(--accent), var(--primary)); border-color: transparent; box-shadow: var(--glow); }
.rank-item:nth-child(2) .rank-num { color: var(--bg); background: linear-gradient(120deg, var(--primary), var(--muted)); border-color: transparent; }
.rank-item:nth-child(3) .rank-num { color: var(--bg); background: linear-gradient(120deg, var(--muted), var(--accent)); border-color: transparent; }

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

.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: var(--glow-accent);
}

/* ===== Detail ===== */
.detail { margin: 28px 0; }

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.detail-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 0%, rgba(255, 60, 172, 0.14), transparent 55%);
  pointer-events: none;
}

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.3;
  background: linear-gradient(120deg, #fff, var(--primary) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 60, 172, 0.4));
}
.detail-meta p {
  font-size: 13px;
  color: var(--muted);
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  text-shadow: var(--glow-accent);
}
.detail-score small {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
  text-shadow: none;
}

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: 1px;
  margin: 18px 0 10px;
  color: var(--accent);
}
.detail-body h2:first-child, .detail-body h3:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 12px; color: rgba(240, 230, 255, 0.85); }
.detail-body img { border-radius: 12px; margin: 12px 0; }

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.2s;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  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: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: all 0.2s;
}
.pg:hover {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: var(--glow);
}
.pg.current {
  color: var(--bg);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: var(--glow);
}
.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

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

.link-item {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(26, 15, 46, 0.6);
  transition: all 0.2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}

/* ===== Crumbs ===== */
.crumbs {
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: rgba(167, 139, 250, 0.5); }

/* ===== Highlight ===== */
.hl {
  color: var(--bg);
  background: linear-gradient(120deg, var(--accent), var(--primary));
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 700;
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: rgba(11, 7, 20, 0.7);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .logo { font-size: 17px; }
  .nav {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav a { padding: 5px 10px; font-size: 12px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

  .hero { margin: 16px 0; border-radius: 12px; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 40px 16px 16px; }
  .hero-info h2 { font-size: 18px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }

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

  .sec { margin: 24px 0; }
  .sec-title { font-size: 15px; }
  .sec-title::before { height: 15px; }

  .detail-head {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .detail-cover {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 20px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-body { padding: 16px; font-size: 13px; }

  .rank-item { padding: 8px 10px; gap: 10px; }
  .rank-num { width: 26px; height: 26px; font-size: 12px; }

  .pg { min-width: 34px; height: 34px; font-size: 12px; }

  .footer { margin-top: 32px; padding: 20px 0; }
}