:root {
  --bg: #1A0B1E;
  --surface: #2A1030;
  --primary: #FF3D7F;
  --accent: #FFB86B;
  --text: #FDF0F6;
  --muted: #B98AA8;
  --radius: 18px;
  --font-heading: 'Playfair Display', 'Noto Serif SC', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Helvetica Neue', sans-serif;
  --line: rgba(255, 61, 127, 0.18);
  --glow: 0 8px 32px rgba(255, 184, 107, 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.65;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(255, 61, 127, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 61, 127, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(255, 61, 127, 0.025) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  mix-blend-mode: screen;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary); }
img { display: block; max-width: 100%; }
ul { 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(26, 11, 30, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--text), var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(255, 61, 127, 0.35);
}

.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(--muted);
  white-space: nowrap;
  transition: all .2s;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(255, 61, 127, 0.15);
  box-shadow: 0 0 16px rgba(255, 61, 127, 0.25);
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  min-width: 200px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 61, 127, 0.3);
}
.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: #1A0B1E;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 184, 107, 0.4);
}

/* ===== 轮播 Hero ===== */
.hero {
  position: relative;
  margin: 32px auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--glow);
}
.hero-slide {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 420px;
  background-size: cover;
  background-position: center;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 11, 30, 0.96) 8%, rgba(26, 11, 30, 0.5) 45%, transparent 80%);
}
.hero-info {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 640px;
}
.hero-info h2 {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(255, 61, 127, 0.5);
}
.hero-info p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #1A0B1E;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 24px rgba(255, 61, 127, 0.35);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 184, 107, 0.45);
  color: #1A0B1E;
}

/* ===== 区块 ===== */
.sec { margin: 48px auto; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
  position: relative;
  padding-left: 16px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  box-shadow: 0 0 12px var(--primary);
}
.sec-more {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--primary); }

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

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 61, 127, 0.4);
  box-shadow: 0 16px 40px rgba(255, 61, 127, 0.22), 0 0 0 1px rgba(255, 184, 107, 0.15);
}

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

.card-score {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #1A0B1E;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 4px 14px rgba(255, 61, 127, 0.45);
}

.card-info { padding: 12px 14px 16px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
}
.card-meta {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  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: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: all .2s;
}
.cat-item:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(255, 61, 127, 0.22);
  transform: translateY(-2px);
  color: var(--primary);
}
.cat-count {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 61, 127, 0.12);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ===== 排行榜 ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all .2s;
}
.rank-item:hover {
  border-color: rgba(255, 61, 127, 0.35);
  box-shadow: 0 8px 24px rgba(255, 61, 127, 0.15);
  transform: translateX(4px);
}
.rank-num {
  flex: 0 0 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 61, 127, 0.1);
}
.rank-item:nth-child(1) .rank-num {
  color: #1A0B1E;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 0 16px rgba(255, 184, 107, 0.5);
}
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: var(--accent);
  background: rgba(255, 184, 107, 0.15);
}
.rank-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-score {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== 详情页 ===== */
.detail { margin: 40px auto; }
.detail-head {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.detail-cover {
  flex: 0 0 280px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(255, 61, 127, 0.28);
  background: var(--surface);
}
.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: 34px;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--text);
  text-shadow: 0 0 24px rgba(255, 61, 127, 0.3);
}
.detail-meta p {
  color: var(--muted);
  font-size: 14px;
  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;
  padding: 6px 18px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #1A0B1E;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 6px 24px rgba(255, 61, 127, 0.4);
}
.detail-body {
  margin-top: 32px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 14px;
  color: var(--text);
}
.detail-body p { margin-bottom: 14px; color: var(--muted); }

/* ===== 标签 ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--accent);
  background: rgba(255, 184, 107, 0.1);
  border: 1px solid rgba(255, 184, 107, 0.25);
  transition: all .2s;
}
.tag:hover {
  background: rgba(255, 61, 127, 0.18);
  border-color: var(--primary);
  color: var(--text);
}

/* ===== 分页 ===== */
.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 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all .2s;
}
.pg:hover {
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(255, 61, 127, 0.25);
}
.pg.current {
  color: #1A0B1E;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(255, 61, 127, 0.4);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
  cursor: not-allowed;
}

/* ===== 友情链接 ===== */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.link-item {
  font-size: 13px;
  color: var(--muted);
}
.link-item:hover { color: var(--primary); }

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

/* ===== 搜索高亮 ===== */
.hl {
  color: #1A0B1E;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

/* ===== 页脚 ===== */
.footer {
  margin-top: 60px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(42, 16, 48, 0.6), transparent);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 2;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }
  .logo { font-size: 20px; }
  .nav {
    order: 3;
    flex: 0 0 100%;
    gap: 4px;
    padding-bottom: 4px;
  }
  .nav a { padding: 5px 12px; font-size: 13px; }
  .search-box {
    flex: 1;
    min-width: 0;
    order: 2;
  }

  .hero-slide { min-height: 300px; }
  .hero-info { padding: 24px 20px; }
  .hero-info h2 { font-size: 26px; }

  .sec { margin: 32px auto; }
  .sec-title { font-size: 21px; }

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

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

  .detail-head {
    flex-direction: column;
    gap: 20px;
  }
  .detail-cover {
    flex: none;
    width: 180px;
    margin: 0 auto;
  }
  .detail-meta h1 { font-size: 24px; text-align: center; }
  .detail-meta p { text-align: center; }
  .detail-score { display: flex; justify-content: center; }
  .detail-body { padding: 20px; }

  .rank-item { padding: 10px 12px; gap: 10px; }
  .rank-num { flex-basis: 30px; height: 30px; font-size: 14px; }

  .pg { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
}