/* 暗色报纸·三原色拼贴 */
:root {
  --bg: #121212;
  --surface: #1E1E1E;
  --primary: #E63946;
  --accent: #F4A261;
  --text: #F8F9FA;
  --muted: #6C757D;
  --radius: 4px;
  --font-heading: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
  --shadow-hard: 4px 4px 0 rgba(0,0,0,0.6);
  --shadow-primary: 4px 4px 0 var(--primary);
  --shadow-accent: 4px 4px 0 var(--accent);
  --line: 1px solid rgba(248,249,250,0.12);
  --line-strong: 2px solid var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

/* 头部 */
.header {
  background: var(--surface);
  border-bottom: var(--line-strong);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  padding-left: 14px;
}

.logo::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 28px;
  background: var(--primary);
}

.logo:hover {
  color: var(--text);
}

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

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--text);
  background: rgba(230,57,70,0.15);
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  padding: 6px 12px;
  font-size: 13px;
  width: 160px;
  color: var(--text);
}

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

.search-box button {
  background: var(--primary);
  border: none;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-box button:hover {
  background: var(--accent);
  color: var(--bg);
}

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

.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-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18,18,18,0.95) 0%, rgba(18,18,18,0.2) 50%, transparent 100%);
  pointer-events: none;
}

.hero-info {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 28px 32px;
  z-index: 2;
  max-width: 680px;
}

.hero-info h2,
.hero-info .hero-title {
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}

.hero-info p {
  color: rgba(248,249,250,0.8);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-primary);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* 区块 */
.sec {
  margin: 40px 0;
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: var(--line-strong);
  position: relative;
}

.sec-head::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 48px;
  height: 4px;
  background: var(--primary);
}

.sec-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-title::before {
  content: counter(sec-counter, decimal-leading-zero);
  counter-increment: sec-counter;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(230,57,70,0.15);
  padding: 2px 8px;
  border-radius: var(--radius);
  letter-spacing: 1px;
}

body {
  counter-reset: sec-counter;
}

.sec-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

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

.card {
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-primary);
  border-color: var(--primary);
}

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

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

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

.card-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  z-index: 2;
}

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

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

.card-title a:hover {
  color: var(--primary);
}

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

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

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cat-item:hover {
  background: rgba(230,57,70,0.1);
  border-left-color: var(--accent);
  transform: translateX(3px);
  color: var(--text);
}

.cat-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  background: rgba(108,117,125,0.2);
  padding: 1px 7px;
  border-radius: 10px;
}

/* 排行榜 */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.rank-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-hard);
}

.rank-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  min-width: 36px;
  text-align: center;
  line-height: 1;
}

.rank-item:nth-child(1) .rank-num,
.rank-item:nth-child(2) .rank-num,
.rank-item:nth-child(3) .rank-num {
  color: var(--accent);
}

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

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

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

.detail-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 28px;
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  margin-bottom: 32px;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--text);
  box-shadow: var(--shadow-primary);
}

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

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-meta h1 {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 4px;
}

.detail-meta p {
  margin: 0;
  font-size: 14px;
  color: rgba(248,249,250,0.75);
}

.detail-meta p strong {
  color: var(--muted);
  font-weight: 600;
  margin-right: 6px;
}

.detail-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  margin: 8px 0;
}

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

.detail-body {
  padding: 24px 28px;
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.8;
  color: rgba(248,249,250,0.85);
}

.detail-body h2,
.detail-body h3 {
  color: var(--text);
  margin-top: 1.2em;
}

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

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid rgba(108,117,125,0.4);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.tag:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

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

.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.pg:hover {
  background: rgba(230,57,70,0.15);
  border-color: var(--primary);
  color: var(--text);
}

.pg.current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text);
  box-shadow: var(--shadow-hard);
  cursor: default;
}

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

/* 友情链接 */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 20px 0;
  border-top: var(--line);
  margin-top: 40px;
}

.link-item {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

/* 页脚 */
.footer {
  background: var(--surface);
  border-top: var(--line-strong);
  padding: 32px 0 24px;
  margin-top: 48px;
  font-size: 13px;
  color: var(--muted);
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

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

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

.crumbs a {
  color: var(--muted);
}

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

.crumbs span {
  color: var(--text);
}

/* 搜索高亮 */
.hl {
  background: var(--accent);
  color: var(--bg);
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 700;
}

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

  .header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 10px;
  }

  .logo {
    font-size: 22px;
  }

  .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: 13px;
  }

  .search-box {
    margin-left: auto;
  }

  .search-box input {
    width: 110px;
  }

  .hero-slide {
    aspect-ratio: 16 / 10;
  }

  .hero-info {
    padding: 18px 16px;
  }

  .hero-info h2,
  .hero-info .hero-title {
    font-size: 22px;
  }

  .hero-info p {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .btn {
    padding: 8px 18px;
    font-size: 13px;
  }

  .sec {
    margin: 28px 0;
  }

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

  .sec-head {
    margin-bottom: 14px;
  }

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

  .card-info {
    padding: 8px 10px 10px;
  }

  .card-title {
    font-size: 13px;
  }

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

  .cat-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .rank-item {
    padding: 8px 10px;
    gap: 10px;
  }

  .rank-num {
    font-size: 18px;
    min-width: 28px;
  }

  .rank-title {
    font-size: 13px;
  }

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

  .detail-cover {
    max-width: 200px;
    margin: 0 auto;
  }

  .detail-meta h1 {
    font-size: 22px;
    text-align: center;
  }

  .detail-meta p {
    text-align: center;
  }

  .detail-score {
    justify-content: center;
    width: 100%;
  }

  .detail-body {
    padding: 18px;
    font-size: 14px;
  }

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

  .footer .wrap {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

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

  .hero-info h2,
  .hero-info .hero-title {
    font-size: 18px;
  }
}