:root {
  --bg: #fff7ed;
  --bg-soft: #fff1f2;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(249, 115, 22, 0.18);
  --card: rgba(255, 255, 255, 0.88);
  --orange: #f97316;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(194, 65, 12, 0.13);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.30), transparent 32rem),
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.22), transparent 34rem),
    linear-gradient(135deg, #fff7ed 0%, #fff1f2 48%, #fffbeb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.lock-scroll {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(255, 247, 237, 0.82);
  border-bottom: 1px solid rgba(249, 115, 22, 0.16);
}

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose), var(--amber));
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.26);
}

.brand-text {
  font-size: 1.08rem;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.18);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.top-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 0.95rem;
}

.top-search input {
  width: 210px;
  padding: 9px 8px 9px 14px;
}

.top-search button,
.mobile-search button,
.btn-primary,
.btn-ghost,
.player-start {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.top-search button,
.mobile-search button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  padding: 10px 18px;
  box-shadow: 0 15px 30px rgba(244, 63, 94, 0.22);
}

.btn-ghost {
  color: #9a3412;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 20px;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.btn-primary:hover,
.btn-ghost:hover,
.top-search button:hover,
.mobile-search button:hover,
.player-start:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #9a3412;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid rgba(249, 115, 22, 0.14);
}

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

.page-shell,
.home-page,
.detail-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  position: relative;
  min-height: 660px;
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #1f2937 0%, #7c2d12 48%, #be123c 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.62) 42%, rgba(17, 24, 39, 0.22) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.65) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(700px, 100%);
  padding: 72px 56px;
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fff7ed;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker {
  color: #ea580c;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  color: #9a3412;
  background: rgba(255, 247, 237, 0.86);
  border: 1px solid rgba(249, 115, 22, 0.22);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.20);
}

.hero-panel {
  position: absolute;
  z-index: 5;
  right: 34px;
  bottom: 34px;
  width: min(520px, calc(100% - 68px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-dot {
  padding: 10px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.active,
.hero-dot:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
}

.hero-dot img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 8px;
}

.hero-dot span {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 54px 0 24px;
}

.section-head h2,
.filter-panel h2,
.category-hero h1,
.detail-copy h1,
.content-block h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  letter-spacing: -0.045em;
}

.section-head p,
.category-hero p,
.detail-copy p,
.content-block p {
  color: var(--muted);
  line-height: 1.85;
}

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

.category-card {
  min-height: 168px;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 45px rgba(194, 65, 12, 0.10);
  border: 1px solid rgba(249, 115, 22, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 65px rgba(194, 65, 12, 0.16);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.28rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 18px 45px rgba(194, 65, 12, 0.10);
  border: 1px solid rgba(249, 115, 22, 0.13);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 70px rgba(194, 65, 12, 0.17);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(244, 63, 94, 0.10));
}

.poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  box-shadow: 0 14px 32px rgba(244, 63, 94, 0.28);
}

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

.card-meta,
.rank-meta,
.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #ea580c;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-meta span,
.rank-meta span,
.info-grid span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 237, 213, 0.85);
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 1.08rem;
  line-height: 1.32;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  min-height: 3.3em;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 54px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(249, 115, 22, 0.13);
  box-shadow: 0 16px 38px rgba(194, 65, 12, 0.10);
}

.rank-index {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--rose));
}

.rank-thumb img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.rank-body p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.category-hero,
.detail-hero,
.search-hero {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 42px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  border: 1px solid rgba(249, 115, 22, 0.14);
}

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

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

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.18);
}

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

.breadcrumb a {
  color: #ea580c;
}

.detail-copy h1 {
  margin-bottom: 18px;
}

.info-grid {
  margin: 20px 0 6px;
}

.player-section,
.content-block,
.related-section,
.filter-panel {
  margin-top: 34px;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 50px rgba(194, 65, 12, 0.10);
  border: 1px solid rgba(249, 115, 22, 0.13);
}

.player-section h2 {
  margin: 0 0 20px;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.26);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.18), rgba(17, 24, 39, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  padding: 16px 28px;
  font-size: 1.02rem;
  box-shadow: 0 20px 40px rgba(244, 63, 94, 0.34);
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
}

.content-block h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.content-block p + h2 {
  margin-top: 26px;
}

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

.filter-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  min-width: 180px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.95);
  border: 1px solid rgba(249, 115, 22, 0.20);
}

.filter-controls input {
  min-width: 320px;
}

.empty-state {
  margin: 22px 0;
  padding: 24px;
  text-align: center;
  border-radius: 24px;
  color: #9a3412;
  background: rgba(255, 237, 213, 0.72);
  font-weight: 800;
}

.site-footer {
  margin-top: 50px;
  padding: 42px 20px;
  background: rgba(17, 24, 39, 0.94);
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.2rem;
}

.footer-inner p {
  max-width: 680px;
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #fff7ed;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    padding: 48px 28px;
  }

  .hero-panel {
    left: 22px;
    right: 22px;
    width: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-controls {
    justify-content: stretch;
  }

  .filter-controls input,
  .filter-controls select {
    width: 100%;
    min-width: 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .page-shell,
  .home-page,
  .detail-page {
    padding: 18px 14px 44px;
  }

  .brand-text {
    font-size: 0.98rem;
  }

  .hero {
    border-radius: 26px;
    min-height: 720px;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .hero h2 {
    font-size: 1.7rem;
  }

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .related-section .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 44px 76px 1fr;
    gap: 10px;
  }

  .category-hero,
  .search-hero,
  .player-section,
  .content-block,
  .related-section,
  .filter-panel {
    padding: 20px;
    border-radius: 24px;
  }
}
