:root {
  --bg: #07080F;
  --surface: rgba(18, 22, 34, 0.72);
  --primary: #00F0C8;
  --accent: #B44CFF;
  --text: #EDF2F7;
  --muted: #8A93A8;
  --radius: 14px;
  --font-heading: 'Sora', 'Noto Sans SC', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --border: rgba(255, 255, 255, 0.08);
  --glow-primary: 0 0 0 1px rgba(0, 240, 200, 0.35), 0 0 18px rgba(0, 240, 200, 0.12);
  --glow-accent: 0 0 0 1px rgba(180, 76, 255, 0.35), 0 0 18px rgba(180, 76, 255, 0.12);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(0, 240, 200, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 10%, rgba(180, 76, 255, 0.06), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo:hover { color: transparent; filter: brightness(1.2); }

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

.nav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: all .2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(0, 240, 200, 0.08);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 4px 0 14px;
  height: 38px;
  min-width: 180px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.search-box:focus-within {
  border-color: rgba(0, 240, 200, 0.5);
  box-shadow: var(--glow-primary);
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #07080F;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: filter .2s ease;
}
.search-box button:hover { filter: brightness(1.15); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 21 / 9;
  background: var(--surface);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  animation: heroFade 18s infinite;
  background-size: cover;
  background-position: center;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 8, 15, 0.92) 0%, rgba(7, 8, 15, 0.2) 55%, transparent 100%);
}
@keyframes heroFade {
  0%, 30% { opacity: 1; transform: scale(1); }
  33%, 97% { opacity: 0; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 32px;
  max-width: 640px;
}
.hero-info h2 { font-size: clamp(20px, 3vw, 32px); margin-bottom: 8px; }
.hero-info p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  color: #07080F;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover {
  color: #07080F;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 240, 200, 0.25);
}

/* ---------- Sections ---------- */
.sec { margin: 40px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.sec-title {
  font-size: 20px;
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 200, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 240, 200, 0.25);
  color: inherit;
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
  background: rgba(7, 8, 15, 0.78);
  border: 1px solid rgba(0, 240, 200, 0.45);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.card-info { padding: 10px 12px 12px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  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: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  transition: all .2s ease;
}
.cat-item:hover {
  border-color: rgba(180, 76, 255, 0.5);
  box-shadow: var(--glow-accent);
  color: var(--accent);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 8px;
  border-radius: 999px;
}

/* ---------- Rank list ---------- */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s ease;
}
.rank-item:hover {
  border-color: rgba(0, 240, 200, 0.35);
  transform: translateX(3px);
  color: inherit;
}
.rank-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}
.rank-item:nth-child(1) .rank-num { color: #07080F; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.rank-item:nth-child(2) .rank-num { color: var(--primary); border: 1px solid rgba(0, 240, 200, 0.5); background: transparent; }
.rank-item:nth-child(3) .rank-num { color: var(--accent); border: 1px solid rgba(180, 76, 255, 0.5); background: transparent; }
.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-size: 13px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail { margin: 28px 0; }
.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 32px rgba(0, 240, 200, 0.08);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.detail-meta span { margin-right: 14px; }
.detail-meta a { color: var(--primary); }
.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  margin: 6px 0 14px;
  text-shadow: 0 0 24px rgba(0, 240, 200, 0.35);
}
.detail-score small { font-size: 14px; color: var(--muted); }
.detail-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.detail-body h3 { margin: 18px 0 10px; font-size: 17px; }
.detail-body a { color: var(--primary); }

/* ---------- Tag list ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: all .2s ease;
}
.tag:hover {
  color: var(--primary);
  border-color: rgba(0, 240, 200, 0.5);
}

/* ---------- 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;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s ease;
}
.pg:hover {
  border-color: rgba(0, 240, 200, 0.5);
  color: var(--primary);
}
.pg.current {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  color: #07080F;
  font-weight: 700;
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 18px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: rgba(7, 8, 15, 0.6);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin: 4px 0; }

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

/* ---------- Highlight ---------- */
.hl {
  color: var(--primary);
  background: rgba(0, 240, 200, 0.12);
  padding: 0 2px;
  border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .search-box { order: 3; width: 100%; min-width: 0; }
  .nav {
    order: 4;
    width: 100%;
    flex: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .hero { aspect-ratio: 4 / 3; border-radius: 12px; }
  .hero-info { padding: 18px 20px; }
  .hero-info p { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rank-list { grid-template-columns: 1fr; }
  .detail-head { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-body { padding: 18px; }
  .sec { margin: 28px 0; }
  .sec-title { font-size: 18px; }
  .pg { min-width: 34px; height: 34px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-info { padding: 8px 10px 10px; }
  .card-title { font-size: 13px; }
}