:root {
  --bg: #0d0614;
  --surface: #1a0f2e;
  --primary: #ff6ec7;
  --accent: #7afcff;
  --text: #f0e6ff;
  --muted: #9b8bb4;
  --radius: 12px;
  --font-heading: 'Impact', 'Arial Black', 'Helvetica Neue', sans-serif;
  --font-body: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --glow: 0 0 12px rgba(255, 110, 199, 0.55);
  --glow-cyan: 0 0 12px rgba(122, 252, 255, 0.5);
  --grad: linear-gradient(135deg, #ff6ec7 0%, #7afcff 100%);
}

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

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:
    repeating-linear-gradient(0deg, rgba(255,110,199,0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 20% 0%, rgba(255,110,199,0.12), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(122,252,255,0.10), transparent 40%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b8860b, #d4a017);
  border-radius: 4px;
}

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 6, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 110, 199, 0.25);
  box-shadow: 0 2px 20px rgba(255, 110, 199, 0.12);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 1px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  white-space: nowrap;
  filter: drop-shadow(0 0 8px rgba(255,110,199,0.5));
}

.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 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 110, 199, 0.15);
  box-shadow: var(--glow);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(122, 252, 255, 0.3);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  width: 160px;
  font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--grad);
  border: none;
  color: #0d0614;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: filter 0.2s;
}
.search-box button:hover { filter: brightness(1.15); }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 110, 199, 0.3);
  box-shadow: 0 0 30px rgba(255, 110, 199, 0.2);
}

.hero-slide {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  background: var(--surface);
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13,6,20,0.95) 10%, rgba(13,6,20,0.2) 70%);
}

.hero-info {
  position: relative;
  z-index: 2;
  padding: 32px;
  max-width: 640px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.1;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255,110,199,0.5));
  margin-bottom: 10px;
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: var(--radius);
  background: var(--grad);
  color: #0d0614;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--glow);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 110, 199, 0.8);
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 110, 199, 0.2);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: var(--glow);
}

.sec-more {
  color: var(--accent);
  font-size: 14px;
  transition: text-shadow 0.2s;
}
.sec-more:hover { text-shadow: var(--glow-cyan); }

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 110, 199, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  position: relative;
}
.card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 110, 199, 0.6);
  box-shadow: 0 8px 30px rgba(255, 110, 199, 0.3);
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(13, 6, 20, 0.85);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(122, 252, 255, 0.5);
  box-shadow: var(--glow-cyan);
  z-index: 2;
}

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

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

.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(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(122, 252, 255, 0.2);
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s;
}
.cat-item:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

.cat-count {
  font-size: 12px;
  color: var(--accent);
  background: rgba(122, 252, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* ============ Rank ============ */
.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-radius: var(--radius);
  border: 1px solid rgba(255, 110, 199, 0.12);
  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: 16px;
  border-radius: 8px;
  background: rgba(255, 110, 199, 0.12);
  color: var(--primary);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  background: var(--grad);
  color: #0d0614;
  box-shadow: var(--glow);
}

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

.rank-score {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

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

.detail-head {
  display: flex;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 110, 199, 0.2);
  box-shadow: 0 0 24px rgba(255, 110, 199, 0.1);
}

.detail-cover {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(122, 252, 255, 0.3);
  box-shadow: var(--glow-cyan);
}
.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: 32px;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  line-height: 1.15;
}
.detail-meta p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  margin: 12px 0;
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--accent);
  text-shadow: var(--glow-cyan);
}

.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 110, 199, 0.12);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
}
.detail-body h2,
.detail-body h3 {
  font-family: var(--font-heading);
  color: var(--primary);
  margin: 16px 0 10px;
  letter-spacing: 0.5px;
}
.detail-body p { margin-bottom: 12px; }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 20px;
  background: rgba(122, 252, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(122, 252, 255, 0.3);
  transition: all 0.2s;
}
.tag:hover {
  background: rgba(122, 252, 255, 0.18);
  box-shadow: var(--glow-cyan);
}

/* ============ Pager ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: 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);
  background: var(--surface);
  border: 1px solid rgba(255, 110, 199, 0.25);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
}
.pg:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  color: var(--primary);
}
.pg.current {
  background: var(--grad);
  color: #0d0614;
  font-weight: 700;
  border-color: transparent;
  box-shadow: var(--glow);
}
.pg.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(155, 139, 180, 0.25);
  transition: all 0.2s;
}
.link-item:hover {
  color: var(--accent);
  border-color: rgba(122, 252, 255, 0.5);
  box-shadow: var(--glow-cyan);
}

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0 24px;
  border-top: 1px solid rgba(255, 110, 199, 0.2);
  background: rgba(26, 15, 46, 0.5);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.footer a { color: var(--primary); }
.footer a:hover { text-shadow: var(--glow); }
.footer p { margin: 6px 0; }

/* ============ Crumbs ============ */
.crumbs {
  padding: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--accent); }
.crumbs a:hover { text-shadow: var(--glow-cyan); }
.crumbs span { margin: 0 6px; }

/* ============ Highlight ============ */
.hl {
  color: var(--primary);
  font-weight: 700;
  background: rgba(255, 110, 199, 0.15);
  padding: 0 3px;
  border-radius: 3px;
  text-shadow: var(--glow);
}

/* ============ Mobile ============ */
@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }
  .logo { font-size: 22px; }
  .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: 260px; }
  .hero-info { padding: 20px; }
  .hero-info h2 { font-size: 26px; }

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

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

  .detail-head {
    flex-direction: column;
    padding: 16px;
  }
  .detail-cover {
    width: 160px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 24px; }

  .sec-title { font-size: 20px; }
  .detail-body { padding: 16px; }
}

@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-info h2 { font-size: 22px; }
  .search-box input { width: 80px; }
}