:root {
  color-scheme: light;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --teal-600: #0d9488;
  --emerald-600: #059669;
  --blue-600: #2563eb;
  --indigo-900: #312e81;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--amber-50), #ffffff 34%, var(--slate-50));
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-800), #9a3412, #7f1d1d);
  box-shadow: 0 10px 25px rgba(120, 53, 15, 0.25);
}

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

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

.site-logo {
  font-size: 22px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--amber-900);
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

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

.nav-link {
  padding: 8px 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-100);
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

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

.mobile-link {
  display: block;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-section {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 78% 18%, rgba(251, 191, 36, 0.42), transparent 28%), linear-gradient(135deg, #78350f 0%, #b45309 48%, #7f1d1d 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.78) 1.5px, transparent 1.6px);
  background-size: 42px 42px;
  animation: pulsePattern 4s ease-in-out infinite alternate;
}

@keyframes pulsePattern {
  from { opacity: 0.09; transform: scale(1); }
  to { opacity: 0.18; transform: scale(1.04); }
}

.hero-container {
  position: relative;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 54px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: heroIn 0.55s ease both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 14px;
  max-width: 850px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 4vw, 42px);
  color: #fff7ed;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 26px;
  color: #ffedd5;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.badge-row,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.badge-row span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.primary-button,
.ghost-button,
.primary-link,
.tile-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.primary-link {
  color: var(--amber-900);
  background: #fff;
  box-shadow: 0 16px 25px rgba(0, 0, 0, 0.18);
}

.ghost-button {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: rgba(120, 53, 15, 0.38);
}

.primary-button:hover,
.ghost-button:hover,
.primary-link:hover,
.tile-more:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  min-height: 520px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(1.2deg);
  background: rgba(15, 23, 42, 0.45);
}

.hero-poster img {
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(120, 53, 15, 0.68));
  backdrop-filter: blur(14px);
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.hero-dot,
.hero-arrow {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: #fff;
}

.section {
  padding: 70px 0;
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--amber-600);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.section-heading a {
  flex: none;
  color: var(--amber-700);
  font-weight: 900;
}

.section-heading.light h2,
.section-heading.light p,
.section-heading.light a {
  color: #fff;
}

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

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

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

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

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

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

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, var(--slate-800), var(--amber-800));
}

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

.movie-link:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.poster-meta span,
.rank-badge,
.compact-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
  background: var(--rose-600);
  box-shadow: 0 10px 20px rgba(225, 29, 72, 0.28);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 19px;
  line-height: 1.35;
}

.movie-genre,
.movie-line {
  margin: 0;
}

.movie-genre {
  color: var(--slate-500);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  margin-top: 10px;
  min-height: 48px;
  color: var(--slate-700);
  line-height: 1.65;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: var(--slate-600);
  background: var(--slate-100);
}

.latest-section {
  background: linear-gradient(90deg, var(--slate-100), var(--amber-50));
}

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

.compact-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-card img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: var(--slate-800);
}

.compact-title {
  color: var(--slate-800);
  font-weight: 900;
  line-height: 1.35;
}

.compact-meta {
  color: var(--slate-500);
  font-size: 12px;
}

.compact-rank {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  padding: 0;
  background: var(--rose-600);
}

.category-section {
  background: linear-gradient(135deg, #1e3a8a, var(--indigo-900), var(--slate-900));
}

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

.category-tile,
.overview-card {
  padding: 26px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.category-tile h3,
.overview-card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 26px;
}

.category-tile p,
.overview-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.75;
}

.tile-links {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.tile-links a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tile-more {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero,
.detail-head {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-900), var(--amber-700), #7f1d1d);
}

.page-hero {
  padding: 72px 0;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 62px);
  line-height: 1.08;
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 0;
  color: #ffedd5;
  font-size: 20px;
  line-height: 1.8;
}

.dark-hero {
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #312e81);
}

.rose-hero {
  background: linear-gradient(135deg, #881337, #be123c, #7f1d1d);
}

.overview-card {
  background: #fff;
}

.overview-card h2 {
  color: var(--slate-800);
}

.overview-card p {
  color: var(--slate-600);
}

.overview-samples {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.overview-samples .compact-card {
  padding: 6px;
  box-shadow: none;
  background: var(--slate-50);
}

.overview-samples .compact-title {
  font-size: 12px;
}

.overview-samples .compact-meta {
  display: none;
}

.primary-link {
  color: #fff;
  background: var(--amber-700);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

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

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--slate-800);
  background: #fff;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 72px minmax(160px, 1fr) minmax(200px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.ranking-row img {
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-800);
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: var(--rose-600);
}

.ranking-title {
  color: var(--slate-800);
  font-size: 18px;
  font-weight: 900;
}

.ranking-meta {
  color: var(--slate-600);
}

.ranking-score {
  color: var(--rose-700);
  font-weight: 900;
}

.detail-head {
  padding: 28px 0 54px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-card {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  background: var(--slate-900);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.3);
}

.badge-row span {
  color: var(--amber-900);
  background: #fff7ed;
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
}

.detail-line {
  margin: 0 0 24px;
  max-width: 820px;
  color: #ffedd5;
  font-size: 20px;
  line-height: 1.8;
}

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

.player-section {
  padding-bottom: 34px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 75px rgba(15, 23, 42, 0.32);
  aspect-ratio: 16 / 9;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  text-align: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.36), rgba(15, 23, 42, 0.74));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--amber-900);
  font-size: 34px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.player-overlay strong {
  font-size: clamp(24px, 4vw, 40px);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 32px;
}

.content-panel,
.info-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.content-panel {
  padding: 34px;
}

.content-panel h2,
.info-panel h2 {
  margin: 0 0 18px;
  color: var(--slate-800);
  font-size: 27px;
}

.content-panel h2:not(:first-child) {
  margin-top: 34px;
}

.content-panel p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 2;
}

.info-panel {
  align-self: start;
  position: sticky;
  top: 94px;
  padding: 26px;
}

.info-panel dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-panel dt,
.info-panel dd {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
}

.info-panel dt {
  color: var(--slate-500);
  font-size: 13px;
}

.info-panel dd {
  color: var(--slate-800);
  font-weight: 900;
}

.info-panel a {
  color: var(--amber-700);
}

.site-footer {
  margin-top: 40px;
  padding: 46px 0 24px;
  color: rgba(255, 255, 255, 0.76);
  background: var(--slate-900);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 24px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
}

.footer-grid p {
  max-width: 520px;
  margin: 0;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: start;
  font-weight: 900;
}

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

.copyright {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .featured-grid,
  .latest-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .related-grid,
  .ranking-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-slide {
    grid-template-columns: 1fr;
    padding: 70px 0 100px;
  }
  .hero-container {
    min-height: auto;
  }
  .hero-poster {
    max-width: 420px;
    min-height: 520px;
  }
  .detail-card,
  .detail-main {
    grid-template-columns: 1fr;
  }
  .detail-poster {
    max-width: 330px;
  }
  .info-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }
  .menu-button {
    display: flex;
  }
  .site-logo {
    font-size: 18px;
  }
  .hero-section,
  .hero-slide {
    min-height: auto;
  }
  .hero-slide {
    gap: 30px;
    padding: 52px 0 96px;
  }
  .hero-poster,
  .hero-poster img {
    min-height: 420px;
  }
  .section {
    padding: 48px 0;
  }
  .section-heading {
    display: grid;
  }
  .featured-grid,
  .latest-grid,
  .library-grid,
  .related-grid,
  .ranking-strip,
  .category-grid,
  .overview-grid,
  .overview-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .ranking-row {
    grid-template-columns: 44px 60px 1fr;
  }
  .ranking-meta,
  .ranking-score {
    grid-column: 3;
  }
  .detail-card {
    padding: 18px;
  }
  .detail-info h1 {
    font-size: 38px;
  }
  .content-panel,
  .info-panel {
    padding: 22px;
  }
  .footer-grid {
    display: grid;
  }
}

@media (max-width: 500px) {
  .featured-grid,
  .latest-grid,
  .library-grid,
  .related-grid,
  .ranking-strip,
  .category-grid,
  .overview-grid,
  .overview-samples {
    grid-template-columns: 1fr;
  }
  .hero-actions,
  .page-actions {
    display: grid;
  }
  .hero-controls {
    bottom: 20px;
  }
  .poster-wrap {
    aspect-ratio: 16 / 22;
  }
}
