:root {
  --bg: #17181C;
  --surface: #23252B;
  --primary: #FF6A2B;
  --accent: #F2C14E;
  --text: #EDEAE3;
  --muted: #8A8D96;
  --radius: 10px;
  --font-heading: 'Oswald', 'Impact', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'PingFang SC', monospace;
  --glass: rgba(35, 37, 43, 0.72);
  --stroke: rgba(237, 234, 227, 0.08);
  --stroke-hi: rgba(237, 234, 227, 0.16);
  --grain: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  --grain-size: 3px 3px;
  --metal: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 40%, rgba(255,255,255,0.02) 60%, transparent 100%);
}

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

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

body {
  background-color: var(--bg);
  background-image: var(--grain);
  background-size: var(--grain-size);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; border: 0; }
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: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.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: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.logo span, .logo em { color: var(--primary); font-style: normal; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: 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: color .2s, background .2s;
}

.nav a:hover, .nav a.active {
  color: var(--text);
  background: rgba(255, 106, 43, 0.12);
}

.search-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  height: 36px;
}

.search-box input {
  width: 160px;
  height: 100%;
  padding: 0 12px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  height: 100%;
  padding: 0 14px;
  background: var(--primary);
  border: 0;
  color: #17181C;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .2s;
}

.search-box button:hover { filter: brightness(1.1); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--stroke);
  min-height: 320px;
}

.hero-slide {
  position: relative;
  display: none;
  height: 100%;
  min-height: 320px;
}

.hero-slide.active, .hero-slide:first-child { display: block; }

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23,24,28,0.95) 0%, rgba(23,24,28,0.6) 45%, transparent 100%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  padding: 10px 22px;
  background: var(--primary);
  color: #17181C;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
  box-shadow: 0 4px 16px rgba(255,106,43,0.3);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(255,106,43,0.45);
  color: #17181C;
}

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

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stroke);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  padding-left: 14px;
}

.sec-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.sec-more {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color .2s;
}

.sec-more:hover { color: var(--primary); }

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  background-image: var(--metal);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--stroke-hi);
  box-shadow: 0 10px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,106,43,0.15);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1a1b20;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.card:hover .card-cover img { transform: scale(1.05); }

.card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(23,24,28,0.85) 100%);
  pointer-events: none;
}

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 2px 8px;
  background: rgba(23,24,28,0.8);
  border: 1px solid rgba(242,193,78,0.4);
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

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

.card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 分类列表 ===== */
.cat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  background-image: var(--metal);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  transition: background .2s, border-color .2s, transform .2s;
}

.cat-item:hover {
  background: rgba(255,106,43,0.08);
  border-color: rgba(255,106,43,0.4);
  border-left-color: var(--accent);
  transform: translateX(2px);
  color: var(--text);
}

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

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  background-image: var(--metal);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}

.rank-item:hover {
  border-color: rgba(255,106,43,0.35);
  transform: translateX(3px);
}

.rank-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
}

.rank-item:nth-child(1) .rank-num { color: #17181C; background: var(--accent); }
.rank-item:nth-child(2) .rank-num { color: #17181C; background: #C9C4B8; }
.rank-item:nth-child(3) .rank-num { color: #17181C; background: #C98A5A; }

.rank-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== 详情页 ===== */
.detail { margin: 24px 0; }

.detail-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 24px;
  background: var(--surface);
  background-image: var(--metal);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: #1a1b20;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.detail-meta p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
}

.detail-score small {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
}

.detail-body {
  padding: 24px;
  background: var(--surface);
  background-image: var(--metal);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 24px;
}

.detail-body p { margin-bottom: 12px; }
.detail-body img { border-radius: var(--radius); margin: 12px 0; }

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  transition: color .2s, border-color .2s, background .2s;
}

.tag:hover {
  color: var(--primary);
  border-color: rgba(255,106,43,0.4);
  background: rgba(255,106,43,0.08);
}

/* ===== 分页 ===== */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 36px 0;
}

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s, background .2s;
}

.pg:hover {
  color: var(--text);
  border-color: rgba(255,106,43,0.4);
  background: rgba(255,106,43,0.08);
}

.pg.current {
  color: #17181C;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

.pg.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 20px 0;
}

.link-item {
  font-size: 12px;
  color: var(--muted);
  transition: color .2s;
}

.link-item:hover { color: var(--primary); }

/* ===== 页脚 ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--stroke);
  background: rgba(0,0,0,0.2);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 2;
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

/* ===== 面包屑 ===== */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--muted);
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--text); }

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--primary);
  background: rgba(255,106,43,0.12);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .cat-list { grid-template-columns: repeat(3, 1fr); }
}

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

  .header .wrap {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  .logo { font-size: 18px; }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav a { padding: 5px 10px; font-size: 12px; }

  .search-box { margin-left: auto; height: 32px; }
  .search-box input { width: 100px; font-size: 12px; }
  .search-box button { padding: 0 10px; font-size: 12px; }

  .hero { min-height: 220px; margin: 16px 0; }
  .hero-slide, .hero-slide img { min-height: 220px; }
  .hero-info { padding: 24px 18px; max-width: 100%; }
  .hero-info h2 { font-size: 22px; }
  .hero-info p { font-size: 12px; -webkit-line-clamp: 2; }

  .sec { margin: 24px 0; }
  .sec-title { font-size: 17px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

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

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

  .detail-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px;
  }

  .detail-cover { max-width: 180px; margin: 0 auto; }
  .detail-meta h1 { font-size: 20px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { justify-content: center; }
  .detail-body { padding: 16px; font-size: 13px; }

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