:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 60px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 45%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 10px 35px rgba(2, 6, 23, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-600), #7c3aed);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--white);
}

.desktop-nav a:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--slate-900);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 620px;
  align-items: center;
  padding: 72px 0 88px;
}

.hero-slide.active {
  display: flex;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  filter: saturate(1.05);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 75% 15%, rgba(59, 130, 246, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.1) 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.72fr;
  align-items: center;
  gap: 46px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(147, 197, 253, 0.45);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--blue-700);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.btn.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-panel-body {
  padding: 22px;
}

.hero-panel-body h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-meta span,
.tag-row span,
.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 800;
}

.hero-meta span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--blue-500);
}

.search-strip {
  margin-top: -36px;
  position: relative;
  z-index: 5;
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-card input,
.search-card select,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 0 15px;
  outline: none;
  color: var(--gray-900);
  background: var(--white);
  font-size: 15px;
}

.search-card input:focus,
.search-card select:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

main {
  display: block;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(255, 255, 255, 0.52);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2,
.page-title h1,
.detail-copy h2,
.player-section h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--gray-500);
  line-height: 1.8;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card strong {
  font-size: 22px;
}

.category-card span {
  color: var(--gray-500);
  line-height: 1.7;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
  gap: 22px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--slate-900);
}

.movie-card-wide .movie-cover {
  aspect-ratio: 16 / 10;
}

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

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

.movie-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.movie-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(2, 6, 23, 0);
  font-size: 42px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.movie-card:hover .movie-play {
  opacity: 1;
  background: rgba(2, 6, 23, 0.38);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-info p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 88px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #7c3aed);
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 88px;
  height: 118px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.6;
}

.page-hero {
  padding: 72px 0 46px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 20%, rgba(59, 130, 246, 0.38), transparent 34%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-title h1,
.page-title p {
  color: var(--white);
}

.page-title p {
  color: #cbd5e1;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(140px, 0.3fr));
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.empty-message {
  display: none;
  padding: 28px;
  border-radius: 18px;
  background: var(--white);
  color: var(--gray-500);
  text-align: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.05);
  transform: scale(1.08);
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.58));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #bfdbfe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--white);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info p {
  max-width: 780px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.info-chip {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.player-section,
.detail-copy,
.related-section {
  padding: 62px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow-strong);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 900;
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.86);
  text-align: center;
}

.player-message.show {
  display: block;
}

.copy-card {
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.copy-card p {
  margin: 14px 0 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.95;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-list div {
  padding: 15px;
  border-radius: 16px;
  background: var(--gray-100);
}

.detail-meta-list dt {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta-list dd {
  margin: 7px 0 0;
  color: var(--gray-900);
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 50px 0;
}

.footer-logo {
  display: block;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 24px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.result-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.result-card img {
  width: 92px;
  height: 122px;
  border-radius: 12px;
  object-fit: cover;
}

.result-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.result-card p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.6;
}

@media (max-width: 960px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-content,
  .detail-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    min-height: auto;
  }

  .hero-panel {
    max-width: 520px;
  }

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

  .rank-list,
  .detail-meta-list,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 360px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

  .hero-slide,
  .section,
  .page-hero,
  .player-section,
  .detail-copy,
  .related-section {
    padding: 42px 0;
  }

  .hero-content {
    gap: 28px;
  }

  .search-card {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

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

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

  .movie-info {
    padding: 12px;
  }

  .rank-item {
    grid-template-columns: 44px 74px 1fr;
    gap: 12px;
  }

  .rank-item img {
    width: 74px;
    height: 98px;
  }

  .result-card {
    grid-template-columns: 76px 1fr;
  }

  .result-card img {
    width: 76px;
    height: 104px;
  }
}
