:root {
  --bg: #050807;
  --surface: #0D1210;
  --primary: #00FFC2;
  --accent: #FF3B30;
  --text: #F2F7F5;
  --muted: #5C6B66;
  --radius: 2px;
  --font-heading: 'Arial Black', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { 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: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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; }

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 8, 7, .92);
  border-bottom: 1px solid rgba(0, 255, 194, .18);
  backdrop-filter: blur(8px);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 2px 0 var(--accent), -2px 0 var(--primary);
}
.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: 14px;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  border-color: rgba(0, 255, 194, .4);
  background: rgba(0, 255, 194, .06);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.search-box input {
  width: 150px;
  padding: 7px 10px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 7px 12px;
  border: none;
  background: var(--primary);
  color: #050807;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
}
.search-box button:hover { background: var(--accent); color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin: 20px 0;
  border: 1px solid rgba(0, 255, 194, .2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.hero-slide {
  position: relative;
  display: none;
  aspect-ratio: 16 / 7;
  min-height: 220px;
}
.hero-slide.active,
.hero-slide:first-child { display: block; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.55) saturate(1.1);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 24px 20px;
  background: linear-gradient(to top, rgba(5,8,7,.95), transparent);
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .5px;
  margin-bottom: 6px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.6);
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
  max-width: 640px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary);
  color: #050807;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  box-shadow: 3px 3px 0 rgba(0, 255, 194, .25);
  transition: all .2s;
}
.btn:hover {
  background: transparent;
  color: var(--primary);
  box-shadow: 3px 3px 0 var(--accent);
}

/* ===== Section ===== */
.sec { margin: 32px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0, 255, 194, .25);
}
.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  padding-left: 14px;
}
.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 18px;
  background: var(--primary);
  box-shadow: 3px 0 0 var(--accent);
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--muted);
  padding: 3px 10px;
  border-radius: var(--radius);
}
.sec-more:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Grid & Card ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(92, 107, 102, .25);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.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: 6px;
  right: 6px;
  padding: 2px 7px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 900;
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 rgba(0,0,0,.5);
}
.card-info {
  padding: 8px 10px 10px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--primary); }
.card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Category list ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid rgba(92, 107, 102, .25);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
}
.cat-item:hover {
  border-left-color: var(--accent);
  color: var(--primary);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* ===== Rank list ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid rgba(92, 107, 102, .2);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.rank-item:hover { border-color: var(--primary); }
.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  color: #050807;
  background: var(--primary);
  border-radius: var(--radius);
}
.rank-item:nth-child(1) .rank-num { background: var(--accent); color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #FFB300; color: #050807; }
.rank-item:nth-child(3) .rank-num { background: var(--primary); }
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 900;
  color: var(--primary);
}

/* ===== Detail ===== */
.detail { margin: 24px 0; }
.detail-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(0, 255, 194, .18);
  border-radius: var(--radius);
}
.detail-cover {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 255, 194, .3);
  box-shadow: 4px 4px 0 rgba(0, 255, 194, .15);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  flex: 1;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: .5px;
}
.detail-meta p { margin-bottom: 2px; }
.detail-meta strong { color: var(--text); font-weight: 700; }
.detail-score {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.detail-body {
  margin-top: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(92, 107, 102, .25);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  margin: 16px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 10px; color: var(--text); }
.detail-body a { color: var(--primary); }

/* ===== Tags ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(0, 255, 194, .08);
  border: 1px solid rgba(0, 255, 194, .35);
  border-radius: var(--radius);
}
.tag:hover {
  background: var(--primary);
  color: #050807;
}

/* ===== Pager ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 28px 0;
}
.pg {
  display: inline-block;
  min-width: 34px;
  padding: 6px 10px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(92, 107, 102, .35);
  border-radius: var(--radius);
}
.pg:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pg.current {
  background: var(--primary);
  color: #050807;
  border-color: var(--primary);
  font-weight: 700;
}
.pg.disabled {
  color: var(--muted);
  border-color: rgba(92, 107, 102, .2);
  pointer-events: none;
  opacity: .5;
}

/* ===== Links ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
}
.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid rgba(92, 107, 102, .3);
  border-radius: var(--radius);
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== Footer ===== */
.footer {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 2px solid rgba(0, 255, 194, .2);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== Crumbs ===== */
.crumbs {
  padding: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

/* ===== Highlight ===== */
.hl {
  color: #050807;
  background: var(--primary);
  padding: 0 2px;
  border-radius: var(--radius);
  font-style: normal;
}

/* ===== Responsive: 768px+ 两列 ===== */
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
  .detail-head { flex-direction: row; }
  .detail-cover { max-width: 200px; flex-shrink: 0; }
  .hero-slide { aspect-ratio: 21 / 8; }
  .hero-info h2 { font-size: 30px; }
  .sec-title { font-size: 20px; }
}

/* ===== Responsive: 1200px 居中网格 ===== */
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
  .cat-list { grid-template-columns: repeat(4, 1fr); }
  .hero-slide { aspect-ratio: 21 / 7; }
  .hero-info h2 { font-size: 34px; }
}

/* ===== Mobile: max 768px 单列 ===== */
@media (max-width: 768px) {
  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 10px;
  }
  .logo { font-size: 17px; }
  .nav {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    gap: 2px;
    padding-bottom: 4px;
  }
  .nav a { padding: 5px 9px; font-size: 13px; }
  .search-box { margin-left: auto; }
  .search-box input { width: 110px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-list { grid-template-columns: 1fr; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 16px 14px; }
  .hero-info h2 { font-size: 20px; }
  .detail-cover { max-width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 19px; }
  .sec { margin: 24px 0; }
  .sec-title { font-size: 16px; }
  .rank-item { padding: 8px 10px; }
  .rank-title { font-size: 13px; }
}