:root {
  --blue-900: #0f172a;
  --blue-800: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --orange-500: #f97316;
  --red-500: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800) 55%, var(--blue-900));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.desktop-nav a,
.mobile-nav a {
  opacity: 0.9;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--blue-100);
  opacity: 1;
}

.header-search {
  position: relative;
  width: 280px;
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.filter-box input {
  width: 100%;
  border: 0;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 11px 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 420px;
  overflow-y: auto;
  color: var(--gray-900);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.search-results.is-open {
  display: block;
}

.search-results a {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.search-results a:last-child {
  border-bottom: 0;
}

.search-results strong {
  display: block;
  font-size: 15px;
}

.search-results span {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 14px 20px 18px;
  background: rgba(30, 64, 175, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-weight: 700;
}

.mobile-search {
  position: relative;
  margin-top: 10px;
}

.mobile-search-results {
  top: calc(100% + 8px);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: var(--blue-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-copy {
  width: min(640px, 100%);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange-500);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 14px;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 7px 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.32);
  padding: 0 24px;
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  padding: 0 22px;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px 0;
}

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

.section-header h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
}

.section-header p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--gray-500);
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.58));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  border-radius: 50%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  padding: 16px 16px 18px;
}

.movie-meta {
  margin: 0 0 7px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-card h3 {
  min-height: 52px;
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.4;
}

.movie-card h3 a:hover {
  color: var(--blue-600);
}

.movie-one-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-700);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  color: var(--blue-700);
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.category-card::after {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  content: "";
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.rank-feature {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.rank-feature::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.86));
}

.rank-feature-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 28px;
}

.rank-feature h3 {
  margin: 10px 0;
  font-size: 34px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  background: #ffffff;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.rank-number {
  color: var(--orange-500);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--blue-900);
}

.rank-content strong,
.rank-content em {
  display: block;
}

.rank-content em {
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.page-title {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 20px 14px;
}

.filter-box {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 26px;
}

.filter-box input {
  max-width: 520px;
  color: var(--gray-900);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), inset 0 0 0 1px var(--gray-200);
}

.filter-box input::placeholder {
  color: var(--gray-500);
}

.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.36), transparent 28%), linear-gradient(135deg, var(--blue-900), var(--blue-800));
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 22px 45px rgba(2, 6, 23, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--blue-900);
}

.detail-title h1 {
  color: #ffffff;
  font-size: clamp(34px, 6vw, 58px);
}

.detail-title p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 7px 12px;
  font-weight: 700;
}

.detail-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 0;
}

.player-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.video-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-stage video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.32);
}

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

.player-info {
  padding: 20px 22px 24px;
}

.player-info h2,
.text-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.player-info p,
.text-panel p {
  margin: 0;
  color: var(--gray-700);
}

.text-panel {
  display: grid;
  gap: 24px;
  background: #ffffff;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.08);
}

.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 0;
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb a:hover {
  color: #ffffff;
}

.site-footer {
  margin-top: 64px;
  color: #ffffff;
  background: var(--blue-900);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
}

.footer-inner p {
  max-width: 680px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 700;
}

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

.empty-filter {
  display: none;
  color: var(--gray-500);
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.08);
}

.empty-filter.is-visible {
  display: block;
}

@media (max-width: 980px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

  .rank-layout,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .site-logo {
    font-size: 20px;
  }

  .hero {
    height: 560px;
  }

  .section-header,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card h3 {
    min-height: auto;
    font-size: 16px;
  }

  .movie-card-body {
    padding: 13px;
  }

  .rank-item {
    grid-template-columns: 36px 50px 1fr;
  }

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

  .detail-hero-inner {
    padding-top: 30px;
  }

  .text-panel {
    padding: 22px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}
