:root {
  --bg: #16181A;
  --surface: #1F2226;
  --primary: #00F0B5;
  --accent: #FFB020;
  --text: #EDEFF2;
  --muted: #8C949C;
  --radius: 14px;
  --border: 3px solid #000;
  --shadow: 4px 4px 0 rgba(0, 240, 181, 0.35);
  --font-heading: 'Arial Black', 'Impact', 'PingFang SC', sans-serif;
  --font-body: 'Courier New', 'Menlo', 'PingFang SC', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.01) 0 1px, transparent 1px 6px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ============ 容器 ============ */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ 头部 ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 24, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--border);
  box-shadow: 0 4px 0 rgba(0, 240, 181, 0.15);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  transform: skewX(-6deg);
  text-shadow: 3px 3px 0 rgba(0, 240, 181, 0.4);
  flex-shrink: 0;
}
.logo:hover { color: var(--primary); }

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

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
  border: 2px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--bg);
  background: var(--primary);
  border-color: #000;
  transform: skewX(-6deg);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.6);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.search-box input {
  width: 160px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 2px solid #000;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); }
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--bg);
  background: var(--primary);
  border: 2px solid #000;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.6);
  transition: all 0.15s;
}
.search-box button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.6);
}

/* ============ 按钮 ============ */
.btn {
  display: inline-block;
  padding: 10px 22px;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--bg);
  background: var(--primary);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s ease;
  transform: skewX(-4deg);
}
.btn:hover {
  transform: skewX(-4deg) translateY(-3px) rotate(-1deg);
  box-shadow: 6px 6px 0 rgba(0, 240, 181, 0.5);
}
.btn.alt {
  background: var(--accent);
  box-shadow: 4px 4px 0 rgba(255, 176, 32, 0.4);
}

/* ============ 轮播 hero ============ */
.hero {
  position: relative;
  margin: 28px 0;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 6px 6px 0 rgba(0, 240, 181, 0.2);
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid var(--primary);
  z-index: 5;
  pointer-events: none;
}
.hero::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.hero::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.hero-slide {
  position: relative;
  display: none;
  min-height: 380px;
}
.hero-slide.active { display: block; }
.hero-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  filter: brightness(0.55);
}
.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 40px 32px 32px;
  background: linear-gradient(to top, rgba(22,24,26,0.95) 20%, transparent);
  z-index: 2;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 10px;
  transform: skewX(-6deg);
  text-shadow: 3px 3px 0 rgba(0, 240, 181, 0.4);
}
.hero-info p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
  max-width: 640px;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px dashed rgba(140, 148, 156, 0.25);
}
.sec-title {
  position: relative;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  transform: skewX(-6deg);
  padding-left: 16px;
}
.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 22px;
  background: var(--primary);
  border: 2px solid #000;
  border-radius: 2px;
}
.sec-more {
  font-size: 12px;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 4px 12px;
  white-space: nowrap;
  transition: all 0.2s;
}
.sec-more:hover {
  background: var(--primary);
  color: var(--bg);
  transform: skewX(-6deg);
}

/* ============ 卡片网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(0, 240, 181, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 7px 7px 0 rgba(0, 240, 181, 0.4);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0e0f10;
  border-bottom: var(--border);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--bg);
  background: var(--accent);
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.6);
  z-index: 2;
}

.card-info { padding: 10px 12px 14px; }
.card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.card:hover .card-title { color: var(--primary); }
.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.card-meta span { white-space: nowrap; }

/* ============ 分类列表 ============ */
.cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text);
  box-shadow: 3px 3px 0 rgba(0, 240, 181, 0.15);
  transition: all 0.2s ease;
}
.cat-item:hover {
  transform: translateY(-3px) skewX(-4deg);
  border-color: var(--primary);
  box-shadow: 5px 5px 0 rgba(0, 240, 181, 0.35);
  color: var(--primary);
}
.cat-count {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--bg);
  background: var(--primary);
  border-radius: 20px;
  padding: 1px 8px;
  flex-shrink: 0;
}

/* ============ 排行榜 ============ */
.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 rgba(0, 240, 181, 0.12);
  transition: all 0.2s ease;
}
.rank-item:hover {
  transform: translateX(4px);
  border-color: var(--primary);
}
.rank-num {
  font-family: var(--font-heading);
  font-size: 20px;
  min-width: 34px;
  text-align: center;
  color: var(--accent);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.6);
  flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num { color: var(--primary); }
.rank-title {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--primary);
  flex-shrink: 0;
}

/* ============ 详情页 ============ */
.detail {
  margin: 28px 0;
  padding: 24px;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 rgba(0, 240, 181, 0.2);
  position: relative;
}
.detail::before,
.detail::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid var(--primary);
  pointer-events: none;
}
.detail::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.detail::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.detail-head {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.detail-cover {
  flex: 0 0 220px;
  aspect-ratio: 2 / 3;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(0, 240, 181, 0.3);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.25;
  transform: skewX(-4deg);
  text-shadow: 3px 3px 0 rgba(0, 240, 181, 0.3);
}
.detail-meta p {
  font-size: 13px;
  color: var(--muted);
  word-break: break-word;
}
.detail-meta p b { color: var(--text); font-weight: normal; }
.detail-score {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--bg);
  background: var(--accent);
  border: var(--border);
  border-radius: 8px;
  padding: 2px 14px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.6);
}

.detail-body {
  font-size: 14px;
  line-height: 1.85;
  color: #c9ced4;
  padding-top: 20px;
  border-top: 2px dashed rgba(140, 148, 156, 0.25);
}
.detail-body p { margin-bottom: 14px; }
.detail-body img { border-radius: 8px; margin: 14px 0; }

/* ============ 标签 ============ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--primary);
  background: rgba(0, 240, 181, 0.08);
  border: 2px solid rgba(0, 240, 181, 0.4);
  border-radius: 20px;
  transition: all 0.2s;
}
.tag:hover {
  background: var(--primary);
  color: var(--bg);
  border-color: #000;
  transform: skewX(-6deg);
}

/* ============ 分页 ============ */
.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: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: var(--border);
  border-radius: 10px;
  box-shadow: 3px 3px 0 rgba(0, 240, 181, 0.15);
  transition: all 0.2s;
}
.pg:hover {
  color: var(--bg);
  background: var(--primary);
  transform: translateY(-2px);
}
.pg.current {
  color: var(--bg);
  background: var(--primary);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.6);
  pointer-events: none;
}
.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}

/* ============ 友情链接 ============ */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
}
.link-item {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 12px;
  border: 2px solid rgba(140, 148, 156, 0.3);
  border-radius: 8px;
  transition: all 0.2s;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: skewX(-6deg);
}

/* ============ 面包屑 ============ */
.crumbs {
  font-size: 12px;
  color: var(--muted);
  padding: 18px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs a { color: var(--primary); }
.crumbs a:hover { text-decoration: underline; }

/* ============ 搜索高亮 ============ */
.hl {
  color: var(--bg);
  background: var(--accent);
  border-radius: 3px;
  padding: 0 2px;
}

/* ============ 页脚 ============ */
.footer {
  margin-top: 50px;
  padding: 32px 0 40px;
  border-top: var(--border);
  background: var(--surface);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.footer a { color: var(--primary); }
.footer a:hover { text-decoration: underline; }

/* ============ 移动端 ============ */
@media (max-width: 768px) {
  .wrap { padding: 0 14px; }

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 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 { margin-left: auto; }
  .search-box input { width: 120px; }

  .hero-slide { min-height: 260px; }
  .hero-slide img { height: 280px; }
  .hero-info { padding: 24px 18px 20px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 12px; }

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

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .card-info { padding: 8px 10px 10px; }
  .card-title { font-size: 12px; }

  .cat-list { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-item { padding: 10px 12px; font-size: 12px; }

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

  .detail { padding: 16px; }
  .detail-head { flex-direction: column; gap: 16px; }
  .detail-cover { flex: none; width: 60%; max-width: 200px; margin: 0 auto; }
  .detail-meta h1 { font-size: 20px; text-align: center; }
  .detail-score { align-self: center; }

  .pg { min-width: 34px; height: 34px; padding: 0 8px; font-size: 12px; }
}