:root {
  --brand-950: #431407;
  --brand-900: #78350f;
  --brand-800: #92400e;
  --brand-700: #b45309;
  --brand-600: #d97706;
  --brand-500: #f59e0b;
  --brand-200: #fde68a;
  --brand-100: #fef3c7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0, var(--page) 22rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-900), #9a3412);
  box-shadow: 0 10px 35px rgba(67, 20, 7, 0.22);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-900);
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  white-space: nowrap;
}

.desktop-nav a {
  font-weight: 600;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--brand-200);
  opacity: 1;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

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

.header-search button {
  border: 0;
  border-radius: 999px;
  color: var(--brand-950);
  background: #fff;
  padding: 8px 14px;
  font-weight: 700;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 26px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.mobile-nav.open {
  display: block;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.72) 45%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.85) 0%, rgba(17, 24, 39, 0.1) 52%, rgba(17, 24, 39, 0.58) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: 54px;
}

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

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--brand-200);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-button {
  color: #fff;
  background: var(--brand-600);
  box-shadow: 0 14px 35px rgba(217, 119, 6, 0.36);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  width: min(100%, 620px);
  gap: 10px;
  margin-top: 28px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 12px 14px;
}

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

.hero-search button {
  border: 0;
  border-radius: 18px;
  color: var(--brand-950);
  background: #fff;
  padding: 0 18px;
  font-weight: 900;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-600);
  padding: 9px 14px;
  font-weight: 900;
}

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

.hero-dots button {
  width: 32px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
  background: #fff;
}

.section-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 32px;
  align-items: center;
}

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

.section-heading.wide {
  display: block;
  margin-bottom: 0;
}

.section-heading h2,
.page-hero h1,
.content-card h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.content-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading a {
  color: var(--brand-700);
  font-weight: 900;
  white-space: nowrap;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-stats a {
  display: grid;
  gap: 6px;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-900), var(--brand-600));
  box-shadow: var(--shadow);
}

.quick-stats strong {
  font-size: 30px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1f2937;
}

.featured-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
}

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  bottom: 10px;
  background: var(--brand-600);
  padding: 6px 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: rgba(17, 24, 39, 0.78);
  padding: 6px 10px;
}

.movie-card-body {
  padding: 15px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: var(--brand-800);
  background: #fff7ed;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-grid.large {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.category-tile {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-tile > a {
  display: block;
  min-height: 188px;
  padding: 22px;
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(253, 230, 138, 0.45), transparent 28%), linear-gradient(135deg, var(--brand-900), var(--brand-600));
}

.category-tile span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.category-tile h3 {
  margin: 18px 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-samples {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
}

.category-samples a {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-preview {
  border-radius: 34px;
  background: linear-gradient(135deg, #111827, #431407);
  padding-left: 28px;
  padding-right: 28px;
}

.ranking-preview .section-heading h2,
.ranking-preview .section-heading a {
  color: #fff;
}

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

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

.compact-card {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.compact-card a {
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.compact-rank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-600);
  font-weight: 900;
}

.compact-card img {
  width: 76px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.compact-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
}

.compact-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-card strong {
  color: var(--brand-700);
  font-size: 22px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  filter: saturate(1.1);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(67, 20, 7, 0.95), rgba(17, 24, 39, 0.68));
}

.page-hero > div {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.compact-hero {
  background: linear-gradient(135deg, var(--brand-950), var(--brand-700));
}

.compact-hero::before {
  display: none;
}

.page-hero h1,
.page-hero p {
  color: #fff;
  max-width: 780px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 620px);
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: 24px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.filter-panel p {
  margin: 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.8fr 0.8fr;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: 0;
  background: #fff;
  padding: 12px 13px;
}

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

.empty-state {
  margin: 28px 0 0;
  border-radius: 20px;
  color: var(--muted);
  background: #fff;
  padding: 28px;
  text-align: center;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.32;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(67, 20, 7, 0.76));
}

.detail-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--brand-200);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 32px;
  align-items: center;
}

.watch-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.watch-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.watch-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.watch-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-600);
  box-shadow: 0 15px 45px rgba(245, 158, 11, 0.35);
  font-size: 30px;
}

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

.watch-card.is-playing .watch-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 0;
}

.detail-meta div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 6px 0 0;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

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

.content-card {
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
  font-size: 28px;
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a,
.footer-bottom a {
  color: var(--brand-200);
  font-weight: 700;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

[hidden] {
  display: none !important;
}

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

  .menu-button {
    display: inline-flex;
  }

  .hero-content,
  .intro-section,
  .detail-grid,
  .filter-panel,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

@media (max-width: 720px) {
  .nav-shell {
    width: min(100% - 24px, 1280px);
  }

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

  .hero {
    min-height: 680px;
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
  }

  .hero-search,
  .hero-actions,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search button {
    min-height: 44px;
  }

  .section-shell,
  .page-hero > div,
  .detail-shell,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .featured-grid,
  .category-grid,
  .ranking-grid,
  .detail-content,
  .quick-stats,
  .filter-controls {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .compact-card a {
    grid-template-columns: auto 62px minmax(0, 1fr);
  }

  .compact-card strong {
    display: none;
  }

  .compact-card img {
    width: 62px;
  }

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