:root {
  color-scheme: light;
  --bg: #fff7ed;
  --bg-soft: #fffbeb;
  --surface: #ffffff;
  --surface-strong: #fffaf0;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.16);
  --brand: #d97706;
  --brand-deep: #92400e;
  --brand-soft: #f59e0b;
  --accent: #ef4444;
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 44%, #fff7ed 100%);
  color: var(--text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(120, 53, 15, 0.92);
  color: #fff7ed;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(120, 53, 15, 0.22);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #78350f;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 24px rgba(0, 0, 0, 0.2);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  border-radius: 999px;
  color: rgba(255, 247, 237, 0.84);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #78350f;
  background: #fef3c7;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  width: min(360px, 28vw);
  padding: 4px;
  border: 1px solid rgba(254, 243, 199, 0.22);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.12);
}

.top-search input,
.inline-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  padding: 9px 12px;
  color: #fff7ed;
}

.top-search input::placeholder {
  color: rgba(255, 247, 237, 0.68);
}

.top-search button,
.mobile-toggle,
.hero-controls button,
.primary-button,
.ghost-button,
.section-more,
.player-start {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.top-search button {
  padding: 8px 13px;
  color: #78350f;
  background: #fef3c7;
}

.mobile-toggle {
  display: none;
  padding: 10px 14px;
  color: #78350f;
  background: #fef3c7;
}

.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  padding: clamp(22px, 4vw, 56px) clamp(18px, 5vw, 72px) 24px;
}

.hero-stage {
  position: relative;
  min-height: min(720px, calc(100vh - 128px));
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(28px, 6vw, 78px);
  color: #fff7ed;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.6s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(120, 53, 15, 0.66), rgba(17, 24, 39, 0.32)),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.12);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), transparent);
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow,
.detail-hero .eyebrow {
  color: #fcd34d;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(40px, 7vw, 88px);
  text-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

.hero-desc {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 247, 237, 0.86);
  font-size: clamp(17px, 2vw, 21px);
}

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

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-tags span {
  padding: 7px 12px;
  color: #fff7ed;
  background: rgba(255, 247, 237, 0.18);
  border: 1px solid rgba(255, 247, 237, 0.18);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
}

.primary-button {
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.3);
}

.ghost-button {
  color: #fff7ed;
  border: 1px solid rgba(255, 247, 237, 0.28);
  background: rgba(255, 247, 237, 0.12);
}

.ghost-button.dark {
  color: var(--brand-deep);
  border: 1px solid rgba(146, 64, 14, 0.18);
  background: #fff7ed;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.player-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(120, 53, 15, 0.2);
}

.hero-poster {
  align-self: stretch;
  display: flex;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(255, 247, 237, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

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

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.hero-controls button {
  padding: 10px 15px;
  color: var(--brand-deep);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.12);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(146, 64, 14, 0.22);
  box-shadow: none;
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--brand);
}

.search-panel,
.category-strip,
.content-section,
.page-hero,
.category-panel,
.detail-main,
.site-footer {
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.category-panel h2,
.detail-content h2,
.player-section h2 {
  margin: 0;
  color: #111827;
  line-height: 1.15;
  font-size: clamp(24px, 3vw, 36px);
}

.search-panel p,
.section-heading p,
.category-panel p,
.page-hero p,
.movie-card p,
.rank-card p,
.detail-content p,
.footer-grid p {
  color: var(--muted);
}

.inline-search {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.inline-search.wide {
  max-width: 680px;
  margin-top: 24px;
}

.category-strip,
.content-section,
.category-panel {
  margin-top: clamp(34px, 5vw, 70px);
}

.section-heading,
.category-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading.compact,
.category-panel-head {
  align-items: center;
}

.section-more {
  color: var(--brand-deep);
  border: 1px solid var(--line);
  background: #ffffff;
}

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

.category-tile {
  display: grid;
  min-height: 150px;
  align-content: space-between;
  padding: 22px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 235, 0.84)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 8rem);
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--brand);
  font-size: 42px;
  line-height: 1;
}

.category-tile small {
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(120, 53, 15, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(217, 119, 6, 0.38);
  box-shadow: var(--shadow);
}

.poster-link,
.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.poster-score {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #78350f;
  font-weight: 950;
  background: #fde68a;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.poster-action {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff7ed;
  font-size: 13px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-title,
.rank-title {
  display: inline-block;
  color: #111827;
  font-weight: 950;
  line-height: 1.28;
}

.movie-title {
  font-size: 18px;
}

.movie-title:hover,
.rank-title:hover {
  color: var(--brand);
}

.movie-meta,
.rank-meta {
  margin-top: 7px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}

.movie-card p {
  min-height: 52px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.tag-list span {
  padding: 5px 9px;
  color: #92400e;
  font-size: 12px;
  background: #fff7ed;
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(120, 53, 15, 0.08);
}

.rank-poster {
  height: 126px;
  border-radius: 16px;
}

.rank-card p {
  margin: 8px 0;
  font-size: 14px;
}

.rank-num {
  position: absolute;
  top: -10px;
  left: -8px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #78350f;
  font-weight: 950;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 12px 24px rgba(120, 53, 15, 0.22);
}

.page-main {
  padding: 32px 0 72px;
}

.page-hero {
  padding: clamp(30px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 251, 235, 0.88)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 24rem);
  box-shadow: var(--shadow);
}

.page-hero.slim h1 {
  max-width: 900px;
  font-size: clamp(34px, 5vw, 64px);
}

.page-hero.slim p {
  max-width: 860px;
  font-size: 18px;
}

.category-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
}

.detail-main {
  padding: 28px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 800;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
  padding: clamp(24px, 5vw, 58px);
  border-radius: var(--radius-lg);
  color: #fff7ed;
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.35), transparent 24rem),
    linear-gradient(135deg, #451a03, #78350f 46%, #111827);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 66px);
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0 0;
  color: rgba(255, 247, 237, 0.86);
  font-size: 19px;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.detail-meta-list div {
  padding: 14px;
  border: 1px solid rgba(255, 247, 237, 0.15);
  border-radius: 18px;
  background: rgba(255, 247, 237, 0.1);
}

.detail-meta-list dt {
  color: rgba(255, 247, 237, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.detail-meta-list dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.player-section,
.detail-content,
.detail-neighbors {
  margin-top: 34px;
}

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

.player-shell video {
  display: block;
  width: 100%;
  min-height: min(58vw, 680px);
  max-height: 720px;
  background: #000000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 28px;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

.player-start.is-hidden {
  display: none;
}

.player-status {
  min-height: 28px;
  color: var(--muted);
  font-weight: 800;
}

.detail-content {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(120, 53, 15, 0.08);
}

.detail-content p {
  margin: 0 0 18px;
  font-size: 17px;
}

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

.detail-neighbors a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--brand-deep);
  font-weight: 900;
}

.related-grid .movie-card.compact .movie-card-body p {
  min-height: auto;
}

.site-footer {
  margin-top: 60px;
  padding: 38px 0 46px;
  color: #fffbeb;
  background: linear-gradient(135deg, #78350f, #451a03);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 28px;
  width: min(1140px, calc(100% - 36px));
  margin-inline: auto;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 22px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid p {
  color: rgba(255, 247, 237, 0.78);
}

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

.footer-links.vertical {
  flex-direction: column;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fffbeb;
  background: rgba(255, 247, 237, 0.11);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

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

  .mobile-nav {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .mobile-link {
    padding: 9px 13px;
  }

  .top-search {
    width: min(460px, 48vw);
    justify-self: end;
  }

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

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .top-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero {
    padding: 16px;
  }

  .hero-stage {
    min-height: 620px;
  }

  .hero-slide {
    padding: 28px;
  }

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

  .section-heading,
  .category-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

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

@media (max-width: 560px) {
  .movie-grid,
  .category-grid,
  .rank-grid,
  .rank-grid.small,
  .detail-neighbors {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .rank-poster {
    height: 112px;
  }

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

  .hero-actions,
  .page-actions,
  .detail-actions {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .section-more {
    width: 100%;
  }
}
