: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;
  --ink: #172231;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(42, 59, 78, 0.14);
  --soft-shadow: 0 10px 26px rgba(42, 59, 78, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--archive-50);
  color: var(--ink);
  font-family:
    Inter,
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--archive-100);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--archive-700), var(--archive-500));
  box-shadow: var(--soft-shadow);
}

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

.brand-text strong {
  color: var(--archive-900);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--archive-500);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.mobile-nav a {
  color: var(--archive-700);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  transition:
    color 0.25s ease,
    background 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover {
  color: var(--archive-900);
  background: var(--archive-100);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--archive-100);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--archive-800);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 16px;
  border-top: 1px solid var(--archive-100);
}

main {
  min-height: 70vh;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 12, 19, 0.86),
    rgba(22, 31, 43, 0.58),
    rgba(22, 31, 43, 0.12)
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker,
.eyebrow,
.section-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff;
  background: var(--archive-600);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e8edf5;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.movie-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span,
.detail-meta span {
  color: var(--archive-700);
  background: var(--archive-100);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.primary-btn {
  background: #fff;
  color: var(--archive-900);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.primary-btn.dark {
  background: var(--archive-800);
  color: #fff;
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition: background 0.25s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition:
    width 0.25s ease,
    background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fff;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.intro-strip {
  margin-top: -44px;
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.intro-strip h2 {
  margin: 14px 0 8px;
  color: var(--archive-900);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.16;
}

.intro-strip p {
  margin: 0;
  color: var(--archive-600);
}

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

.section-heading h2 {
  margin: 12px 0 0;
  color: var(--archive-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

.section-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--archive-600);
}

.section-heading span,
.eyebrow {
  color: var(--archive-700);
  background: var(--archive-100);
}

.section-link,
.rank-sidebar .section-heading a {
  color: var(--archive-700);
  background: var(--archive-100);
}

.soft-panel {
  max-width: 1232px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, var(--archive-100));
  box-shadow: var(--soft-shadow);
}

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

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

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

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

.movie-card,
.movie-card-wide,
.category-tile,
.rank-sidebar,
.watch-card,
.detail-article,
.poster-card,
.info-card,
.category-card-large {
  background: #fff;
  border: 1px solid var(--archive-100);
  border-radius: 20px;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.movie-card:hover,
.movie-card-wide:hover,
.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-5px);
  border-color: var(--archive-200);
  box-shadow: var(--soft-shadow);
}

.movie-card-link,
.movie-wide-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--archive-200);
}

.movie-cover img,
.movie-wide-cover img,
.category-card-large img,
.poster-card img,
.rank-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .movie-cover img,
.movie-card-wide:hover .movie-wide-cover img,
.category-card-large:hover img {
  transform: scale(1.08);
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-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.88);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

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

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

.movie-card h3,
.movie-wide-content h3 {
  margin: 10px 0 8px;
  color: var(--archive-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p,
.movie-wide-content p {
  margin: 0 0 14px;
  color: var(--archive-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-wide-link {
  display: grid;
  grid-template-columns: 38% 1fr;
  min-height: 180px;
}

.movie-wide-cover {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--archive-200);
}

.movie-wide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--archive-500);
  font-size: 13px;
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.category-grid,
.category-large-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile {
  display: block;
  padding: 22px;
}

.category-tile span {
  color: var(--archive-900);
  font-size: 20px;
  font-weight: 800;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--archive-600);
}

.rank-sidebar {
  padding: 22px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading.compact h2 {
  font-size: 26px;
}

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

.rank-list.tall {
  max-height: 920px;
  overflow: auto;
  padding-right: 6px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 42px 74px 1fr;
  align-items: center;
  gap: 12px;
}

.rank-list strong {
  color: var(--archive-400);
  font-size: 22px;
  font-weight: 900;
}

.rank-list img {
  width: 74px;
  height: 50px;
  border-radius: 10px;
  background: var(--archive-200);
}

.rank-list b {
  display: block;
  color: var(--archive-900);
  line-height: 1.35;
}

.rank-list small {
  display: block;
  color: var(--archive-500);
  margin-top: 2px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--archive-900);
}

.compact-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(
      circle at 82% 28%,
      rgba(122, 156, 188, 0.36),
      transparent 30%
    ),
    linear-gradient(135deg, var(--archive-900), var(--archive-700));
}

.compact-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
  color: #fff;
}

.compact-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
}

.compact-hero p {
  max-width: 720px;
  margin: 0;
  color: #e8edf5;
  font-size: 18px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--archive-100);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--archive-700);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--archive-200);
  border-radius: 14px;
  outline: none;
  padding: 0 16px;
  color: var(--archive-900);
  background: var(--archive-50);
}

.search-box input:focus {
  border-color: var(--archive-500);
  box-shadow: 0 0 0 4px rgba(70, 103, 138, 0.12);
}

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

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

.filter-chips button.active,
.filter-chips button:hover {
  color: #fff;
  background: var(--archive-700);
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 28px;
  color: var(--archive-600);
  background: #fff;
  border-radius: 20px;
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.category-card-large a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 220px;
}

.category-card-large img {
  min-height: 220px;
  background: var(--archive-200);
}

.category-card-large div {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-large span {
  color: var(--archive-500);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

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

.category-card-large p {
  margin: 0 0 18px;
  color: var(--archive-600);
}

.category-card-large strong {
  color: var(--archive-700);
}

.detail-hero {
  min-height: 520px;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 13, 20, 0.9),
    rgba(42, 59, 78, 0.65),
    rgba(42, 59, 78, 0.24)
  );
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 520px;
  margin: 0 auto;
  padding: 90px 24px 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  color: #fff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--archive-200);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fff;
}

.detail-hero h1 {
  max-width: 840px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
}

.detail-hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e8edf5;
  font-size: 19px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 28px;
}

.watch-card,
.detail-article,
.poster-card,
.info-card {
  padding: 24px;
}

.watch-card h2,
.detail-article h2,
.poster-card h2,
.info-card h2 {
  margin: 0 0 18px;
  color: var(--archive-900);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--archive-900);
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--archive-800);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease;
}

.player-cover:hover span {
  transform: scale(1.08);
}

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

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: none;
  padding: 10px 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border-radius: 12px;
  font-size: 14px;
}

.player-message.show {
  display: block;
}

.detail-article p {
  margin: 0 0 22px;
  color: var(--archive-700);
  font-size: 17px;
  line-height: 1.85;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  background: var(--archive-200);
  object-fit: cover;
}

.poster-card h2 {
  margin-top: 18px;
  font-size: 24px;
}

.detail-tags span {
  margin-bottom: 4px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin: 0;
}

.info-card dt {
  color: var(--archive-500);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--archive-800);
}

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.sticky-rank {
  position: sticky;
  top: 96px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-brand strong,
.footer-links h2 {
  color: #fff;
  font-size: 20px;
}

.footer-brand p {
  max-width: 420px;
  margin: 12px 0 0;
  color: var(--archive-300);
}

.footer-links div {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.footer-links a {
  color: var(--archive-300);
}

.footer-links a:hover {
  color: #fff;
}

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

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

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

  .detail-side,
  .sticky-rank {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: grid;
    gap: 8px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-strip,
  .section-heading,
  .filter-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-card-large a,
  .movie-wide-link {
    grid-template-columns: 1fr;
  }

  .category-card-large img,
  .movie-wide-cover {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 560px) {
  .site-header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .hero-content,
  .compact-hero > div,
  .detail-hero-content,
  .content-section {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1 1 100%;
  }

  .movie-grid-5,
  .movie-grid-4,
  .movie-grid-3,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .rank-list a {
    grid-template-columns: 36px 68px 1fr;
  }

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