:root {
  --bg: #0B0E14;
  --surface: #151A24;
  --primary: #7A9CC6;
  --accent: #00E5C0;
  --text: #E8ECF2;
  --muted: #9AA7B8;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', 'Helvetica Neue', 'PingFang SC', sans-serif;
  --border: rgba(122, 156, 198, 0.18);
  --glow: rgba(0, 229, 192, 0.35);
  --gap: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 500px at 80% -10%, rgba(0, 229, 192, 0.08), transparent 60%),
    radial-gradient(700px 400px at 5% 0%, rgba(122, 156, 198, 0.10), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button, input { font-family: inherit; }

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

/* ---------- 头部 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow), 0 0 24px var(--glow);
}
.logo:hover { color: var(--accent); }

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

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all .22s ease;
}
.nav a:hover {
  color: var(--text);
  background: rgba(122, 156, 198, 0.12);
  border-color: var(--border);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  min-width: 220px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.12);
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14px;
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #37b7ff);
  color: #04121a;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.search-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--glow);
}

/* ---------- 轮播 Hero ---------- */
.hero {
  position: relative;
  margin: 32px 0 56px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 30px 80px -40px rgba(0, 229, 192, 0.35);
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 420px;
  animation: heroFade .6s ease both;
}
.hero-slide:first-child { display: block; }
@keyframes heroFade {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.55) saturate(1.05);
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,14,20,.96) 0%, rgba(11,14,20,.65) 45%, rgba(11,14,20,.15) 100%),
              linear-gradient(0deg, rgba(11,14,20,.9), transparent 55%);
}

.hero-info {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-info h1,
.hero-info h2 {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.5px;
}
.hero-info p {
  color: var(--muted);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-info .tag-list { margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), #37b7ff);
  border: 1px solid transparent;
  cursor: pointer;
  align-self: flex-start;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover {
  color: #04121a;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px var(--glow);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

/* ---------- 版块 ---------- */
.sec { margin: 0 0 64px; }

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

.sec-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.3px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.sec-title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  box-shadow: 0 0 12px var(--glow);
}

.sec-more {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.sec-more:hover { color: var(--accent); }

/* ---------- 影片网格与卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 192, 0.5);
  box-shadow: 0 20px 40px -20px rgba(0, 229, 192, 0.4);
}

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), #37b7ff);
  box-shadow: 0 4px 14px rgba(0, 229, 192, 0.4);
}

.card-info {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--accent); }

.card-meta {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all .22s ease;
}
.cat-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 10px 26px -14px var(--glow);
}

.cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(122, 156, 198, 0.12);
  padding: 2px 9px;
  border-radius: 999px;
}

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

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(21, 26, 36, 0.6);
  transition: all .22s ease;
}
.rank-item:hover {
  border-color: var(--border);
  background: var(--surface);
  transform: translateX(4px);
}

.rank-num {
  flex: 0 0 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(122, 156, 198, 0.1);
}
.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), #37b7ff);
  box-shadow: 0 0 16px var(--glow);
}

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

.rank-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}

/* ---------- 详情页 ---------- */
.detail { margin: 40px 0 64px; }

.detail-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -50px rgba(0, 229, 192, 0.4);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-meta h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.5px;
}
.detail-meta p {
  color: var(--muted);
  font-size: 14px;
}
.detail-meta p strong { color: var(--text); font-weight: 600; }

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 192, 0.35);
  background: rgba(0, 229, 192, 0.08);
  text-shadow: 0 0 18px var(--glow);
}

.detail-body {
  margin-top: 32px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}
.detail-body h2,
.detail-body h3 {
  color: var(--text);
  font-size: 18px;
  margin: 20px 0 10px;
}
.detail-body h2:first-child,
.detail-body h3:first-child { margin-top: 0; }
.detail-body p + p { margin-top: 12px; }
.detail-body a { color: var(--accent); }

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

.tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(122, 156, 198, 0.1);
  border: 1px solid var(--border);
  transition: all .2s ease;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 229, 192, 0.08);
}

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

.pg {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all .2s ease;
}
.pg:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.pg.current {
  color: #04121a;
  background: linear-gradient(135deg, var(--accent), #37b7ff);
  border-color: transparent;
  box-shadow: 0 0 18px var(--glow);
}
.pg.disabled {
  opacity: .4;
  pointer-events: none;
}

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

.link-item {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(21, 26, 36, 0.6);
  transition: all .2s ease;
}
.link-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

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

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 80px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  background: rgba(11, 14, 20, 0.6);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 2;
}
.footer a { color: var(--muted); }
.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: 220px 1fr; gap: 28px; }
}

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

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

  .hero { margin: 20px 0 40px; }
  .hero-slide { min-height: 360px; }
  .hero-info { padding: 40px 24px; max-width: 100%; }
  .hero-info h1,
  .hero-info h2 { font-size: 26px; }
  .hero-info p { font-size: 14px; -webkit-line-clamp: 2; }

  .sec { margin-bottom: 44px; }
  .sec-title { font-size: 20px; }

  .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; }

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

  .pager { margin-top: 32px; }
  .footer { margin-top: 56px; padding: 28px 0 36px; }
}