:root {
  color-scheme: light;
  --bg: #fff8ed;
  --panel: #ffffff;
  --panel-soft: #fff3df;
  --text: #25150f;
  --muted: #765f52;
  --line: rgba(120, 62, 23, 0.16);
  --primary: #d97706;
  --primary-dark: #92400e;
  --accent: #ef4444;
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(251, 191, 36, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(239, 68, 68, 0.12), transparent 24rem),
    var(--bg);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 237, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 32px rgba(217, 119, 6, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #654232;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff2d8;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-dark);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-weight: 700;
}

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

main {
  min-height: 62vh;
}

.hero {
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 42px;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 36px;
  padding: clamp(28px, 6vw, 72px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.02);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(37, 21, 15, 0.86), rgba(37, 21, 15, 0.52), rgba(37, 21, 15, 0.1)),
    var(--hero-bg) center / cover no-repeat;
}

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

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.tag-row span {
  background: #fff0d2;
  color: #9a3412;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #7c2d12;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.btn.text {
  color: #fde68a;
}

.hero-poster {
  justify-self: end;
  width: min(100%, 410px);
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.detail-poster img,
.ranking-poster img {
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(239, 68, 68, 0.18));
}

.hero-controls {
  position: absolute;
  left: clamp(28px, 6vw, 72px);
  bottom: 30px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dot {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  background: #fff;
}

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

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.intro-copy h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.intro-copy p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.home-search,
.search-panel,
.filter-bar {
  display: flex;
  gap: 12px;
}

.home-search input,
.search-panel input,
.filter-bar input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.home-search input:focus,
.search-panel input:focus,
.filter-bar input:focus {
  border-color: rgba(217, 119, 6, 0.62);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.home-search button {
  min-width: 108px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

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

.section-heading.simple {
  align-items: center;
}

.section-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary-dark);
  font-weight: 900;
}

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

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(120, 53, 15, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217, 119, 6, 0.32);
  box-shadow: 0 22px 62px rgba(120, 53, 15, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--panel-soft);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 21, 15, 0.76);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover,
.ranking-info h2 a:hover {
  color: var(--primary);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.movie-meta span,
.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7e8;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: start;
}

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

.category-tile,
.category-card-wide {
  display: block;
  min-height: 134px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 213, 0.92));
  box-shadow: 0 14px 42px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-card-wide:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 6, 0.34);
}

.category-tile span,
.category-card-title {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-card-wide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-card-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #7c2d12;
  background: #fff1cf;
  font-size: 13px;
  font-weight: 800;
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff7e8;
}

.rank-no {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 13px;
  font-weight: 900;
}

.rank-title {
  font-weight: 900;
}

.rank-heat,
.heat-pill {
  color: var(--primary-dark);
  font-weight: 900;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 36px;
  padding: clamp(32px, 6vw, 70px);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 24rem),
    linear-gradient(135deg, #92400e, #d97706 48%, #ef4444);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero .eyebrow {
  color: #fde68a;
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
}

.search-panel {
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-chips button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(217, 119, 6, 0.26);
  border-radius: 999px;
  color: #8a3a0d;
  background: #fff7e8;
  font-weight: 800;
}

.filter-bar {
  padding: 0;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 36px rgba(120, 53, 15, 0.08);
}

.ranking-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-soft);
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.heat-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff0d2;
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 36px;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(24px, 5vw, 54px);
  padding: clamp(26px, 5vw, 56px);
  border-radius: 34px;
  color: #fff;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(90deg, rgba(37, 21, 15, 0.88), rgba(37, 21, 15, 0.64), rgba(37, 21, 15, 0.34)),
    var(--detail-bg) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(4px);
  background: rgba(37, 21, 15, 0.22);
}

.detail-poster,
.detail-copy {
  position: relative;
  z-index: 1;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 28px 66px rgba(0, 0, 0, 0.34);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #fde68a;
  font-weight: 800;
}

.detail-copy h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 74px);
}

.detail-copy .lead {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

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

.detail-tags span {
  color: #7c2d12;
  background: #fde68a;
}

.player-section {
  margin-top: -8px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #120b08;
  box-shadow: 0 30px 80px rgba(20, 8, 4, 0.32);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.36), rgba(0, 0, 0, 0.62));
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  color: #7c2d12;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

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

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 46px rgba(120, 53, 15, 0.1);
}

.detail-content h2 {
  margin: 0 0 14px;
  color: var(--primary-dark);
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: #4b3328;
  line-height: 2;
}

.site-footer {
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, #25150f, #120b08);
}

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

.site-footer h2 {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 20px;
}

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

.site-footer a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.56);
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

@media (max-width: 860px) {
  .hero,
  .hero-track {
    min-height: 760px;
  }

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

  .hero-poster {
    justify-self: start;
    width: min(68vw, 280px);
    order: -1;
  }

  .intro-panel,
  .split-layout,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }

  .ranking-row {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .heat-pill {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
  }

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

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

  .hero,
  .detail-hero,
  .page-hero {
    border-radius: 24px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-poster {
    width: min(82vw, 240px);
  }

  .intro-panel,
  .detail-content article,
  .ranking-card,
  .search-panel {
    padding: 20px;
  }

  .home-search {
    flex-direction: column;
  }

  .home-search button {
    min-height: 48px;
  }

  .movie-grid.large,
  .movie-grid {
    grid-template-columns: 1fr;
  }

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