:root {
  --bg: #0A0C0B;
  --surface: #F2E8D5;
  --primary: #00FFC2;
  --accent: #D94F2A;
  --text: #EAE3D6;
  --muted: #7A847D;
  --radius: 12px;
  --font-heading: 'Times New Roman', 'Songti SC', 'Noto Serif SC', serif;
  --font-body: 'Courier New', 'PingFang SC', 'Microsoft YaHei', monospace;
  --line: rgba(234, 227, 214, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(0, 255, 194, 0.06), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(217, 79, 42, 0.05), transparent 45%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.6) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0;
}

.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.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 255, 194, 0.08);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--surface);
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(0, 255, 194, 0.35);
}

.logo::after {
  content: "_";
  color: var(--primary);
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

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

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--muted);
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-color: rgba(0, 255, 194, 0.35);
  box-shadow: 0 0 10px rgba(0, 255, 194, 0.15);
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(242, 232, 213, 0.04);
  padding: 4px 4px 4px 14px;
  min-width: 200px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.search-box input::placeholder { color: var(--muted); }

.search-box button {
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #04110d;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: .06em;
  transition: box-shadow .2s, transform .2s;
}
.search-box button:hover {
  box-shadow: 0 0 14px rgba(0, 255, 194, 0.6);
  transform: translateY(-1px);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  margin: 28px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #060807;
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transition: transform .6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,12,11,0.92) 0%, rgba(10,12,11,0.55) 45%, transparent 75%),
    linear-gradient(0deg, rgba(10,12,11,0.85), transparent 55%);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 194, 0.05) 0 1px,
    transparent 1px 4px
  );
}

.hero-info {
  position: absolute;
  left: 40px;
  bottom: 36px;
  z-index: 3;
  max-width: 60%;
}

.hero-info h2 {
  font-size: 34px;
  line-height: 1.2;
  color: var(--surface);
  text-shadow: 0 0 18px rgba(0, 255, 194, 0.25);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #04110d;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  border: 1px solid var(--primary);
  transition: box-shadow .25s, transform .25s, background .25s;
}
.btn:hover {
  color: #04110d;
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(0, 255, 194, 0.55);
}
.btn.ghost {
  background: transparent;
  color: var(--primary);
}
.btn.ghost:hover { background: rgba(0, 255, 194, 0.1); }

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

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.sec-title {
  position: relative;
  font-size: 22px;
  color: var(--surface);
  padding-left: 16px;
  letter-spacing: .06em;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(0, 255, 194, 0.7);
}

.sec-more {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  border-bottom: 1px dashed transparent;
}
.sec-more:hover { color: var(--primary); border-color: var(--primary); }

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(242, 232, 213, 0.03);
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 194, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 255, 194, 0.12);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111;
}
.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;
  z-index: 2;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #04110d;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0, 255, 194, 0.6);
}

.card-info {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--primary); }

.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: .04em;
}

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(242, 232, 213, 0.03);
  font-size: 13px;
  transition: border-color .2s, background .2s, transform .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  background: rgba(0, 255, 194, 0.06);
  transform: translateY(-2px);
  color: var(--primary);
}

.cat-count {
  font-size: 11px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 8px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .2s, padding-left .2s;
}
.rank-item:hover {
  background: rgba(0, 255, 194, 0.05);
  padding-left: 20px;
}

.rank-num {
  flex: 0 0 32px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.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 12px rgba(217, 79, 42, 0.6);
}

.rank-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-item:hover .rank-title { color: var(--primary); }

.rank-score {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(242, 232, 213, 0.03);
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-meta h1 {
  font-size: 30px;
  line-height: 1.25;
  color: var(--surface);
}
.detail-meta p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.detail-meta p strong { color: var(--text); font-weight: 400; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 16px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #04110d;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(0, 255, 194, 0.4);
}

.detail-body {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(242, 232, 213, 0.02);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2, .detail-body h3 {
  margin: 20px 0 10px;
  font-size: 18px;
  color: var(--surface);
}
.detail-body p { margin: 0 0 14px; }
.detail-body img { border-radius: var(--radius); margin: 12px 0; }

/* ============ Tag List ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
}
.tag:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(0, 255, 194, 0.08);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 232, 213, 0.03);
  transition: color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.pg.current {
  color: #04110d;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 255, 194, 0.45);
}

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

/* ============ Links ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.link-item {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
}
.link-item:hover { color: var(--primary); }

/* ============ Footer ============ */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ============ Crumbs ============ */
.crumbs {
  padding: 18px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

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

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

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .logo { font-size: 18px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 5px 10px; font-size: 12px; }
  .search-box { flex: 1; min-width: 0; }

  .hero { margin: 18px 0 28px; }
  .hero-slide { aspect-ratio: 3 / 4; }
  .hero-slide::after {
    background:
      linear-gradient(0deg, rgba(10,12,11,0.95) 0%, rgba(10,12,11,0.4) 60%, transparent 100%);
  }
  .hero-info {
    left: 18px;
    right: 18px;
    bottom: 20px;
    max-width: none;
  }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 12px; margin: 8px 0 14px; }
  .btn { padding: 8px 18px; font-size: 12px; }

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

  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rank-list { grid-template-columns: 1fr; gap: 0; }

  .detail-head {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }
  .detail-cover { max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-body { padding: 18px; font-size: 13px; }

  .pager { gap: 6px; margin: 28px 0 8px; }
  .pg { min-width: 34px; height: 34px; font-size: 12px; }

  .footer { margin-top: 40px; padding: 24px 0 20px; }
}