* {
  box-sizing: border-box;
}

:root {
  --blue-50: #eff6ff;
  --cyan-50: #ecfeff;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --teal-500: #14b8a6;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--blue-50), var(--cyan-50));
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: white;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-600), var(--teal-500));
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.28);
}

.header-inner {
  position: relative;
  padding: 16px 0 24px;
}

.nav-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 24px;
  pointer-events: none;
}

.header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  z-index: 2;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon,
.footer-brand-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.20);
  transition: background 0.25s ease;
}

.brand:hover .brand-icon {
  background: rgba(255, 255, 255, 0.30);
}

.brand-icon-svg {
  width: 27px;
  height: 27px;
}

.brand-text,
.footer-brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle,
.footer-brand small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

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

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: white;
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: white;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.top-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.top-search input,
.mobile-search input {
  border: 0;
  outline: 0;
  color: white;
  background: rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 12px 48px 12px 18px;
  width: 250px;
  backdrop-filter: blur(10px);
}

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

.top-search button {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: white;
  font-size: 24px;
  cursor: pointer;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-panel {
  display: none;
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
}

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

.mobile-search input {
  width: 100%;
}

.mobile-search button {
  margin-left: 8px;
  border: 0;
  color: var(--blue-600);
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 16px;
  background: white;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-nav-link.is-active {
  background: rgba(255, 255, 255, 0.25);
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: white;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 16px;
  color: white;
  font-weight: 700;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h2 {
  font-size: clamp(34px, 5vw, 60px);
}

.hero p {
  margin: 0 0 28px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.7;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.secondary-button,
.category-more,
.section-pager a,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: white;
  padding: 14px 28px;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.32);
}

.secondary-button {
  color: white;
  padding: 13px 24px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.secondary-button:hover,
.category-more:hover,
.section-pager a:hover,
.filter-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--soft-shadow);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: white;
}

.section {
  padding: 72px 0;
}

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

.section-blue {
  color: white;
  background: linear-gradient(90deg, var(--blue-600), var(--cyan-600));
}

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

.section-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.section-blue .section-title,
.section-blue .section-desc {
  color: white;
}

.section-desc {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 26px;
  overflow: hidden;
  background: white;
  box-shadow: var(--soft-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.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;
  left: 14px;
  top: 14px;
  max-width: calc(100% - 28px);
  padding: 7px 12px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(10px);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.movie-meta-line,
.movie-views {
  color: var(--muted);
  font-size: 13px;
}

.movie-card strong {
  color: #111827;
  font-size: 20px;
  line-height: 1.35;
  transition: color 0.25s ease;
}

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

.movie-desc {
  color: #475569;
  line-height: 1.65;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.movie-tags span,
.detail-tags span,
.search-chip {
  display: inline-flex;
  padding: 6px 10px;
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: #dbeafe;
}

.movie-card-horizontal .movie-card-link {
  flex-direction: row;
}

.movie-card-horizontal .movie-cover {
  width: 38%;
  min-height: 180px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.movie-card-large .movie-cover {
  aspect-ratio: 16 / 8;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 52px 120px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: white;
  font-size: 22px;
  font-weight: 900;
  border-radius: 17px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-thumb {
  display: block;
  overflow: hidden;
  width: 120px;
  height: 78px;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.rank-info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-info strong,
.rank-info small,
.rank-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info small,
.rank-info span {
  color: var(--muted);
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  width: 310px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.page-hero {
  position: relative;
  padding: 92px 0 78px;
  color: white;
  overflow: hidden;
  background: linear-gradient(120deg, var(--blue-600), var(--cyan-600), var(--teal-500));
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% auto auto 52%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(2px);
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 790px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.8;
}

.category-card {
  display: grid;
  gap: 18px;
  border-radius: 28px;
  padding: 24px;
  background: white;
  box-shadow: var(--soft-shadow);
}

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

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.category-preview a {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

.category-preview span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 10px;
  color: white;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-more,
.filter-button {
  color: white;
  padding: 12px 20px;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
}

.local-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.local-filter input,
.search-box input {
  width: 100%;
  border: 1px solid #bfdbfe;
  outline: 0;
  color: #0f172a;
  font-size: 16px;
  border-radius: 999px;
  padding: 14px 18px;
  background: white;
}

.section-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
}

.section-pager a {
  color: var(--blue-600);
  padding: 12px 18px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.detail-hero {
  color: white;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.36), transparent 36%), linear-gradient(135deg, #0f172a, #1e40af 54%, #0891b2);
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumbs a:hover {
  color: white;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.58));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 5px;
  font-size: 34px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.35);
}

.detail-card,
.related-panel,
.search-panel {
  border-radius: 28px;
  padding: 26px;
  background: white;
  box-shadow: var(--soft-shadow);
}

.detail-card h2,
.related-panel h2,
.search-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.85;
}

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

.detail-meta span {
  padding: 8px 12px;
  color: #0f172a;
  font-weight: 700;
  border-radius: 999px;
  background: #e0f2fe;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-list {
  display: grid;
  gap: 16px;
}

.related-list a {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  align-items: center;
}

.related-list img {
  width: 118px;
  height: 78px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.related-list strong,
.related-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-list small {
  margin-top: 6px;
  color: var(--muted);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-top: 26px;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.search-results {
  margin-top: 36px;
}

.empty-message {
  display: none;
  padding: 26px;
  color: var(--muted);
  text-align: center;
  border-radius: 24px;
  background: white;
}

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

.site-footer {
  position: relative;
  margin-top: 40px;
  padding: 76px 0 28px;
  color: white;
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-wave {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-brand-icon {
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
}

.footer-brand strong {
  font-size: 20px;
}

.footer-copy,
.site-footer li,
.footer-bottom {
  color: #94a3b8;
}

.footer-copy {
  max-width: 350px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 18px;
  color: #22d3ee;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: #22d3ee;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.26);
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .grid-4,
  .grid-3,
  .rank-grid,
  .footer-grid,
  .detail-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-title {
    font-size: 19px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding-top: 30px;
  }

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .section-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .rank-grid,
  .footer-grid,
  .detail-wrap {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .movie-card-link {
    flex-direction: column;
  }

  .movie-card-horizontal .movie-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .rank-item a {
    grid-template-columns: 42px 88px 1fr;
    gap: 10px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .rank-thumb {
    width: 88px;
    height: 64px;
  }

  .local-filter,
  .search-box {
    grid-template-columns: 1fr;
  }

  .related-list a {
    grid-template-columns: 96px 1fr;
  }

  .related-list img {
    width: 96px;
    height: 66px;
  }
}
