:root {
  --bg: #0A0C0B;
  --surface: #13161A;
  --primary: #00F5C4;
  --accent: #FF3D7F;
  --text: #E8F4F0;
  --muted: #7E8C8A;
  --radius: 8px;
  --font-heading: 'Syne', 'Arial Black', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --shadow: 4px 4px 0 rgba(0, 245, 196, 0.25);
  --glow: 0 0 12px rgba(0, 245, 196, 0.5);
}

* { 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;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 245, 196, 0.03) 3px,
    transparent 4px
  );
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }

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

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 245, 196, 0.15);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-shadow: var(--glow);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .04em;
}

.logo:hover { color: var(--accent); text-shadow: 0 0 12px rgba(255, 61, 127, 0.6); }

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

.nav::-webkit-scrollbar { display: none; }

.nav a {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all .2s;
}

.nav a:hover {
  color: var(--primary);
  border-color: rgba(0, 245, 196, 0.4);
  background: rgba(0, 245, 196, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid rgba(0, 245, 196, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 12px;
  width: 150px;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  background: var(--primary);
  border: none;
  color: var(--bg);
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}

.search-box button:hover { background: var(--accent); color: #fff; }

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 245, 196, 0.2);
}

.hero-slide {
  position: relative;
  aspect-ratio: 21 / 9;
  background: var(--surface);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55;
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 32px;
  max-width: 620px;
  background: linear-gradient(to top, rgba(10, 12, 11, 0.95), transparent);
}

.hero-info h2 {
  font-size: 34px;
  color: var(--text);
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 rgba(255, 61, 127, 0.5);
}

.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary);
  color: var(--bg);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, background .2s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(255, 61, 127, 0.4);
  background: var(--accent);
  color: #fff;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 245, 196, 0.15);
}

.sec-title {
  font-size: 22px;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  background: var(--primary);
  box-shadow: var(--glow);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(0, 245, 196, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius);
}

.sec-more:hover { color: var(--primary); border-color: var(--primary); }

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

.card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 245, 196, 0.1);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 245, 196, 0.15);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #000;
}

.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;
  background: rgba(10, 12, 11, 0.85);
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  box-shadow: var(--glow);
}

.card-info { padding: 10px 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;
}

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

.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(0, 245, 196, 0.12);
  font-weight: 600;
  transition: all .2s;
}

.cat-item:hover {
  border-color: var(--primary);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  transition: all .2s;
}

.rank-item:hover {
  background: rgba(0, 245, 196, 0.06);
  transform: translateX(4px);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  min-width: 32px;
  text-shadow: var(--glow);
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--accent); text-shadow: 0 0 10px rgba(255, 61, 127, 0.6); }

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

.rank-score {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--primary);
}

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

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0, 245, 196, 0.2);
  box-shadow: var(--shadow);
}

.detail-cover img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta h1 { font-size: 30px; margin-bottom: 14px; color: var(--text); }

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  text-shadow: var(--glow);
  margin: 12px 0;
}

.detail-body {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(0, 245, 196, 0.1);
  line-height: 1.8;
  color: var(--text);
}

.detail-body p { margin-bottom: 14px; color: var(--muted); }

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(0, 245, 196, 0.08);
  border: 1px solid rgba(0, 245, 196, 0.3);
  border-radius: 999px;
  transition: all .2s;
}

.tag:hover { background: var(--primary); color: var(--bg); }

/* ============ 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;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid rgba(0, 245, 196, 0.15);
  border-radius: var(--radius);
  transition: all .2s;
}

.pg:hover { color: var(--primary); border-color: var(--primary); }

.pg.current {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
  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;
  padding: 20px 0;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(0, 245, 196, 0.1);
  transition: all .2s;
}

.link-item:hover { color: var(--primary); border-color: var(--primary); }

/* ============ Footer ============ */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid rgba(0, 245, 196, 0.15);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.footer a { color: var(--primary); }
.footer p { margin-bottom: 6px; }

/* ============ Crumbs ============ */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0;
  padding: 10px 0;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--primary); }

/* ============ Highlight ============ */
.hl {
  color: var(--bg);
  background: var(--primary);
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hero-info h2 { font-size: 26px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }

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

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

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

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: block; text-align: center; }

  .detail-body { padding: 16px; }

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