:root {
  --bg: #fff7ed;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --orange: #f97316;
  --pink: #ec4899;
  --blue: #3b82f6;
  --shadow: 0 18px 45px rgba(127, 63, 15, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 32rem),
    linear-gradient(135deg, #fff7ed 0%, #fff1f2 45%, #eff6ff 100%);
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 247, 237, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(127, 63, 15, 0.08);
  border-bottom: 1px solid rgba(254, 215, 170, 0.7);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #fdba74, #f472b6);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
}

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}

.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(--orange);
}

.top-search,
.mobile-search,
.hero-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search input,
.mobile-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(236, 72, 153, 0.28);
}

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

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  background: rgba(255, 237, 213, 0.9);
  font-size: 24px;
  color: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(254, 215, 170, 0.8);
}

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

.hero {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 640px;
  margin: 34px auto 0;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

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

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 78px);
  top: 50%;
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.hero-kicker,
.page-hero span,
.section-head span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 58ch;
  margin: 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.hero-tags span,
.detail-meta span,
.card-meta span {
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 13px;
}

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

.hero-side-panel {
  position: absolute;
  right: 36px;
  bottom: 92px;
  width: min(380px, calc(100% - 72px));
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

.hero-side-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.hero-side-panel p {
  margin: 0 0 18px;
  font-size: 14px;
}

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

.hero-category-row a,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.hero-category-row a {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 24, 39, 0.38);
  font-size: 42px;
  line-height: 42px;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

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

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.section-head p,
.page-hero p,
.category-card p,
.category-overview-card p,
.story-block p,
.rank-item p,
.card-body p,
.detail-info p {
  color: var(--muted);
  line-height: 1.75;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(254, 215, 170, 0.75);
}

.filter-panel input {
  flex: 1;
}

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

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

.movie-card,
.category-card,
.category-overview-card,
.rank-item,
.story-block,
.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(254, 215, 170, 0.75);
  box-shadow: 0 12px 32px rgba(127, 63, 15, 0.1);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(249, 115, 22, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fdba74, #f9a8d4, #93c5fd);
}

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

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

.card-badge,
.card-duration {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.card-badge {
  left: 12px;
}

.card-duration {
  right: 12px;
  background: rgba(17, 24, 39, 0.66);
}

.card-body {
  padding: 16px;
}

.card-body h2,
.rank-item h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.rank-item h2 a:hover {
  color: var(--orange);
}

.card-body p {
  min-height: 50px;
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
}

.card-meta span {
  background: #f3f4f6;
  font-size: 12px;
}

.feature-band {
  padding: 34px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(254, 215, 170, 0.7);
}

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

.category-card a,
.category-overview-card a {
  display: block;
  padding: 18px;
}

.category-covers,
.overview-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.overview-images {
  grid-template-columns: repeat(4, 1fr);
}

.category-covers img,
.overview-images img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.category-card h2,
.category-overview-card h2 {
  margin: 0 0 8px;
}

.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  border-radius: 36px;
  padding: clamp(32px, 7vw, 76px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.88), rgba(236, 72, 153, 0.72), rgba(59, 130, 246, 0.65)),
    #111827;
  color: #fff;
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 280px;
}

.category-hero {
  min-height: 360px;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 112px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-thumb img {
  width: 112px;
  height: 78px;
  object-fit: cover;
  border-radius: 18px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.lead-text {
  font-size: 18px;
}

.detail-meta {
  margin: 20px 0;
}

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

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #050505;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 16px 40px rgba(236, 72, 153, 0.35);
}

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

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

.story-block {
  padding: 26px;
}

.story-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-block p {
  margin: 0;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 70px;
  padding: 46px 0 24px;
  background: linear-gradient(90deg, #ffedd5, #fce7f3, #dbeafe);
  border-top: 1px solid rgba(254, 215, 170, 0.8);
}

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

.footer-logo {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer a {
  display: inline-flex;
  margin: 0 12px 10px 0;
  color: #9a3412;
  font-weight: 700;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(251, 146, 60, 0.25);
  text-align: center;
}

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-wrap {
    justify-content: space-between;
  }

  .top-search {
    margin-left: auto;
  }

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

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

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

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

  .hero {
    min-height: 760px;
    border-radius: 28px;
  }

  .hero-content {
    top: 40%;
  }

  .hero-side-panel {
    left: 20px;
    right: 20px;
    bottom: 72px;
    width: auto;
  }

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

  .movie-grid,
  .dense-grid,
  .category-grid,
  .category-overview-grid,
  .compact-rank,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 88px 1fr;
  }

  .rank-thumb img {
    width: 88px;
    height: 70px;
  }

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

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

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

@media (max-width: 520px) {
  .nav-wrap,
  .content-section,
  .page-hero,
  .detail-hero,
  .hero,
  .footer-grid,
  .copyright,
  .player-section {
    width: min(100% - 20px, 1280px);
  }

  .hero {
    min-height: 720px;
  }

  .hero-arrow {
    display: none;
  }

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

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