:root {
  --archive-50: #f5f7fa;
  --archive-100: #eaeff5;
  --archive-200: #d0dae8;
  --archive-300: #a8bdd4;
  --archive-400: #7a9cbc;
  --archive-500: #5a7fa5;
  --archive-600: #46678a;
  --archive-700: #395370;
  --archive-800: #2f445d;
  --archive-900: #2a3b4e;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #637083;
  --shadow: 0 22px 55px rgba(42, 59, 78, 0.16);
  --soft-shadow: 0 12px 30px rgba(42, 59, 78, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--archive-50) 0%, #ffffff 48%, var(--archive-50) 100%);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(208, 218, 232, 0.75);
  box-shadow: 0 8px 26px rgba(42, 59, 78, 0.05);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--archive-500), var(--archive-900));
  box-shadow: 0 10px 20px rgba(57, 83, 112, 0.25);
  font-weight: 800;
}

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

.brand-text strong {
  color: var(--archive-900);
  font-size: 20px;
}

.brand-text small {
  color: var(--archive-600);
  font-size: 12px;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--archive-700);
  font-weight: 600;
}

.main-nav a,
.main-nav button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 8px 0;
}

.main-nav a:hover,
.main-nav a.active,
.main-nav button:hover {
  color: var(--archive-900);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 190px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--archive-100);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.2s ease;
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: var(--archive-50);
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--archive-100);
  border-radius: 12px;
  color: var(--archive-800);
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--archive-100);
  color: var(--archive-800);
  font-weight: 600;
}

.hero {
  position: relative;
  min-height: 680px;
  background: var(--archive-900);
  overflow: hidden;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: linear-gradient(90deg, rgba(16, 25, 38, 0.94) 0%, rgba(42, 59, 78, 0.72) 48%, rgba(42, 59, 78, 0.42) 100%), var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-backdrop {
  position: absolute;
  inset: auto -8% -28% -8%;
  height: 42%;
  background: radial-gradient(circle, rgba(168, 189, 212, 0.35), transparent 60%);
  filter: blur(16px);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 360px;
  align-items: center;
  gap: 56px;
  padding-top: 48px;
}

.hero-copy {
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--archive-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.detail-info .eyebrow {
  color: var(--archive-300);
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--archive-800);
  background: var(--archive-100);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--archive-500), var(--archive-800));
  box-shadow: 0 14px 30px rgba(42, 59, 78, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(42, 59, 78, 0.32);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 18px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(1deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: 0.2s ease;
}

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

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

.section {
  padding: 64px 0;
}

.page-main {
  padding-top: 36px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head h2,
.page-hero h1,
.content-card h2 {
  margin: 8px 0 10px;
  color: var(--archive-900);
  line-height: 1.15;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.row-head {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  color: var(--archive-700);
}

.text-link:hover {
  color: var(--archive-900);
  transform: translateX(2px);
}

.intro-section {
  margin-top: -44px;
  position: relative;
  z-index: 4;
  padding-top: 0;
}

.search-panel {
  padding: 18px;
  border: 1px solid rgba(208, 218, 232, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.movie-search {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  color: var(--archive-900);
  border: 1px solid var(--archive-100);
  border-radius: 16px;
  outline: none;
  background: var(--archive-50);
}

.movie-search:focus {
  border-color: var(--archive-400);
  box-shadow: 0 0 0 4px rgba(90, 127, 165, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--archive-700);
  background: var(--archive-100);
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #ffffff;
  background: var(--archive-700);
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(208, 218, 232, 0.76);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--archive-200);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(42, 59, 78, 0.88);
  font-weight: 900;
}

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

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

.movie-card h3 {
  margin: 8px 0 8px;
  color: var(--archive-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
}

.movie-card-compact .poster-link img {
  height: 100%;
  min-height: 142px;
}

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

.movie-card-compact h3 {
  font-size: 16px;
}

.movie-card-compact p {
  min-height: 0;
}

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

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, rgba(234, 239, 245, 0.9), rgba(255, 255, 255, 0.9));
}

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

.category-tile {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(208, 218, 232, 0.86);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

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

.category-tile strong {
  display: block;
  color: var(--archive-900);
  font-size: 20px;
}

.category-tile span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.category-tile a {
  color: var(--archive-700);
}

.page-hero {
  position: relative;
  margin-top: 26px;
  padding: 58px;
  overflow: hidden;
  border-radius: 32px;
  color: #ffffff;
  background: radial-gradient(circle at right top, rgba(168, 189, 212, 0.45), transparent 34%), linear-gradient(135deg, var(--archive-900), var(--archive-700));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 68px);
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
}

.small-actions {
  margin-top: 20px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(208, 218, 232, 0.82);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-self: stretch;
}

.category-cover img {
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.category-card-body h2 {
  margin: 6px 0 8px;
  color: var(--archive-900);
}

.category-card-body p,
.category-card-body li {
  color: var(--muted);
  line-height: 1.8;
}

.category-card-body ul {
  margin: 12px 0 14px;
  padding: 0;
  list-style: none;
}

.category-card-body li a:hover {
  color: var(--archive-700);
}

.category-movie-grid {
  margin-top: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--archive-700);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 36px;
  border-radius: 32px;
  color: #ffffff;
  background: radial-gradient(circle at left bottom, rgba(168, 189, 212, 0.36), transparent 40%), linear-gradient(135deg, var(--archive-900), var(--archive-700));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.26);
}

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

.detail-info h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
}

.lead-text {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.85);
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.player-section {
  padding-bottom: 24px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.48));
  transition: 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: var(--archive-900);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  font-size: 34px;
}

.content-card {
  padding: 34px;
  border: 1px solid rgba(208, 218, 232, 0.82);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  font-size: 28px;
}

.content-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 2;
}

.content-card p + h2 {
  margin-top: 28px;
}

.site-footer {
  margin-top: 58px;
  color: var(--archive-100);
  background: var(--archive-900);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: var(--archive-300);
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-content {
    grid-template-columns: 1fr 280px;
  }

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

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
    padding-top: 24px;
  }

  .hero-poster {
    width: min(260px, 74vw);
    margin: 0 auto;
  }

  .row-head {
    align-items: start;
    flex-direction: column;
  }

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

  .category-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .category-cover img {
    min-height: 170px;
  }

  .detail-poster {
    width: min(280px, 82vw);
  }

  .page-hero,
  .detail-hero,
  .content-card {
    padding: 26px;
    border-radius: 24px;
  }

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

@media (max-width: 540px) {
  .nav-shell,
  .mobile-nav,
  .section,
  .page-main {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

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

  .movie-grid,
  .rank-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter-chip {
    white-space: nowrap;
  }
}
