:root {
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --gray-950: #111827;
  --gray-900: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --orange: #f97316;
  --green: #22c55e;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 24px 55px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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: 100;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-600);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: 999px;
  font-size: 15px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.3);
}

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

.nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link.is-active,
.mobile-link:hover {
  color: var(--blue-600);
}

.top-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-900);
  outline: none;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.top-search input {
  width: 260px;
  padding: 10px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24);
}

.top-search button,
.mobile-search button,
.search-page-form button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.top-search button,
.mobile-search button {
  padding: 9px 16px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
}

.top-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.34);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: var(--blue-50);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--blue-700);
  border-radius: 2px;
}

.mobile-panel {
  padding: 16px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 16px;
}

.mobile-link {
  display: block;
  padding: 12px 4px;
  color: var(--gray-700);
  font-weight: 700;
}

.hero {
  position: relative;
  background: var(--gray-950);
}

.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero-stage {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--blue-900), var(--blue-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.94),
    rgba(30, 64, 175, 0.68),
    rgba(30, 64, 175, 0.16)
  );
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
  color: var(--white);
}

.hero-kicker,
.detail-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue-500);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-kicker,
.detail-kicker {
  padding: 6px 12px;
  margin-bottom: 16px;
}

.section-kicker {
  padding: 4px 10px;
  margin-bottom: 8px;
  color: var(--blue-700);
  background: var(--blue-100);
}

.hero-content h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

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

.section-wrap {
  padding: 58px 0;
}

.section-wrap.no-top {
  padding-top: 0;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--gray-950);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head a {
  color: var(--blue-600);
  font-weight: 800;
}

.compact-head {
  margin-bottom: 18px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-200);
}

.card-cover img,
.compact-cover img,
.rank-cover img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img,
.compact-card:hover .compact-cover img,
.ranking-item:hover .rank-cover img {
  transform: scale(1.08);
}

.card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue-600);
  background: rgba(0, 0, 0, 0);
  font-size: 34px;
  opacity: 0;
  transition:
    background 0.25s ease,
    opacity 0.25s ease;
}

.movie-card:hover .card-play {
  background: rgba(15, 23, 42, 0.4);
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.card-body h3,
.compact-card h3,
.ranking-item h3 {
  margin: 0 0 8px;
  color: var(--gray-950);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.card-body h3 a:hover,
.compact-card h3 a:hover,
.ranking-item h3 a:hover {
  color: var(--blue-600);
}

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-tags,
.tag-row,
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span,
.tag-row span,
.detail-chips span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-50);
  font-size: 12px;
  font-weight: 750;
}

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

.category-card,
.category-showcase {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.category-card {
  justify-content: center;
  padding: 22px;
}

.category-showcase {
  justify-content: space-between;
  padding: 24px;
}

.category-card:hover,
.category-showcase:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-strong);
}

.category-card span,
.category-showcase h2 {
  font-size: 22px;
  font-weight: 900;
}

.category-card small,
.category-showcase p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
}

.category-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--white);
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 34px;
  align-items: start;
}

.compact-list {
  display: grid;
  gap: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.compact-cover,
.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: var(--gray-200);
}

.compact-cover {
  aspect-ratio: 16 / 9;
}

.compact-card p,
.ranking-item p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card span,
.ranking-item span:not(.rank-num) {
  color: var(--gray-500);
  font-size: 13px;
}

.ranking-panel {
  position: sticky;
  top: 90px;
  padding: 22px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.ranking-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 42px 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.ranking-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--white);
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 10;
}

.ranking-page-list .ranking-item {
  grid-template-columns: 58px 200px minmax(0, 1fr);
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.wide-cta,
.page-hero,
.detail-hero {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  box-shadow: var(--shadow);
}

.wide-cta {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 58px;
  padding: 48px 28px;
  color: var(--white);
  text-align: center;
}

.wide-cta h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.wide-cta p {
  width: min(720px, 100%);
  margin: 0 auto 24px;
  color: var(--blue-100);
}

.page-main {
  padding: 34px 0 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.page-hero {
  margin-bottom: 34px;
  padding: 42px;
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(32px, 4vw, 52px);
}

.page-hero p {
  width: min(760px, 100%);
  margin: 12px 0 0;
  color: var(--blue-100);
  font-size: 18px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-bar input {
  flex: 1;
  padding: 13px 18px;
}

.filter-bar select {
  width: 180px;
  padding: 13px 18px;
}

.search-page-form {
  margin-bottom: 22px;
}

.search-page-form input {
  flex: 1;
  padding: 15px 18px;
}

.search-page-form button {
  padding: 14px 26px;
}

.search-heading {
  min-height: 28px;
  margin-bottom: 20px;
  color: var(--gray-600);
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.6fr);
  gap: 28px;
  padding: 28px;
  color: var(--white);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000000;
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.player-shade {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.player-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.92);
  font-size: 36px;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  color: var(--white);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.detail-one-line {
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.detail-chips span,
.tag-row span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.tag-row {
  margin-top: 14px;
}

.detail-content {
  margin-top: 34px;
}

.detail-article {
  padding: 32px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-article h2 {
  margin: 0 0 12px;
  color: var(--gray-950);
  font-size: 28px;
  font-weight: 900;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.site-footer {
  margin-top: 58px;
  color: var(--gray-300);
  background: var(--gray-950);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 40px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: var(--gray-300);
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
}

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

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

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue-600);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.back-top.is-visible {
  display: block;
}

.is-hidden-by-filter {
  display: none;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-bar {
    width: min(100% - 24px, 1280px);
    gap: 12px;
  }

  .nav-links,
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .logo-text {
    font-size: 19px;
  }

  .hero-stage {
    height: 560px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-content h2 {
    font-size: 36px;
  }

  .hero-arrow {
    top: auto;
    bottom: 58px;
    transform: none;
  }

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

  .compact-card,
  .ranking-item,
  .ranking-page-list .ranking-item {
    grid-template-columns: 1fr;
  }

  .rank-num {
    position: absolute;
    margin: 10px;
  }

  .ranking-item {
    position: relative;
  }

  .filter-bar,
  .search-page-form {
    flex-direction: column;
  }

  .filter-bar select {
    width: 100%;
  }

  .page-hero,
  .detail-hero,
  .detail-article {
    padding: 24px;
    border-radius: 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

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

  .card-desc {
    min-height: auto;
  }

  .section-wrap,
  .page-main,
  .wide-cta {
    width: min(100% - 24px, 1280px);
  }
}
