/*
  好片推荐 - 静态电影网站样式
  视觉来源：上传的原站 CSS/JS 所体现的深色 slate 背景、蓝色按钮、Hero 轮播、圆角卡片、hover 放大、响应式导航与播放器布局。
*/

:root {
  --color-bg: #020617;
  --color-bg-soft: #0f172a;
  --color-panel: #111827;
  --color-panel-2: #1e293b;
  --color-panel-3: #334155;
  --color-border: #1f2937;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-cyan: #06b6d4;
  --color-text: #ffffff;
  --color-muted: #cbd5e1;
  --color-faint: #94a3b8;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.navbar {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-links a {
  color: var(--color-muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: #ffffff;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-controls input,
.filter-controls select,
.search-box input {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  outline: none;
  padding: 0 14px;
}

.nav-search input {
  width: 250px;
}

.nav-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus,
.search-box input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.nav-search button,
.search-box button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--color-primary);
  color: #ffffff;
  padding: 0 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.search-box button:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #000000;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 50%, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  height: 100%;
  margin: 0 auto 0 max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding: 80px 24px 110px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker,
.category-badge,
.year-badge,
.rank-badge,
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  line-height: 1;
}

.hero-kicker {
  width: fit-content;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  margin-bottom: 18px;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-one-line {
  margin: 0 0 12px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.55;
}

.hero-summary {
  max-width: 680px;
  margin: 0 0 24px;
  color: #94a3b8;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

.button-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.button-primary:hover {
  background: var(--color-primary-hover);
}

.button-secondary {
  background: rgba(30, 41, 59, 0.86);
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.button-secondary:hover {
  background: rgba(51, 65, 85, 0.92);
}

.hero-arrow {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.06);
}

.hero-arrow-left {
  left: 24px;
  transform: translateY(-50%);
}

.hero-arrow-right {
  right: 24px;
  transform: translateY(-50%);
}

.hero-dots {
  position: absolute;
  z-index: 9;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 42px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.65);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: var(--color-primary);
}

.hero-rail {
  position: absolute;
  z-index: 7;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 34px;
  display: grid;
  grid-template-columns: repeat(5, 112px);
  gap: 12px;
}

.hero-mini-card {
  position: relative;
  height: 70px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hero-mini-card.is-active,
.hero-mini-card:hover {
  opacity: 1;
  transform: translateY(-3px);
  border-color: var(--color-primary);
}

.hero-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mini-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 8px 7px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 800px;
  margin: 0;
  color: var(--color-faint);
  font-size: 18px;
  line-height: 1.8;
}

.stats-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 14px;
}

.stat-card,
.category-card,
.filter-panel,
.detail-panel,
.info-panel,
.search-empty {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.stat-card {
  padding: 24px;
}

.stat-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: #ffffff;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--color-faint);
}

.content-section {
  margin-top: 44px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--color-faint);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.wide-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.movie-card {
  min-width: 0;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.35), transparent 35%),
    #111827;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.movie-card-wide .poster-frame {
  aspect-ratio: 16 / 9;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.18), transparent);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.1);
  filter: saturate(1.08);
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.category-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
}

.category-badge {
  top: 10px;
  left: 10px;
  background: var(--color-primary);
}

.year-badge {
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-hover {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  font-size: 28px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding-top: 12px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
  color: #60a5fa;
}

.card-line,
.card-meta {
  margin: 0;
  color: var(--color-faint);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-line {
  -webkit-line-clamp: 2;
}

.card-meta {
  margin-top: 6px;
  -webkit-line-clamp: 1;
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-card {
  padding: 26px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(37, 99, 235, 0.46);
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--color-faint);
  line-height: 1.65;
}

.category-card strong {
  color: #60a5fa;
}

.filter-panel {
  margin: 30px 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.filter-panel strong {
  display: block;
  margin-bottom: 4px;
}

.filter-panel span {
  color: var(--color-faint);
  font-size: 14px;
}

.filter-controls {
  display: flex;
  gap: 10px;
}

.filter-controls input {
  width: min(360px, 48vw);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.86fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-lg);
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-player video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(0, 0, 0, 0.22));
  transition: opacity 0.2s ease;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.big-play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  background: var(--color-cyan);
  color: #ffffff;
  font-size: 44px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.38);
  transition: background 0.2s ease, transform 0.2s ease;
}

.big-play-button:hover {
  background: #0891b2;
  transform: scale(1.08);
}

.player-error {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.86);
  color: #fca5a5;
  line-height: 1.7;
}

.video-player.has-error .player-error {
  display: flex;
}

.detail-panel,
.info-panel {
  margin-top: 24px;
  padding: 24px;
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 42px);
}

.breadcrumbs {
  margin-bottom: 20px;
  color: var(--color-faint);
  font-size: 14px;
}

.breadcrumbs a {
  color: #93c5fd;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--color-faint);
  margin-bottom: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0;
}

.tag-pill {
  background: rgba(30, 41, 59, 0.92);
  color: #dbeafe;
  padding: 7px 11px;
  font-size: 13px;
}

.detail-panel h2,
.info-panel h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-panel h2:first-child,
.info-panel h2:first-child {
  margin-top: 0;
}

.detail-panel p,
.info-panel p,
.info-list dd,
.info-list dt {
  line-height: 1.8;
}

.detail-panel p,
.info-list dd {
  color: var(--color-muted);
}

.info-list {
  margin: 0;
}

.info-list div {
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list dt {
  color: var(--color-faint);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.search-box {
  display: flex;
  max-width: 760px;
  gap: 10px;
  margin-top: 26px;
}

.search-box input {
  flex: 1;
  min-height: 52px;
  font-size: 16px;
}

.search-box button {
  min-height: 52px;
  padding: 0 24px;
}

.search-results-info {
  color: var(--color-faint);
  margin: 24px 0 4px;
}

.search-empty {
  padding: 36px;
  text-align: center;
  color: var(--color-faint);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
  color: #e2e8f0;
  padding: 0 14px;
}

.pagination a:hover,
.pagination .is-current {
  background: var(--color-primary);
  color: #ffffff;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #0f172a;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--color-faint);
  line-height: 1.75;
  font-size: 14px;
}

.site-footer a:hover {
  color: #67e8f9;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .nav-search input {
    width: 190px;
  }

  .hero-rail {
    display: none;
  }

  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .wide-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .navbar {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 10px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 4px;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    flex: 1;
    width: auto;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    margin-left: 18px;
    padding-right: 20px;
  }

  .hero-summary {
    -webkit-line-clamp: 4;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    left: 24px;
  }

  .movie-grid,
  .wide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .category-grid,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .filter-controls,
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls input {
    width: 100%;
  }

  .page-wrap {
    padding: 34px 16px;
  }
}

@media (max-width: 460px) {
  .hero-content h1 {
    font-size: 36px;
  }

  .hero-one-line {
    font-size: 17px;
  }

  .movie-grid,
  .wide-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body h3 {
    font-size: 14px;
  }

  .detail-panel,
  .info-panel {
    padding: 18px;
  }
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #ffffff;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
