:root {
  --bg: #FFF9F2;
  --surface: rgba(255, 250, 244, 0.72);
  --primary: #F08A3C;
  --accent: #E85D2A;
  --text: #2E2620;
  --muted: #8A7E74;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 8px 28px rgba(240, 138, 60, 0.10);
  --shadow-hover: 0 16px 40px rgba(232, 93, 42, 0.18);
  --font-heading: 'Helvetica Neue', 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --border-soft: 1px solid rgba(240, 138, 60, 0.18);
}

* { 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;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(240, 138, 60, 0.07) 0, transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(232, 93, 42, 0.06) 0, transparent 38%);
  background-attachment: fixed;
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: var(--border-soft);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px rgba(240, 138, 60, 0.7);
}

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

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.22s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  background: rgba(240, 138, 60, 0.10);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.75);
  border: var(--border-soft);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  min-width: 220px;
  transition: box-shadow 0.22s ease;
}

.search-box:focus-within {
  box-shadow: 0 0 0 3px rgba(240, 138, 60, 0.18);
}

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

.search-box button {
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(232, 93, 42, 0.35);
}

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 32px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--border-soft);
  box-shadow: var(--shadow);
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.hero-slide:hover img { transform: scale(1.04); }

.hero-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 40px 32px;
  background: linear-gradient(to top, rgba(46, 38, 32, 0.85), transparent);
  color: #fff;
}

.hero-info h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-info p {
  font-size: 14px;
  opacity: 0.85;
  max-width: 640px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 6px 18px rgba(232, 93, 42, 0.30);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 93, 42, 0.42);
}

/* ===== Section ===== */
.sec {
  margin-top: 56px;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.05;
  color: var(--text);
  position: relative;
  padding-left: 18px;
}

.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 70%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.sec-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.22s ease;
}
.sec-more:hover { gap: 10px; }

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

.card {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--border-soft);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(240, 138, 60, 0.08);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-cover img { transform: scale(1.06); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(232, 93, 42, 0.4);
}

.card-info {
  padding: 12px 14px 14px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--border-soft);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}
.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: var(--accent);
}

.cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(240, 138, 60, 0.12);
  padding: 2px 9px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--border-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.rank-num {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(240, 138, 60, 0.08);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 12px rgba(232, 93, 42, 0.35);
}

.rank-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  flex: none;
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent);
}

/* ===== 详情页 ===== */
.detail {
  margin-top: 32px;
}

.detail-head {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--border-soft);
  box-shadow: var(--shadow);
}

.detail-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(240, 138, 60, 0.08);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.detail-meta p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 20px;
  padding: 8px 20px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 18px rgba(232, 93, 42, 0.35);
}

.detail-body {
  margin-top: 32px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: var(--border-soft);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  margin: 24px 0 12px;
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p { margin-bottom: 14px; color: var(--muted); }

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(240, 138, 60, 0.08);
  border: 1px solid rgba(240, 138, 60, 0.16);
  transition: all 0.22s ease;
}
.tag:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--border-soft);
  transition: all 0.22s ease;
}
.pg:hover {
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.pg.current {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(232, 93, 42, 0.35);
}

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

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.link-item {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: var(--border-soft);
  transition: all 0.22s ease;
}
.link-item:hover {
  color: var(--accent);
  background: rgba(240, 138, 60, 0.10);
}

/* ===== 面包屑 ===== */
.crumbs {
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.crumbs a { color: var(--muted); transition: color 0.2s ease; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: 0.5; }

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--accent);
  font-weight: 700;
  background: rgba(240, 138, 60, 0.14);
  padding: 0 3px;
  border-radius: 4px;
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 72px;
  padding: 40px 0;
  border-top: var(--border-soft);
  background: rgba(255, 250, 244, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); transition: color 0.2s ease; }
.footer a:hover { color: var(--accent); }

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

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .search-box {
    min-width: 0;
    flex: 1;
    order: 2;
  }

  .hero { margin-top: 20px; border-radius: var(--radius-sm); }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-info { padding: 40px 20px 20px; }
  .hero-info h2 { font-size: 24px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; }

  .sec { margin-top: 40px; }
  .sec-head { margin-bottom: 18px; }
  .sec-title { font-size: 24px; padding-left: 14px; }
  .sec-title::before { width: 5px; }

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

  .card-info { padding: 10px 12px 12px; }
  .card-title { font-size: 14px; }

  .detail { margin-top: 20px; }
  .detail-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
  .detail-cover { max-width: 200px; }
  .detail-meta h1 { font-size: 24px; }
  .detail-body { padding: 20px; margin-top: 20px; }

  .pager { margin-top: 32px; gap: 6px; }
  .pg { min-width: 38px; height: 38px; font-size: 13px; }

  .footer { margin-top: 48px; padding: 28px 0; }
}