:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --accent-50: #fffbeb;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-500: #78716c;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.08);
  --shadow-md: 0 8px 22px rgba(28, 25, 23, 0.12);
  --shadow-xl: 0 20px 45px rgba(28, 25, 23, 0.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--neutral-50);
  color: var(--neutral-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--accent-500);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.mobile-panel a {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--accent-50);
}

.nav-spacer {
  flex: 1;
}

.nav-search {
  display: flex;
  align-items: center;
  width: min(300px, 30vw);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 9px 12px 9px 16px;
  background: transparent;
  color: var(--white);
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button {
  border: 0;
  padding: 9px 14px;
  background: var(--accent-500);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

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

.mobile-panel-inner {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: var(--neutral-900);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 52px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-400);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-title {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(16px, 2vw, 20px);
}

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

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

.button-primary {
  background: var(--accent-500);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.button-primary:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
}

.button-ghost {
  background: var(--white);
  color: var(--primary-700);
  box-shadow: var(--shadow-sm);
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 32px;
  display: flex;
  gap: 8px;
}

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

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

.section-block {
  margin-top: 56px;
}

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

.section-title-group {
  display: grid;
  gap: 4px;
}

.section-kicker {
  color: var(--accent-600);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.2;
}

.section-desc {
  margin: 0;
  max-width: 780px;
  color: var(--neutral-500);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-800), var(--neutral-900));
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 56%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.poster-link:hover::after {
  opacity: 1;
}

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

.card-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

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

.card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.card-title a:hover {
  color: var(--primary-600);
}

.card-meta {
  margin: 5px 0 0;
  color: var(--neutral-500);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--neutral-700);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag-line span,
.info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 700;
}

.rail-section {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

.movie-rail {
  display: flex;
  gap: 18px;
  margin: 0 -28px;
  padding: 0 28px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.movie-rail .movie-card {
  width: 190px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h3 {
  margin: 0;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--neutral-500);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.category-preview img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--neutral-200);
}

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

.movie-list-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--accent-500);
  color: var(--white);
  font-weight: 900;
}

.list-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--neutral-200);
}

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

.list-content h3 {
  margin: 0;
  font-size: 18px;
}

.list-content h3 a:hover {
  color: var(--primary-600);
}

.list-content p {
  margin: 5px 0 0;
  color: var(--neutral-600);
}

.page-hero {
  padding: 52px 24px;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-600));
  color: var(--white);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--neutral-800);
  background: var(--white);
  outline: 0;
}

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

.empty-state {
  padding: 30px;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--neutral-500);
  text-align: center;
}

.detail-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  color: var(--white);
  background: var(--neutral-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.08);
  opacity: 0.52;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.65), rgba(28, 25, 23, 0.2));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 34px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

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

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

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

.detail-title {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-intro {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-facts span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-weight: 700;
}

.player-section {
  max-width: 1120px;
  margin: 44px auto 0;
  padding: 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-xl);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-start-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent-500);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 18px 35px rgba(245, 158, 11, 0.35);
}

.player-start-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 0 24px 50px;
}

.content-card,
.side-card {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-card {
  padding: 28px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--neutral-700);
  font-size: 16px;
}

.side-card {
  padding: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--neutral-200);
}

.related-item h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.related-item p {
  margin: 4px 0 0;
  color: var(--neutral-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 56px;
  padding: 44px 24px 28px;
  background: var(--neutral-900);
  color: var(--neutral-300);
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}

.footer-title {
  margin: 0 0 12px;
  color: var(--white);
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--neutral-500);
  font-size: 14px;
}

.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 (min-width: 900px) {
  .hero-carousel {
    height: 600px;
  }
}

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

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

@media (max-width: 860px) {
  .nav-links,
  .nav-search,
  .nav-spacer {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-content {
    padding-bottom: 64px;
  }

  .hero-dots {
    right: auto;
    left: 24px;
    bottom: 24px;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .detail-poster {
    max-width: 220px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .page-shell,
  .hero-content,
  .detail-hero-inner,
  .detail-content-grid,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-list-item {
    grid-template-columns: 78px 1fr;
  }

  .rail-section {
    padding: 22px 16px;
  }

  .movie-rail {
    margin: 0 -16px;
    padding: 0 16px 6px;
  }

  .movie-rail .movie-card {
    width: 160px;
  }

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