* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
  background: linear-gradient(180deg, #eff6ff 0%, #ecfeff 46%, #ffffff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #2563eb 0%, #0891b2 52%, #0d9488 100%);
  box-shadow: 0 18px 42px rgba(14, 116, 144, 0.22);
}

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

.header-wave svg {
  width: 100%;
  height: 100%;
}

.header-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.25s ease;
}

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

.brand-text strong,
.footer-logo {
  display: block;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  margin-top: 6px;
  color: #dbeafe;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  position: relative;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

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

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

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 0;
  outline: 0;
}

.header-search input {
  height: 42px;
  border-radius: 999px;
  padding: 0 48px 0 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #dbeafe;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  border: 0;
  color: #ffffff;
  font-size: 20px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  position: relative;
  z-index: 3;
  padding: 0 16px 26px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin: 8px auto 18px;
  width: min(1180px, 100%);
}

.mobile-search input {
  height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.mobile-search button,
.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
}

.mobile-search button {
  padding: 0 18px;
  border-radius: 999px;
  color: #0f766e;
  font-weight: 800;
  background: #ffffff;
}

.mobile-nav,
.mobile-categories {
  display: grid;
  gap: 12px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.mobile-categories {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.mobile-category,
.mobile-nav .nav-link {
  padding: 10px 12px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s 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) 0%, rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.06) 100%);
}

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

.hero-copy {
  max-width: 690px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 620px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-actions,
.section-heading,
.filter-row,
.detail-actions,
.breadcrumbs,
.rank-meta,
.detail-meta,
.tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
}

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

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

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

.section {
  position: relative;
  padding: 64px 0;
}

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

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.heading-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.heading-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.heading-title h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-card p,
.rank-info p,
.movie-desc,
.detail-summary,
.detail-review p,
.movie-meta {
  color: #64748b;
  line-height: 1.72;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster-link img,
.category-card:hover img,
.rank-cover:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.68) 100%);
}

.movie-year,
.movie-score {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.movie-year {
  left: 12px;
  background: rgba(37, 99, 235, 0.82);
}

.movie-score {
  right: 12px;
  background: rgba(249, 115, 22, 0.88);
}

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

.movie-title,
.rank-title {
  display: block;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-title:hover,
.rank-title:hover {
  color: #2563eb;
}

.movie-meta {
  margin: 8px 0;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  margin: 0 0 14px;
  min-height: 48px;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list span,
.detail-meta span,
.rank-meta span,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #dbeafe;
  color: #2563eb;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 68px 126px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

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

.rank-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

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

.rank-info p {
  display: -webkit-box;
  margin: 8px 0 10px;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 28px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb 52%, #0f766e);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 148px;
  height: 148px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 26px;
}

.category-card p {
  position: relative;
  margin: 0 0 22px;
  color: #eff6ff;
}

.category-card span {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
}

.page-hero {
  padding: 58px 0 34px;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  font-size: 18px;
}

.filter-panel {
  margin: 28px 0 34px;
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.filter-row {
  gap: 14px;
}

.filter-input,
.filter-select {
  height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  color: #0f172a;
  background: #f1f5f9;
}

.filter-input {
  flex: 1 1 320px;
}

.filter-select {
  flex: 0 0 180px;
}

.empty-state {
  display: none;
  padding: 42px;
  border-radius: 24px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
}

.detail-hero {
  padding: 42px 0 64px;
}

.breadcrumbs {
  margin-bottom: 22px;
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.74));
  cursor: pointer;
  z-index: 2;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 42px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.36);
}

.detail-card,
.detail-review,
.related-panel {
  border-radius: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-summary {
  font-size: 17px;
}

.detail-meta {
  margin: 18px 0;
}

.detail-actions {
  margin-top: 18px;
}

.detail-review {
  margin-top: 24px;
}

.detail-review h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.related-panel {
  margin-top: 24px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.related-item img {
  width: 92px;
  height: 118px;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.related-item span {
  color: #64748b;
  font-size: 13px;
}

.site-footer {
  margin-top: 46px;
  padding: 48px 0;
  color: #dbeafe;
  background: #0f172a;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1.2fr;
  gap: 28px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-inner p {
  margin: 0;
  line-height: 1.7;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a,
.footer-cats a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

  .header-inner {
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

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

  .ranking-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

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

  .hero {
    height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(15, 23, 42, 0.72));
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 38px;
  }

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

  .ranking-item {
    grid-template-columns: 50px 86px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .rank-num {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 20px;
  }

  .rank-cover {
    aspect-ratio: 3 / 4;
  }

  .section {
    padding: 42px 0;
  }

  .detail-card,
  .detail-review,
  .related-panel {
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 20px;
  }

  .brand-text em {
    display: none;
  }

  .mobile-nav,
  .mobile-categories,
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 520px;
  }

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

  .hero-actions,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-select {
    flex: 1 1 100%;
  }
}
