:root {
  --bg: #FFF5F2;
  --surface: #FFFFFF;
  --primary: #E0446B;
  --accent: #C9A15A;
  --text: #2E1F24;
  --muted: #9B8088;
  --radius: 18px;
  --font-heading: Georgia, 'Times New Roman', 'Songti SC', serif;
  --font-body: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --shadow: 0 8px 24px rgba(224, 68, 107, 0.10);
  --shadow-hover: 0 14px 34px rgba(224, 68, 107, 0.18);
  --line: rgba(201, 161, 90, 0.35);
}

* { 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.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(224, 68, 107, 0.06), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(201, 161, 90, 0.07), transparent 46%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .25s; }
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 20px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 245, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo img { max-height: 40px; }

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

.nav a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  transition: all .25s;
}
.nav a:hover {
  color: var(--primary);
  background: rgba(224, 68, 107, 0.08);
}

.search-box {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  box-shadow: 0 2px 10px rgba(224, 68, 107, 0.06);
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  width: 150px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #f06a8c);
  color: #fff;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--font-body);
  transition: filter .25s;
}
.search-box button:hover { filter: brightness(1.06); }

/* ===== Hero 轮播 ===== */
.hero {
  position: relative;
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-slide {
  position: relative;
  display: block;
  aspect-ratio: 21 / 9;
  overflow: hidden;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(46, 31, 36, 0.82) 0%, rgba(46, 31, 36, 0.35) 45%, transparent 78%);
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 40px;
  max-width: 60%;
  color: #fff;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.hero-info p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #f06a8c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(224, 68, 107, 0.4);
  transition: transform .25s, box-shadow .25s;
}
.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(224, 68, 107, 0.5);
}

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

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sec-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .5px;
}
.sec-title::before {
  content: "❖";
  color: var(--accent);
  margin-right: 8px;
  font-size: 16px;
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
}
.sec-more:hover { color: var(--primary); }

/* ===== Grid 卡片流 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 161, 90, 0.18);
  transition: transform .3s, box-shadow .3s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #f7e6e2;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.card:hover .card-cover img { transform: scale(1.05); }

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(46, 31, 36, 0.72);
  backdrop-filter: blur(6px);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(201, 161, 90, 0.5);
}

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

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

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(224, 68, 107, 0.06);
  font-weight: 600;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.cat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  color: var(--primary);
}

.cat-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: rgba(224, 68, 107, 0.08);
  padding: 2px 10px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(201, 161, 90, 0.2);
  transition: transform .25s, box-shadow .25s;
}
.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  background: rgba(201, 161, 90, 0.12);
  border-radius: 10px;
}
.rank-item:nth-child(1) .rank-num { color: #fff; background: linear-gradient(135deg, #E0446B, #f06a8c); }
.rank-item:nth-child(2) .rank-num { color: #fff; background: linear-gradient(135deg, #d98a55, #e8b178); }
.rank-item:nth-child(3) .rank-num { color: #fff; background: linear-gradient(135deg, #C9A15A, #ddc08a); }

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

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

/* ===== 详情页 ===== */
.detail {
  margin: 32px 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 161, 90, 0.2);
}

.detail-head {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
}

.detail-cover {
  flex-shrink: 0;
  width: 260px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta { flex: 1; min-width: 0; }
.detail-meta h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.detail-meta .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.detail-meta ul { display: grid; gap: 8px; font-size: 14px; }
.detail-meta li { color: var(--muted); }
.detail-meta li span { color: var(--text); }

.detail-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin: 16px 0;
}
.detail-score small { font-size: 14px; color: var(--muted); font-family: var(--font-body); }

.detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  border-top: 1px dashed var(--line);
  padding-top: 24px;
}
.detail-body p { margin-bottom: 14px; }
.detail-body h2, .detail-body h3 {
  font-family: var(--font-heading);
  margin: 20px 0 10px;
  color: var(--primary);
}

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

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--primary);
  background: rgba(224, 68, 107, 0.08);
  border: 1px solid rgba(224, 68, 107, 0.22);
  border-radius: 999px;
  transition: all .25s;
}
.tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .25s;
}
.pg:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.pg.current {
  background: linear-gradient(135deg, var(--primary), #f06a8c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(224, 68, 107, 0.35);
}
.pg.disabled {
  color: var(--muted);
  opacity: .5;
  pointer-events: none;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(201, 161, 90, 0.08);
  border: 1px solid rgba(201, 161, 90, 0.2);
  transition: all .25s;
}
.link-item:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===== 面包屑 ===== */
.crumbs {
  font-size: 13px;
  color: var(--muted);
  padding: 20px 0 4px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span { color: var(--primary); }

/* ===== 搜索高亮 ===== */
.hl {
  color: var(--primary);
  background: rgba(224, 68, 107, 0.12);
  border-radius: 4px;
  padding: 0 2px;
  font-weight: 600;
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0 28px;
  background: linear-gradient(180deg, rgba(255, 245, 242, 0), rgba(224, 68, 107, 0.06));
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin: 2px 0; }

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

  .header .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    width: 100%;
    flex: none;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { padding: 5px 12px; font-size: 13px; }
  .search-box { margin-left: auto; padding: 3px 4px 3px 12px; }
  .search-box input { width: 100px; font-size: 13px; }
  .search-box button { padding: 5px 12px; }

  .hero { margin: 18px 0; border-radius: 14px; }
  .hero-slide { aspect-ratio: 4 / 3; }
  .hero-slide::after {
    background: linear-gradient(0deg, rgba(46, 31, 36, 0.85) 0%, rgba(46, 31, 36, 0.25) 55%, transparent 85%);
  }
  .hero-info { max-width: 100%; padding: 20px; }
  .hero-info h2 { font-size: 20px; }
  .hero-info p { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 12px; }
  .btn { padding: 8px 20px; font-size: 13px; }

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

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

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

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

  .detail { padding: 18px; margin: 20px 0; }
  .detail-head { flex-direction: column; gap: 18px; }
  .detail-cover { width: 160px; margin: 0 auto; }
  .detail-meta h1 { font-size: 22px; }
  .detail-score { font-size: 28px; }
  .detail-body { font-size: 14px; }

  .pager { gap: 6px; margin: 28px 0; }
  .pg { min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; border-radius: 10px; }

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