:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffaf5;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --primary-soft: #ffedd5;
  --accent: #fb923c;
  --shadow: 0 22px 50px rgba(194, 65, 12, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.25), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 46%, #fff7ed 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 247, 237, 0.88);
  border-bottom: 1px solid rgba(251, 146, 60, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 15px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

.logo-text {
  font-size: 1.28rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.nav-link {
  padding: 10px 14px;
  color: #7c2d12;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: var(--primary);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px;
  background: #ffffff;
  border: 1px solid rgba(251, 146, 60, 0.32);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.08);
}

.header-search input,
.large-search input,
.local-filter {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input {
  width: 220px;
  padding: 8px 4px 8px 12px;
}

.header-search button,
.large-search button {
  color: #ffffff;
  background: var(--primary);
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  cursor: pointer;
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-soft);
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.55) 46%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.72), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 150px 0 90px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content .eyebrow,
.page-hero .eyebrow,
.movie-detail-hero .eyebrow {
  color: #fed7aa;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.14rem;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 16px 34px rgba(234, 88, 12, 0.28);
}

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

.ghost-button {
  min-height: 46px;
  padding: 0 20px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section {
  padding: 72px 0;
}

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

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading h2,
.panel-title h2,
.text-panel h2 {
  margin: 0;
  color: #7c2d12;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 10px 16px;
}

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

.category-tile,
.category-card a {
  position: relative;
  display: block;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(124, 45, 18, 0.86), rgba(124, 45, 18, 0.08));
}

.category-tile:hover img,
.movie-card:hover img,
.compact-card:hover img,
.rank-row:hover img {
  transform: scale(1.06);
}

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  color: #ffffff;
}

.category-tile span {
  bottom: 56px;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(124, 45, 18, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(234, 88, 12, 0.55);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #fed7aa;
}

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

.heat-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(194, 65, 12, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0;
  color: #7c2d12;
  font-size: 1.05rem;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 54px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.ranking-panel,
.text-panel,
.player-shell,
.category-card a {
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 98px;
  padding: 22px;
}

.compact-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.compact-card img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.compact-card strong,
.compact-card small {
  display: block;
}

.compact-card strong {
  color: #7c2d12;
  line-height: 1.3;
}

.compact-card small {
  margin-top: 4px;
  color: var(--muted);
}

.rank-num {
  color: var(--primary);
  font-weight: 900;
}

.primary-button.full {
  width: 100%;
}

.category-block {
  margin-top: 28px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.block-title h3 {
  margin: 0;
  color: #7c2d12;
  font-size: 1.35rem;
}

.block-title a {
  color: var(--primary-dark);
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(124, 45, 18, 0.96), rgba(234, 88, 12, 0.82)),
    radial-gradient(circle at top right, rgba(254, 215, 170, 0.7), transparent 24rem);
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.06rem;
}

.filter-bar,
.large-search {
  display: flex;
  gap: 12px;
  width: min(720px, 100%);
  margin-top: 26px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.local-filter,
.large-search input {
  min-height: 48px;
  padding: 0 18px;
  color: #ffffff;
}

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

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

.category-card a {
  padding: 20px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.category-card h2 {
  margin: 0;
  color: #7c2d12;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 72px 86px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(124, 45, 18, 0.06);
}

.big-rank {
  color: var(--primary);
  font-size: 1.9rem;
  font-weight: 950;
}

.rank-row img {
  width: 86px;
  height: 116px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.25s ease;
}

.rank-info strong,
.rank-info small,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: #7c2d12;
  font-size: 1.16rem;
}

.rank-info small,
.rank-info em {
  color: var(--muted);
}

.rank-info em {
  margin-top: 6px;
  font-style: normal;
}

.rank-heat {
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.movie-detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(4px);
  transform: scale(1.04);
}

.movie-detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.62)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.96), transparent 48%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  width: 310px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.detail-one-line {
  max-width: 780px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.14rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

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

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

.player-section {
  padding-top: 56px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.32));
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 20px 45px rgba(234, 88, 12, 0.35);
  font-size: 2.4rem;
  text-indent: 6px;
}

.player-cover strong {
  font-size: 1.4rem;
}

.player-cover small {
  color: rgba(255, 255, 255, 0.78);
}

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

.text-panel {
  padding: 28px;
}

.text-panel p:last-child {
  margin: 14px 0 0;
  color: #4b5563;
  font-size: 1.02rem;
}

.site-footer {
  padding: 52px 0;
  color: #7c2d12;
  background: #ffedd5;
  border-top: 1px solid rgba(251, 146, 60, 0.24);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 34px;
  align-items: start;
}

.footer-logo {
  font-size: 1.35rem;
}

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  color: #9a3412;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-weight: 800;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .menu-button {
    display: block;
  }

  .main-nav,
  .header-search {
    position: absolute;
    left: 16px;
    right: 16px;
    display: none;
    margin: 0;
  }

  .main-nav {
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .header-search {
    top: 278px;
    background: #ffffff;
  }

  .site-header.nav-open .main-nav,
  .site-header.nav-open .header-search {
    display: flex;
  }

  .header-search input {
    width: 100%;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 118px;
  }

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

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

  .detail-poster {
    width: min(260px, 78vw);
  }

  .rank-row a {
    grid-template-columns: 48px 70px 1fr;
  }

  .rank-heat {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .filter-bar,
  .large-search {
    border-radius: 24px;
    flex-direction: column;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .section {
    padding: 48px 0;
  }

  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-page-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .section-heading,
  .block-title {
    align-items: stretch;
    flex-direction: column;
  }

  .category-block {
    padding: 16px;
  }

  .compact-card {
    grid-template-columns: 42px 54px 1fr;
  }
}
