:root {
  --bg: #0D0B1A;
  --surface: #1A172B;
  --primary: #FF2E88;
  --accent: #00E5FF;
  --text: #F0F0FF;
  --muted: #8A86A8;
  --radius: 8px;
  --font-heading: 'Arial Black', 'Impact', sans-serif;
  --font-body: 'Helvetica Neue', Arial, sans-serif;
  --glow-pink: 0 0 12px rgba(255, 46, 136, .55);
  --glow-cyan: 0 0 12px rgba(0, 229, 255, .45);
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 46, 136, .10), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(0, 229, 255, .08), transparent 45%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 11, 26, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 46, 136, .22);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: var(--glow-pink);
  white-space: nowrap;
}
.logo span, .logo em { color: var(--primary); font-style: normal; }

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

.nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  border-color: rgba(0, 229, 255, .4);
  background: rgba(0, 229, 255, .08);
  text-shadow: var(--glow-cyan);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(255, 46, 136, .3);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 200px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 8px 14px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #b31f63);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: .5px;
}
.search-box button:hover { filter: brightness(1.1); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  display: block;
  min-height: 340px;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 11, 26, .95) 0%, rgba(13, 11, 26, .55) 55%, rgba(13, 11, 26, .15) 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 48px 32px;
}
.hero-info h2 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.2;
  color: var(--text);
  text-shadow: var(--glow-pink);
}
.hero-info p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #a81c5d);
  box-shadow: var(--glow-pink);
  border: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.12); color: #fff; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(0, 229, 255, .1); }

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 46, 136, .25);
  position: relative;
}
.sec-head::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.sec-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
}
.sec-title::before {
  content: "◆ ";
  color: var(--accent);
  font-size: 14px;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(138, 134, 168, .35);
  padding: 4px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); border-color: var(--accent); }

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 46, 136, .12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(0, 229, 255, .45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .55), var(--glow-cyan);
}

.card-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #12101f;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13, 11, 26, .85) 100%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 12px;
  color: #0D0B1A;
  background: var(--accent);
  box-shadow: var(--glow-cyan);
}

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

.card-title {
  margin: 0 0 6px;
  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;
}
.card:hover .card-title { color: var(--accent); }

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(0, 229, 255, .18);
  font-size: 14px;
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.cat-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  color: var(--primary);
}

.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 46, 136, .12);
  border-radius: 999px;
  padding: 1px 8px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border-left: 3px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.rank-item:hover {
  border-left-color: var(--primary);
  background: #221e38;
}

.rank-num {
  flex: 0 0 28px;
  font-family: var(--font-heading);
  font-size: 16px;
  text-align: center;
  color: var(--muted);
}
.rank-item:nth-child(1) .rank-num { color: var(--primary); text-shadow: var(--glow-pink); }
.rank-item:nth-child(2) .rank-num { color: var(--accent); }
.rank-item:nth-child(3) .rank-num { color: #ffd166; }

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 46, 136, .15);
  box-shadow: var(--shadow);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #12101f;
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
}
.detail-meta strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 14px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 18px;
  color: #0D0B1A;
  background: linear-gradient(135deg, var(--accent), #00b8cc);
  box-shadow: var(--glow-cyan);
}

.detail-body {
  margin: 24px 0;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 229, 255, .12);
  line-height: 1.85;
  color: #d8d6ea;
}
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  color: var(--text);
  margin: 18px 0 10px;
}
.detail-body p { margin: 0 0 12px; }

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(0, 229, 255, .08);
  border: 1px solid rgba(0, 229, 255, .3);
}
.tag:hover { background: rgba(0, 229, 255, .18); color: #fff; }

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

.pg {
  display: inline-block;
  min-width: 38px;
  padding: 7px 12px;
  text-align: center;
  font-size: 14px;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(138, 134, 168, .25);
  transition: all .2s ease;
}
.pg:hover { color: var(--accent); border-color: var(--accent); }
.pg.current {
  color: #0D0B1A;
  font-family: var(--font-heading);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow-pink);
}
.pg.disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(138, 134, 168, .18);
}

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

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255, 46, 136, .22);
  background: rgba(26, 23, 43, .6);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 14px 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--text); }

/* ---------- Highlight ---------- */
.hl {
  color: #0D0B1A;
  background: var(--accent);
  padding: 0 3px;
  border-radius: 3px;
  font-style: normal;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .header .wrap {
    gap: 10px;
    padding: 10px 12px;
    min-height: auto;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .nav a { padding: 5px 10px; font-size: 13px; }
  .search-box { flex: 1; min-width: 0; }

  .hero { margin: 16px 0; }
  .hero-slide { min-height: 260px; }
  .hero-info { padding: 28px 18px; max-width: 100%; }
  .hero-info h2 { font-size: 22px; }

  .sec { margin: 24px 0; }
  .sec-title { font-size: 17px; }

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

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }
  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }
  .detail-body { padding: 16px; }

  .pg { min-width: 32px; padding: 6px 9px; font-size: 13px; }
}