/*
 * 首页样式（只保留首页专属）
 * 通用类如 .cv-auto / .section-title 建议继续放 global.css
 */

:root {
  --jd-brand: #ffd700;
  --jd-brand-dark: #ff9f1a;
  --jd-bg: #212d3b;
  --jd-text: #222;
  --jd-card-bg: #fff;
  --jd-radius: 12px;
  --jd-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

body {
  margin: 0;
  background: #f5f5f5;
  color: var(--jd-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

header {
  background: var(--jd-bg);
}

.top-bar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  display: flex;
  align-items: center;
  color: var(--jd-brand);
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 1px;
}

.site-logo img {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.site-logo span {
  font-size: 22px;
  line-height: 1.15;
}

nav {
  background: #28354a;
}

nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav li {
  list-style: none;
  margin: 0 14px;
}

nav a {
  display: inline-block;
  padding: 12px 0;
  color: var(--jd-brand);
  text-decoration: none;
  font-weight: 800;
}

nav a:focus-visible,
.search-form button:focus-visible,
.search-form input:focus-visible,
.hs-nav:focus-visible {
  outline: 3px solid rgba(255,215,0,.55);
  outline-offset: 2px;
  border-radius: 10px;
}

.intro-wrap {
  background: var(--jd-bg);
  padding: 10px 0 8px;
}

.intro-wrap h2,
.intro-wrap p {
  color: #fff;
  margin: 0;
}

.intro-wrap h2 {
  font-size: 1.4rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.intro-wrap p {
  font-size: 1rem;
  line-height: 1.7;
}

.intro-text--inner {
  max-width: 1160px;
  margin: 12px auto 0;
  padding: 0 18px;
}

.search-wrap {
  max-width: 1160px;
  margin: 12px auto 0;
  padding: 0 18px 10px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: #fff;
}

.search-form button {
  min-height: 44px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--jd-brand);
  color: #2a1a00;
  font-weight: 900;
  cursor: pointer;
}

.hero-wrap {
  max-width: 1160px;
  margin: 10px auto 0;
  padding: 0 18px 10px;
}

.hero-inner {
  display: flex;
  gap: 18px;
  align-items: stretch;
  background: #101724;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
}

.hero-poster {
  flex: 0 0 38%;
  min-width: 0;
  position: relative;
  display: block;
}

.hero-poster picture,
.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-info {
  flex: 1;
  padding: 18px 20px 18px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-tagline {
  font-size: .9rem;
  color: var(--jd-brand);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 4px 0 6px;
  line-height: 1.4;
}

.hero-meta {
  font-size: .9rem;
  color: #b8c4d4;
  margin-bottom: 10px;
}

.hero-excerpt {
  font-size: .95rem;
  color: #e5edf5;
  line-height: 1.6;
  max-height: 12.8em;
  overflow: hidden;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 900;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.hero-btn-primary {
  background: linear-gradient(135deg, var(--jd-brand), var(--jd-brand-dark));
  color: #301b00;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 8px 18px rgba(0,0,0,.35);
}

.hero-btn-secondary {
  background: transparent;
  color: var(--jd-brand);
  border: 1px solid rgba(255,215,0,.65);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* 首页横向滑动卡片 */
.home-strip {
  max-width: 1160px;
  margin: 22px auto 30px;
  padding: 0 18px;
}

.home-strip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.home-strip__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: #212d3b;
  letter-spacing: 1px;
}

.home-strip__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.home-strip__box {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 18px 16px;
  overflow: hidden;
}

.home-strip__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 3;
  pointer-events: none;
  transition: opacity .2s ease;
}

.home-strip__fade--left {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.home-strip__fade--right {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

.home-strip__box.is-at-start .home-strip__fade--left {
  opacity: 0;
}

.home-strip__box.is-at-end .home-strip__fade--right {
  opacity: 0;
}

.home-strip__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #cfd6df transparent;
  cursor: grab;
}

.home-strip__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-behavior: auto;
}

.home-strip__viewport::-webkit-scrollbar {
  height: 8px;
}

.home-strip__viewport::-webkit-scrollbar-thumb {
  background: #d9dee5;
  border-radius: 999px;
}

.home-strip__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 60px) / 6);
  gap: 12px;
}

.home-strip__item {
  min-width: 0;
}

.home-strip__card {
  display: block;
  min-width: 0;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-strip__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.10);
  border-color: #e2c04d;
}

.home-strip__thumb {
  position: relative;
}

.home-strip__thumb picture,
.home-strip__thumb img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.home-strip__watch {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  background: rgba(16, 23, 36, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  backdrop-filter: blur(2px);
}

.home-strip__body {
  padding: 10px 12px 12px;
}

.home-strip__name {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.home-strip__meta {
  font-size: 12px;
  color: #666;
  margin: 0 0 6px;
}

.home-strip__desc {
  font-size: 12px;
  line-height: 1.55;
  color: #888;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.hs-nav {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--jd-brand), var(--jd-brand-dark));
  color: #2a1a00;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hs-nav:hover {
  transform: translateY(-2px);
}

.hs-nav[disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 电影卡片网格（首页） */
.film-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.film-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.film-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.film-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.film-item picture,
.film-item img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.film-item:hover picture img,
.film-item:hover img {
  transform: scale(1.05);
}

.film-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  padding: 12px 14px 6px;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.film-meta {
  font-size: 12px;
  padding: 0 14px 4px;
  color: #666;
}

.film-desc {
  font-size: 13px;
  line-height: 1.5;
  padding: 0 14px 12px;
  color: #888;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.anchor-link {
  color: #1a4d9b;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  margin-left: 4px;
}

.anchor-link:hover {
  color: var(--jd-brand);
}

/* 专题合集 */
.jd-topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.jd-topic {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--jd-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  display: block;
}

.jd-topic:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.jd-topic picture,
.jd-topic img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.jd-topic:hover picture img,
.jd-topic:hover img {
  transform: scale(1.05);
}

.jd-topic__title {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
  text-align: center;
}

/* 热门排行 */
.jd-toplist {
  list-style: none;
  padding: 20px;
  margin: 0 0 40px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--jd-shadow);
}

.jd-topitem {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.jd-topitem:last-child {
  border-bottom: none;
}

.jd-topitem__no {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--jd-brand), var(--jd-brand-dark));
  color: #fff;
  font-weight: 900;
  border-radius: 6px;
  margin-right: 12px;
  font-size: 14px;
  flex-shrink: 0;
}

.jd-topitem:nth-child(n+4) .jd-topitem__no {
  background: #e0e0e0;
  color: #666;
}

.jd-topitem__title {
  flex: 1;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.jd-topitem__title:hover {
  color: var(--jd-brand);
}

/* 热门标签 */
.jd-tags {
  text-align: center;
  margin-bottom: 40px;
}

.jd-tags a {
  display: inline-block;
  padding: 6px 14px;
  margin: 4px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  color: #666;
  text-decoration: none;
  font-size: 13px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.jd-tags a:hover {
  background: linear-gradient(135deg, var(--jd-brand), var(--jd-brand-dark));
  color: #fff;
  border-color: var(--jd-brand);
  transform: translateY(-2px);
}

/* SEO 内容 */
.seo-content {
  max-width: 1160px;
  margin: 30px auto;
  padding: 0 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--jd-shadow);
}

.seo-content h2 {
  font-size: 1.6rem;
  color: #212d3b;
  margin: 24px 0 16px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.seo-content h2:first-child {
  border-top: none;
  padding-top: 24px;
}

.seo-content h3 {
  font-size: 1.3rem;
  color: #28354a;
  margin: 20px 0 12px;
}

.seo-content p {
  line-height: 1.85;
  color: #444;
  margin: 14px 0;
  font-size: 1.02rem;
}

.seo-content ul,
.seo-content ol {
  line-height: 1.85;
  color: #444;
  margin: 14px 0;
  padding-left: 28px;
}

.seo-content li {
  margin: 8px 0;
}

.seo-content strong {
  color: #212d3b;
  font-weight: 700;
}

.seo-content a {
  color: #1a73e8;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.seo-content a:hover {
  border-bottom-color: #1a73e8;
}

.seo-content__last {
  margin-bottom: 0;
}

.seo-content__more {
  font-weight: 800;
}

/* 响应式 */
@media (max-width: 1024px) {
  .home-strip__track {
    grid-auto-columns: calc((100% - 36px) / 4);
  }
}

@media (max-width: 820px) {
  .hero-inner {
    flex-direction: column;
  }

  .hero-poster {
    flex-basis: auto;
    max-height: 58vw;
  }

  .home-strip__track {
    grid-auto-columns: calc((100% - 14px) / 2.5);
  }

  .home-strip__box {
    padding: 14px;
  }
}

@media (max-width: 768px) {
  .film-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .jd-topics {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-strip__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-strip__controls {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .site-logo span {
    font-size: 18px;
  }

  .home-strip__track {
    grid-auto-columns: calc((100% - 12px) / 2.2);
    gap: 10px;
  }

  .home-strip__title {
    font-size: 1.2rem;
  }

  .home-strip__body {
    padding: 9px 10px 12px;
  }

  .home-strip__name {
    font-size: 13px;
    min-height: 38px;
  }

  .home-strip__desc {
    font-size: 12px;
  }

  .home-strip__fade {
    width: 42px;
  }
}

@media (max-width: 480px) {
  .film-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .film-title {
    font-size: 14px;
    padding: 10px 12px 4px;
  }
}