:root {
  color-scheme: light;
  --amber: #d97706;
  --amber-dark: #b45309;
  --slate: #1e293b;
  --muted: #64748b;
  --line: #e7e5e4;
  --soft: #fafaf9;
  --card: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--slate);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.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.88);
  border-bottom: 1px solid rgba(231, 229, 228, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1220px, calc(100% - 28px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #92400e);
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.28);
}

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

.nav-link {
  padding: 9px 13px;
  color: #475569;
  border-radius: 999px;
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-dark);
  background: #fffbeb;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(310px, 28vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.header-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
}

.header-search input {
  padding: 10px 12px 10px 16px;
  font-size: 14px;
}

.header-search button {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: #ffffff;
  font-weight: 700;
  background: var(--amber);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #334155;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  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.84), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.20));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
  padding-bottom: 44px;
}

.hero-tags,
.genre-chips,
.tag-cloud,
.detail-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags a,
.genre-chips span,
.tag-cloud a,
.detail-meta span,
.meta-row a,
.meta-row span,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags a {
  padding: 7px 12px;
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  max-width: 820px;
  margin: 16px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.glass-button,
.panel-link,
.text-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
}

.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-1px) scale(1.02);
}

.glass-button {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 82px;
  z-index: 3;
  width: min(620px, calc(100% - 36px));
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-search input {
  padding: 16px 20px;
  color: #ffffff;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
  padding: 0 22px;
  color: #ffffff;
  font-weight: 800;
  background: var(--amber);
}

.content-section {
  padding: 64px 0;
}

.gradient-section {
  background: linear-gradient(to bottom, #fafaf9, #ffffff);
}

.pale-section {
  background: #fafaf9;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-more,
.text-link,
.panel-link {
  color: var(--amber-dark);
}

.featured-rail {
  position: relative;
}

.rail-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 22px;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.rail-track .movie-card-large {
  min-width: 360px;
  width: 360px;
}

.rail-button {
  position: absolute;
  top: 45%;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #334155;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  font-size: 28px;
}

.rail-left {
  left: -10px;
}

.rail-right {
  right: -10px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.78);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: 0.25s ease;
}

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

.movie-thumb,
.large-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e7e5e4;
}

.movie-thumb {
  aspect-ratio: 16 / 9;
}

.large-thumb {
  aspect-ratio: 16 / 10;
}

.movie-thumb img,
.large-thumb img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
}

.play-symbol {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: 0.25s ease;
}

.movie-card:hover .play-symbol {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.year-badge {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.70);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 20px rgba(146, 64, 14, 0.26);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  min-height: 48px;
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.42;
  font-weight: 850;
}

.movie-info h3 a:hover {
  color: var(--amber-dark);
}

.movie-info p {
  min-height: 42px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row a,
.meta-row span,
.pill {
  padding: 6px 9px;
  color: #475569;
  background: #f1f5f9;
}

.movie-card-large .compact-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.large-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08), transparent);
}

.large-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: #ffffff;
}

.large-copy strong,
.large-copy em {
  display: block;
}

.large-copy strong {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.25;
}

.large-copy em {
  color: rgba(255, 255, 255, 0.88);
  font-style: normal;
  font-size: 14px;
  line-height: 1.45;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 0;
}

.movie-card-horizontal .movie-thumb {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-horizontal .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.movie-card-horizontal .movie-info h3 {
  min-height: 0;
}

.horizontal-list,
.ranking-list {
  display: grid;
  gap: 16px;
}

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

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 900;
}

.ranking-panel .movie-card-horizontal {
  grid-template-columns: 116px 1fr;
  border-radius: 14px;
}

.ranking-panel .movie-info {
  padding: 12px;
}

.ranking-panel .movie-info p {
  display: none;
}

.ranking-panel .movie-info h3 {
  font-size: 14px;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  background: #fffbeb;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile img {
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transition: transform 0.4s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.10));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  color: #ffffff;
}

.category-tile strong {
  bottom: 56px;
  font-size: 23px;
}

.category-tile em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.80);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.page-main,
.detail-main {
  min-height: 60vh;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.54), transparent 32%), linear-gradient(135deg, #0f172a, #292524 64%, #78350f);
}

.compact-hero {
  padding: 84px 0 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fcd34d;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

.category-covers img {
  height: 86px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.wide-filter {
  grid-template-columns: minmax(260px, 1fr) 150px 170px 170px;
}

.filter-bar input,
.filter-bar select {
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.empty-state {
  display: none;
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  padding: 58px 0;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.32), transparent 36%), linear-gradient(135deg, #0f172a, #1c1917 58%, #78350f);
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 38px;
  align-items: center;
}

.poster-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.poster-panel img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.lead-text {
  max-width: 760px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta,
.genre-chips,
.tag-cloud {
  margin-bottom: 16px;
}

.detail-meta span,
.genre-chips span,
.tag-cloud a {
  padding: 7px 11px;
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.14);
}

.player-section h2 {
  margin: 0 0 20px;
  font-size: 30px;
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.32);
  font-size: 36px;
}

.player-overlay strong {
  font-size: 20px;
}

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

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

.story-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.story-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.site-footer {
  padding: 48px 0 32px;
  color: #475569;
  background: #fafaf9;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner p {
  max-width: 580px;
  margin: 14px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 800;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1100px) {
  .four-cols,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ranking-panel {
    position: static;
  }
}

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

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

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

  .hero-slider {
    min-height: 620px;
    height: 78vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search {
    bottom: 74px;
  }

  .content-section {
    padding: 46px 0;
  }

  .four-cols,
  .three-cols,
  .category-grid,
  .category-overview-grid,
  .detail-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .poster-panel {
    max-width: 320px;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 22px;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 15px;
  }

  .hero-content {
    align-items: flex-start;
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-search {
    display: none;
  }

  .hero-dots {
    bottom: 24px;
  }

  .rail-track .movie-card-large {
    min-width: 280px;
    width: 280px;
  }

  .four-cols,
  .three-cols,
  .category-grid,
  .category-overview-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 132px 1fr;
  }

  .movie-card-horizontal .movie-info p {
    display: none;
  }

  .detail-hero {
    padding: 34px 0;
  }

  .player-overlay span {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
}
