:root {
  --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;
  --accent-100: #fef3c7;
  --accent-50: #fffbeb;
  --neutral-950: #0c0a09;
  --neutral-900: #1c1917;
  --neutral-800: #292524;
  --neutral-700: #44403c;
  --neutral-600: #57534e;
  --neutral-500: #78716c;
  --neutral-300: #d6d3d1;
  --neutral-200: #e7e5e4;
  --neutral-100: #f5f5f4;
  --neutral-50: #fafaf9;
  --white: #ffffff;
  --shadow-soft: 0 14px 40px rgba(12, 74, 110, 0.16);
  --shadow-deep: 0 22px 70px rgba(0, 0, 0, 0.24);
  --radius-lg: 18px;
  --radius-xl: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: linear-gradient(180deg, var(--neutral-50), #ffffff 42%, var(--primary-50));
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  box-shadow: 0 12px 30px rgba(12, 74, 110, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--primary-900);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.36);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
}

.nav-link {
  padding: 22px 0;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent-400);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: var(--primary-900);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  color: var(--white);
  overflow: hidden;
  background: var(--neutral-950);
}

.hero-track {
  position: relative;
  min-height: 660px;
}

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

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

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

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 35%, rgba(251, 191, 36, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(12, 74, 110, 0.98) 0%, rgba(12, 74, 110, 0.78) 42%, rgba(0, 0, 0, 0.36) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 58px;
  align-items: center;
  min-height: 660px;
  padding: 72px 0 92px;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-text,
.page-hero p,
.detail-one-line {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.hero-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

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

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

.btn-accent {
  color: var(--neutral-950);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.35);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.26);
}

.btn-ghost,
.btn-link {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 500px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-deep);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--neutral-950);
  background: var(--accent-400);
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 99px;
}

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

.search-band {
  margin-top: -34px;
  position: relative;
  z-index: 8;
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 18px 28px;
  align-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(12, 74, 110, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.search-band h2 {
  margin: 0;
  font-size: 24px;
}

.search-band p {
  margin: 6px 0 0;
  color: var(--neutral-600);
}

.search-form,
.filter-bar {
  display: flex;
  gap: 10px;
}

.search-form input,
.filter-input,
.filter-select {
  min-height: 46px;
  width: 100%;
  padding: 0 15px;
  color: var(--neutral-900);
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  outline: none;
}

.search-form input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.search-form button,
.filter-reset {
  min-height: 46px;
  padding: 0 18px;
  color: var(--white);
  background: var(--primary-700);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.quick-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-chips a {
  padding: 8px 12px;
  color: var(--primary-700);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  font-weight: 700;
}

.section {
  padding: 74px 0 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--neutral-600);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(12, 74, 110, 0.14);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover .poster-link {
  transform: translateY(-5px);
  box-shadow: 0 18px 44px rgba(12, 74, 110, 0.22);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.62));
}

.play-dot,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  color: var(--neutral-950);
  background: var(--accent-400);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.24s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  color: var(--neutral-950);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  border-radius: 999px;
}

.card-body {
  padding-top: 12px;
}

.card-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--primary-700);
}

.card-meta,
.card-desc {
  margin: 6px 0 0;
  color: var(--neutral-600);
  font-size: 14px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card-tags span {
  min-height: 24px;
  color: var(--primary-700);
  background: var(--primary-50);
  border-color: var(--primary-100);
  font-size: 12px;
}

.ranking-section {
  padding-bottom: 0;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  padding: 34px;
  color: var(--white);
  background:
    radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.18), transparent 30%),
    linear-gradient(135deg, var(--primary-900), var(--primary-800));
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-deep);
}

.ranking-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
}

.ranking-copy p {
  color: rgba(255, 255, 255, 0.78);
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}

.rank-list span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--neutral-950);
  background: var(--accent-400);
  border-radius: 50%;
  font-weight: 900;
}

.rank-list em {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  font-size: 14px;
}

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

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

.category-card {
  display: block;
  min-height: 150px;
  padding: 22px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  border: 1px solid rgba(12, 74, 110, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px rgba(12, 74, 110, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  display: block;
  color: var(--primary-800);
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  color: var(--neutral-600);
}

.category-card strong {
  color: var(--accent-600);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.24), transparent 32%),
    linear-gradient(135deg, var(--primary-900), var(--primary-700));
}

.page-hero .container {
  padding: 82px 0;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.category-feature {
  margin-top: -38px;
  position: relative;
  z-index: 4;
}

.feature-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.feature-inner img {
  width: 260px;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.feature-inner h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.feature-inner p:not(.eyebrow) {
  color: var(--neutral-600);
}

.filter-bar {
  margin-bottom: 24px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px rgba(12, 74, 110, 0.06);
}

.filter-select {
  max-width: 240px;
}

.detail-hero {
  min-height: 560px;
  background: var(--neutral-950);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 42px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

.detail-head {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 40px;
  align-items: center;
}

.detail-poster {
  width: 310px;
  height: 450px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-deep);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-meta-line span,
.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
}

.detail-main-section {
  padding-top: 54px;
}

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

.player-panel,
.content-block,
.info-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid rgba(12, 74, 110, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 28px rgba(12, 74, 110, 0.08);
}

.player-panel h2,
.content-block h2,
.info-card h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
}

.movie-player,
.player-poster,
.player-poster img,
.player-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000;
}

.player-poster {
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.player-poster img {
  object-fit: cover;
}

.player-mask {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.22));
}

.player-poster strong {
  position: relative;
  z-index: 2;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: var(--neutral-950);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  border-radius: 50%;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  font-size: 30px;
}

.player-shell.is-playing .player-poster {
  display: none;
}

.content-block {
  margin-top: 24px;
}

.content-block p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.info-card ul,
.side-rank ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-card li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-200);
}

.info-card li:last-child {
  border-bottom: 0;
}

.info-card span {
  color: var(--neutral-500);
}

.info-card strong {
  color: var(--neutral-900);
}

.side-rank li + li {
  margin-top: 10px;
}

.side-rank a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--neutral-700);
}

.side-rank a:hover {
  color: var(--primary-700);
}

.side-rank a span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--neutral-950);
  background: var(--accent-400);
  border-radius: 50%;
  font-weight: 900;
}

.site-footer {
  margin-top: 86px;
  padding: 46px 0 28px;
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

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

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

.site-footer p {
  color: var(--neutral-300);
}

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

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--neutral-800);
}

.footer-bottom p {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

  .hero-content {
    grid-template-columns: 1fr 300px;
    gap: 30px;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-track,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 68px 0 96px;
  }

  .hero-poster {
    display: none;
  }

  .search-band-inner,
  .ranking-layout,
  .detail-head,
  .detail-layout,
  .footer-grid,
  .feature-inner {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 8px;
  }

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

  .detail-poster,
  .feature-inner img {
    width: 220px;
    height: 320px;
  }

  .detail-side {
    position: static;
  }
}

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

  .brand-text {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-text,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .search-form,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-band-inner {
    padding: 18px;
  }

  .section {
    padding-top: 54px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

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

  .rank-list em {
    grid-column: 2;
  }

  .player-poster strong {
    width: 64px;
    height: 64px;
  }
}
