: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;
  --text: #172234;
  --muted: #607089;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(42, 59, 78, 0.14);
  --soft-shadow: 0 12px 30px rgba(42, 59, 78, 0.1);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--archive-50) 42%, #ffffff 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(234, 239, 245, 0.9);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 10px 30px rgba(42, 59, 78, 0.12);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--archive-900);
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--archive-600);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(70, 103, 138, 0.24);
}

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

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

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

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

.nav-link {
  border: 0;
  background: transparent;
  color: var(--archive-700);
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 210px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--archive-100);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(4px);
}

.dropdown-panel a,
.mobile-panel a,
.mobile-categories a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--archive-700);
}

.dropdown-panel a:hover,
.mobile-panel a:hover,
.mobile-categories a:hover {
  background: var(--archive-50);
  color: var(--archive-900);
}

.header-search {
  width: 260px;
  display: flex;
  background: var(--archive-50);
  border: 1px solid var(--archive-100);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-hero input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--archive-900);
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px 10px 16px;
}

.header-search button,
.mobile-search button,
.search-hero button {
  border: 0;
  color: var(--white);
  background: var(--archive-600);
  cursor: pointer;
  padding: 0 16px;
  transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover {
  background: var(--archive-700);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: var(--archive-50);
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--archive-700);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  background: var(--white);
  border-top: 1px solid var(--archive-100);
}

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

.mobile-search {
  display: flex;
  overflow: hidden;
  margin: 14px 0;
  background: var(--archive-50);
  border-radius: 14px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}

.mobile-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
}

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

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 23, 37, 0.88) 0%, rgba(14, 23, 37, 0.56) 48%, rgba(14, 23, 37, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  color: var(--white);
  padding: 96px 0 80px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: var(--white);
  background: rgba(70, 103, 138, 0.92);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

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

.hero p {
  margin: 22px 0 32px;
  color: #e5edf7;
  font-size: 20px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--archive-900);
  background: var(--white);
  box-shadow: 0 18px 38px rgba(255, 255, 255, 0.18);
}

.btn-dark {
  color: var(--white);
  background: var(--archive-700);
}

.btn-soft {
  color: var(--archive-800);
  background: var(--archive-100);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.page-hero,
.search-hero {
  padding: 66px 0 46px;
  background: radial-gradient(circle at top left, rgba(168, 189, 212, 0.42), transparent 38%), linear-gradient(135deg, var(--archive-900), var(--archive-700));
  color: var(--white);
}

.page-hero h1,
.search-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
}

.page-hero p,
.search-hero p {
  max-width: 760px;
  margin: 0;
  color: #dce7f4;
  font-size: 18px;
  line-height: 1.8;
}

.search-hero form {
  display: flex;
  max-width: 720px;
  margin-top: 28px;
  overflow: hidden;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.search-hero input {
  flex: 1;
  min-width: 0;
  padding: 18px 20px;
}

.search-hero button {
  padding: 0 26px;
}

.section {
  padding: 58px 0;
}

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

.section-head h2,
.section-head h1 {
  margin: 0;
  color: var(--archive-900);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.12;
}

.section-head p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.player-card,
.search-empty {
  background: var(--white);
  border: 1px solid var(--archive-100);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(42, 59, 78, 0.06);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--archive-100);
}

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

.movie-card:hover .poster-wrap img,
.rank-card:hover .rank-thumb img {
  transform: scale(1.07);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.54));
}

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.52);
  border-radius: 8px;
  font-size: 12px;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--archive-800);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-category {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  color: var(--archive-700);
  background: var(--archive-100);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 10px;
  color: var(--archive-900);
  font-size: 19px;
  line-height: 1.3;
}

.card-body h2 a:hover,
.card-body h3 a:hover,
.rank-title:hover {
  color: var(--archive-600);
}

.card-body p,
.rank-card p,
.category-card p,
.detail-panel p {
  color: var(--muted);
  line-height: 1.72;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--archive-500);
  font-size: 13px;
}

.card-meta span {
  padding: 4px 8px;
  background: var(--archive-50);
  border-radius: 8px;
}

.feature-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 112px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.rank-num {
  color: var(--archive-300);
  font-size: 28px;
  font-weight: 900;
}

.rank-thumb {
  width: 112px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--archive-100);
}

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

.rank-title {
  display: inline-block;
  color: var(--archive-900);
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}

.rank-card p {
  margin: 0 0 8px;
  font-size: 14px;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  color: var(--archive-900);
  font-size: 22px;
}

.category-card p {
  margin: 0 0 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--archive-100);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(42, 59, 78, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: var(--archive-50);
  border-radius: 12px;
}

.detail-hero {
  padding: 42px 0 30px;
  background: linear-gradient(135deg, var(--archive-900), var(--archive-700));
  color: var(--white);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #dce7f4;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--white);
}

.detail-head {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  aspect-ratio: 16 / 10;
  background: var(--archive-800);
}

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

.detail-title h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05;
}

.detail-title p {
  max-width: 780px;
  margin: 0 0 22px;
  color: #e5edf7;
  line-height: 1.8;
  font-size: 18px;
}

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

.chips span {
  padding: 8px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 30px;
  padding: 44px 0 64px;
}

.player-card {
  overflow: hidden;
  margin-bottom: 26px;
}

.player-stage {
  position: relative;
  background: #070c13;
  aspect-ratio: 16 / 9;
}

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.46));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: var(--archive-800);
  background: rgba(255, 255, 255, 0.92);
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.24);
}

.detail-panel {
  padding: 26px;
  margin-bottom: 22px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  color: var(--archive-900);
  font-size: 26px;
}

.detail-panel p {
  margin: 0;
  font-size: 16px;
}

.side-title {
  margin: 0 0 16px;
  color: var(--archive-900);
  font-size: 22px;
}

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

.archive-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.archive-nav a {
  padding: 8px 12px;
  color: var(--archive-700);
  background: var(--archive-100);
  border-radius: 999px;
  font-weight: 700;
}

.search-empty {
  padding: 26px;
  color: var(--muted);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

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

.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: var(--white);
}

.footer-bottom {
  padding: 18px;
  color: var(--archive-400);
  text-align: center;
  border-top: 1px solid var(--archive-800);
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--archive-600);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hide-card {
  display: none !important;
}

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

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

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

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

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

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 540px;
  }

  .hero-copy {
    padding: 78px 0 72px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head {
    display: block;
  }

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

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .detail-head {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 420px;
  }

  .rank-card {
    grid-template-columns: auto 96px 1fr;
    gap: 12px;
  }

  .rank-thumb {
    width: 96px;
  }

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

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

  .mobile-categories {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 1fr;
  }

  .rank-num {
    font-size: 20px;
  }

  .rank-thumb {
    width: 100%;
  }

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