:root {
  --bg: #0A0C0B;
  --surface: #161A18;
  --primary: #00E5C0;
  --accent: #FF6B1A;
  --text: #E8EDEA;
  --muted: #7F8C86;
  --radius: 6px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body: 'IBM Plex Mono', 'Noto Sans SC', 'Courier New', monospace;
  --line: rgba(232, 237, 234, 0.08);
  --glow: 0 0 12px rgba(0, 229, 192, 0.35);
}

* { 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: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}

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

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; }

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

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
  white-space: nowrap;
  text-shadow: var(--glow);
}
.logo:hover { color: var(--primary); }
.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 12px;
  font-size: 13px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all .2s;
}
.nav a:hover, .nav a.active {
  color: var(--primary);
  background: rgba(0, 229, 192, 0.08);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 12px;
  width: 160px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: var(--primary);
  border: none;
  color: #04211C;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}
.search-box button:hover { background: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin: 24px auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  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 ease;
}
.hero-slide:hover img { transform: scale(1.04); }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,12,11,0.95) 0%, rgba(10,12,11,0.2) 55%, transparent 100%);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
  max-width: 640px;
}
.hero-info h2 {
  font-size: clamp(22px, 4vw, 40px);
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn {
  display: inline-block;
  padding: 9px 22px;
  background: var(--primary);
  color: #04211C;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all .2s;
}
.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: var(--glow);
}

/* ---------- Section ---------- */
.sec { margin: 40px auto; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 28px);
  color: var(--text);
  position: relative;
  padding-left: 14px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--primary);
  box-shadow: var(--glow);
  border-radius: 2px;
}
.sec-more {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 192, 0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), var(--glow);
}
.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0d0f0e;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }
.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(10, 12, 11, 0.85);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 229, 192, 0.4);
  backdrop-filter: blur(4px);
}
.card-info { padding: 12px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card-meta span { white-space: nowrap; }

/* ---------- 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: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  transition: all .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--glow);
}
.cat-count {
  font-size: 11px;
  color: var(--muted);
  background: rgba(0, 229, 192, 0.08);
  padding: 1px 8px;
  border-radius: 10px;
}

/* ---------- 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: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s;
}
.rank-item:hover {
  border-color: rgba(0, 229, 192, 0.4);
  transform: translateX(4px);
}
.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--muted);
  min-width: 32px;
  text-align: center;
}
.rank-item:nth-child(1) .rank-num { color: var(--accent); }
.rank-item:nth-child(2) .rank-num { color: var(--primary); }
.rank-item:nth-child(3) .rank-num { color: #B8C4BE; }
.rank-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Detail ---------- */
.detail { margin: 32px auto; }
.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0f0e;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; flex-direction: column; gap: 10px; }
.detail-meta h1 {
  font-size: clamp(24px, 4vw, 38px);
  color: var(--text);
  text-shadow: var(--glow);
}
.detail-meta p { font-size: 13px; color: var(--muted); }
.detail-meta p strong { color: var(--text); font-weight: 500; margin-right: 6px; }
.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.detail-score small { font-size: 13px; color: var(--muted); font-family: var(--font-body); }
.detail-body {
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.9;
  color: #C6CFCA;
}
.detail-body p { margin-bottom: 14px; }

/* ---------- Tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: all .2s;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 36px 0;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s;
}
.pg:hover { color: var(--primary); border-color: var(--primary); }
.pg.current {
  color: #04211C;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}
.pg.disabled {
  opacity: .35;
  pointer-events: none;
}

/* ---------- Links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 12px;
  color: var(--muted);
}
.link-item:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ---------- Crumbs ---------- */
.crumbs {
  padding: 16px 0;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--primary); }

/* ---------- Highlight ---------- */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(255, 107, 26, 0.1);
  padding: 0 2px;
  border-radius: 2px;
}

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

  .hero-slide { aspect-ratio: 16 / 10; }
  .hero-info { padding: 16px; }
  .hero-info p { display: none; }

  .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 { text-align: center; }
  .detail-meta p { text-align: center; }

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