:root {
  --primary-950: #082f49;
  --primary-900: #0c4a6e;
  --primary-800: #075985;
  --primary-700: #0369a1;
  --primary-600: #0284c7;
  --primary-500: #0ea5e9;
  --primary-100: #e0f2fe;
  --primary-50: #f0f9ff;
  --accent-600: #d97706;
  --accent-500: #f59e0b;
  --accent-400: #fbbf24;
  --neutral-950: #1c1917;
  --neutral-900: #292524;
  --neutral-800: #44403c;
  --neutral-700: #57534e;
  --neutral-600: #78716c;
  --neutral-500: #a8a29e;
  --neutral-300: #d6d3d1;
  --neutral-200: #e7e5e4;
  --neutral-100: #f5f5f4;
  --neutral-50: #fafaf9;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.12);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--neutral-50);
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  box-shadow: var(--shadow-lg);
}

.nav-wrap {
  width: min(100%, 1280px);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand {
  font-size: 22px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--primary-950);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  box-shadow: 0 8px 18px rgb(245 158 11 / 0.26);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 650;
}

.nav-links a {
  color: rgb(255 255 255 / 0.90);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-400);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.10);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
}

.main {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: var(--white);
  background: var(--primary-950);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 24%, rgb(245 158 11 / 0.22), transparent 28%), linear-gradient(90deg, rgb(8 47 73 / 0.96) 0%, rgb(8 47 73 / 0.78) 42%, rgb(8 47 73 / 0.28) 100%), linear-gradient(0deg, rgb(0 0 0 / 0.48), rgb(0 0 0 / 0.12));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  min-height: 520px;
  margin: 0 auto;
  padding: 72px 24px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.54fr);
  align-items: center;
  gap: 48px;
}

.hero-content {
  max-width: 720px;
}

.hero-kicker,
.section-kicker,
.page-kicker {
  margin: 0 0 10px;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  font-size: 18px;
  line-height: 1.8;
  margin: 18px 0 0;
  color: rgb(255 255 255 / 0.90);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(255 255 255 / 0.18);
  font-size: 13px;
  font-weight: 650;
  backdrop-filter: blur(10px);
}

.detail-tags span,
.card-tags span {
  color: var(--primary-800);
  background: var(--primary-50);
  border-color: var(--primary-100);
}

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  box-shadow: 0 12px 22px rgb(245 158 11 / 0.22);
}

.btn-secondary {
  color: var(--white);
  background: rgb(255 255 255 / 0.12);
  border-color: rgb(255 255 255 / 0.22);
  backdrop-filter: blur(10px);
}

.btn-ghost {
  color: var(--primary-700);
  background: var(--primary-50);
  border-color: var(--primary-100);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.36);
  border: 1px solid rgb(255 255 255 / 0.22);
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgb(255 255 255 / 0.16);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover {
  background: var(--accent-500);
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.46);
}

.hero-dot.is-active {
  width: 26px;
  background: var(--accent-400);
}

.section {
  padding: 58px 0 0;
}

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

.page-heading {
  padding: 44px 0 0;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  color: var(--neutral-950);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p {
  margin: 8px 0 0;
  color: var(--neutral-600);
  line-height: 1.7;
}

.section-link {
  flex-shrink: 0;
  color: var(--primary-700);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  color: var(--accent-600);
}

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

.category-card {
  display: block;
  min-height: 150px;
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -55px;
  bottom: -55px;
  border-radius: 50%;
  background: rgb(251 191 36 / 0.22);
}

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

.category-card strong {
  display: block;
  position: relative;
  z-index: 1;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-card span {
  position: relative;
  z-index: 1;
  color: rgb(255 255 255 / 0.82);
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 0.7fr));
  gap: 14px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 750;
}

.filter-panel input,
.filter-panel select {
  min-height: 42px;
  border: 1px solid var(--neutral-300);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--neutral-900);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgb(14 165 233 / 0.14);
}

.filter-empty {
  margin: 20px 0;
  padding: 18px;
  border-radius: var(--radius-md);
  color: var(--neutral-700);
  background: var(--neutral-100);
  text-align: center;
}

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

.movie-card {
  min-width: 0;
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  background: var(--primary-950);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 15%, rgb(0 0 0 / 0.70));
  transition: opacity 0.25s ease;
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-year {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--white);
  background: var(--accent-500);
  font-size: 12px;
  font-weight: 800;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: var(--primary-950);
  background: rgb(255 255 255 / 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
  padding: 12px 2px 0;
}

.movie-title {
  display: block;
  color: var(--neutral-950);
  font-weight: 800;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title:hover {
  color: var(--primary-700);
}

.movie-line {
  margin: 6px 0 0;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--neutral-600);
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--neutral-100);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  font-weight: 900;
}

.rank-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--primary-950);
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.rank-info p {
  margin: 6px 0 0;
  color: var(--neutral-600);
  line-height: 1.55;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 0 0;
  color: var(--neutral-600);
  font-size: 14px;
}

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

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

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgb(0 0 0 / 0.20), rgb(0 0 0 / 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-layer span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: var(--primary-950);
  background: var(--accent-400);
  box-shadow: 0 20px 38px rgb(0 0 0 / 0.28);
  font-size: 30px;
  padding-left: 4px;
}

.player-info {
  padding: 22px;
}

.player-info h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.player-info p {
  margin: 14px 0 0;
  color: var(--neutral-700);
  line-height: 1.8;
}

.detail-card {
  margin-top: 24px;
  padding: 26px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--neutral-950);
}

.detail-card p {
  color: var(--neutral-700);
  line-height: 1.9;
  margin: 0 0 18px;
}

.side-card {
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  background: var(--primary-950);
  margin-bottom: 16px;
}

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

.side-meta {
  display: grid;
  gap: 10px;
  color: var(--neutral-700);
}

.side-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--neutral-200);
}

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

.site-footer {
  margin-top: 72px;
  padding: 46px 24px 28px;
  color: var(--neutral-300);
  background: var(--neutral-950);
}

.footer-grid {
  width: min(100%, 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 14px;
}

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

.site-footer a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  width: min(100%, 1280px);
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--neutral-800);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--neutral-500);
  font-size: 14px;
}

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

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

@media (max-width: 900px) {
  .hero-inner,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 28px;
    padding-top: 44px;
  }

  .hero-poster {
    max-width: 300px;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 76px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 24px 18px;
    background: var(--primary-800);
    border-top: 1px solid rgb(255 255 255 / 0.10);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
  }

  .main,
  .nav-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-slider,
  .hero-inner {
    min-height: 660px;
  }

  .hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-controls {
    right: 16px;
    bottom: 18px;
  }

  .section-heading,
  .page-heading,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .category-strip,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 70px minmax(0, 1fr);
    gap: 10px;
  }

  .detail-card {
    padding: 20px;
  }
}

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

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

  .brand {
    font-size: 19px;
  }
}
