:root {
  --bg: #0D0718;
  --surface: #1A0F2E;
  --primary: #FF3CAC;
  --accent: #00E5FF;
  --text: #F0E6FF;
  --muted: #9A86B8;
  --radius: 10px;
  --font-heading: 'Orbitron', 'Arial Black', 'Impact', sans-serif;
  --font-body: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  --grad: linear-gradient(135deg, #FF3CAC 0%, #7B2FF7 50%, #00E5FF 100%);
  --glow: 0 0 12px rgba(255, 60, 172, .55), 0 0 24px rgba(0, 229, 255, .25);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255, 60, 172, .18), transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(0, 229, 255, .12), transparent 50%),
    linear-gradient(180deg, #0D0718 0%, #150A26 60%, #0D0718 100%);
  background-attachment: fixed;
}

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

a { color: var(--text); text-decoration: none; transition: color .25s, text-shadow .25s; }
a:hover { color: var(--primary); text-shadow: var(--glow); }
img { display: block; max-width: 100%; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 7, 24, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 60, 172, .22);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 60, 172, .6));
  white-space: nowrap;
}

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

.nav a {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all .25s;
}
.nav a:hover {
  color: var(--text);
  background: rgba(255, 60, 172, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 60, 172, .35);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(0, 229, 255, .3);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  width: 170px;
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  background: var(--grad);
  color: #fff;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 14px;
  transition: filter .25s;
}
.search-box button:hover { filter: brightness(1.2); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(123, 47, 247, .4);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .6), var(--glow);
  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 .6s;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 28px 24px;
  background: linear-gradient(0deg, rgba(13, 7, 24, .96) 10%, rgba(13, 7, 24, .5) 60%, transparent);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 60, 172, .5));
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  max-width: 720px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 9px 24px;
  border-radius: var(--radius);
  background: var(--grad);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform .25s, filter .25s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.15); }

/* ===== Section ===== */
.sec { margin: 40px auto; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(123, 47, 247, .35);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 90px;
  height: 2px;
  background: var(--grad);
  box-shadow: var(--glow);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
  text-shadow: 0 0 14px rgba(255, 60, 172, .45);
}

.sec-more {
  font-size: 13px;
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, .4);
  padding: 4px 14px;
  border-radius: var(--radius);
  transition: all .25s;
}
.sec-more:hover {
  background: rgba(0, 229, 255, .12);
  box-shadow: 0 0 14px rgba(0, 229, 255, .4);
  color: var(--accent);
}

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

.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(123, 47, 247, .28);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 60, 172, .7);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), var(--glow);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #120A22;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s;
}
.card:hover .card-cover img { transform: scale(1.07); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--glow);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

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

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

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 8px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 229, 255, .22);
  font-size: 14px;
  font-weight: 600;
  transition: all .3s;
}
.cat-item:hover {
  border-color: var(--primary);
  background: rgba(255, 60, 172, .1);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

.cat-count {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-heading);
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(123, 47, 247, .25);
  transition: all .25s;
}
.rank-item:hover {
  border-color: var(--primary);
  background: rgba(255, 60, 172, .08);
  box-shadow: var(--glow);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  min-width: 34px;
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(0, 229, 255, .5);
}

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

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(123, 47, 247, .3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
}

.detail-cover {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 60, 172, .4);
  box-shadow: var(--glow);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 60, 172, .5));
}
.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-meta p span { color: var(--text); }

.detail-score {
  display: inline-block;
  margin: 10px 0;
  padding: 4px 18px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--glow);
}

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(123, 47, 247, .25);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 1px;
  margin: 18px 0 10px;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(0, 229, 255, .4);
}
.detail-body p { margin-bottom: 12px; color: var(--muted); }
.detail-body img { border-radius: var(--radius); margin: 12px 0; }

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

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 20px;
  color: var(--accent);
  background: rgba(0, 229, 255, .08);
  border: 1px solid rgba(0, 229, 255, .3);
  transition: all .25s;
}
.tag:hover {
  background: rgba(255, 60, 172, .15);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--glow);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(123, 47, 247, .35);
  transition: all .25s;
}
.pg:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--glow);
}

.pg.current {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: var(--glow);
}

.pg.disabled {
  opacity: .35;
  pointer-events: none;
  cursor: not-allowed;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color .25s;
}
.link-item:hover { color: var(--accent); text-shadow: 0 0 10px rgba(0, 229, 255, .5); }

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid rgba(123, 47, 247, .3);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: linear-gradient(180deg, transparent, rgba(26, 15, 46, .6));
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 6px; }

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

/* ===== Highlight ===== */
.hl {
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 60, 172, .6);
}

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

@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav a { font-size: 13px; padding: 5px 10px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 120px; }

  .hero { margin: 16px auto; }
  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 32px 16px 16px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }
  .btn { padding: 7px 18px; font-size: 13px; }

  .sec { margin: 28px auto; }
  .sec-title { font-size: 18px; }

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

  .rank-list { grid-template-columns: 1fr; gap: 8px; }
  .rank-num { font-size: 17px; min-width: 28px; }
  .rank-title { font-size: 13px; }

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

  .pg { min-width: 34px; height: 34px; font-size: 13px; }
  .footer { margin-top: 32px; padding: 20px 0; }
}