:root {
  --primary: #d89410;
  --primary-dark: #b6790d;
  --accent: #f95c16;
  --accent-dark: #ea420c;
  --secondary: #2f344c;
  --secondary-soft: #5f729c;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --text: #151827;
  --muted: #667085;
  --border: #e7e9ef;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fffaf2 0%, #f5f7fa 42%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(231, 233, 239, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(249, 92, 22, 0.25);
}

.brand-text,
.footer-brand {
  font-size: 1.28rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #4b5563;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--primary-dark);
  background: #fff3df;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: #fff3df;
  border-radius: 12px;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

.hero {
  min-height: 74vh;
  background: #111827;
}

.hero-stage {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 16%, rgba(249, 92, 22, 0.44), transparent 28%),
    linear-gradient(90deg, rgba(13, 18, 34, 0.94) 0%, rgba(13, 18, 34, 0.7) 46%, rgba(13, 18, 34, 0.15) 100%),
    linear-gradient(0deg, rgba(13, 18, 34, 0.92) 0%, transparent 44%);
}

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

.hero-kicker,
.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-kicker span,
.detail-kicker,
.tag-row span,
.movie-meta-line,
.page-hero span,
.section-heading span {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-kicker span,
.detail-kicker {
  padding: 6px 12px;
  color: #fffaf2;
  background: rgba(216, 148, 16, 0.88);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-meta,
.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta-grid span {
  padding: 8px 12px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.hero-actions,
.quick-search-inner,
.section-heading,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.ghost-button,
.section-link,
.text-link,
.search-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-bar button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(249, 92, 22, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  font-size: 2.2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.quick-search-panel {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.quick-search-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.quick-search-inner h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
}

.search-bar {
  display: flex;
  min-width: min(100%, 430px);
  flex: 1;
  gap: 10px;
}

.search-bar input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: 0;
}

.search-bar input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(216, 148, 16, 0.14);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.category-pills a {
  padding: 7px 12px;
  color: var(--primary-dark);
  background: #fff3df;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.88rem;
}

.content-section,
.about-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #fff7eb 0%, #ffffff 100%);
}

.dark-section {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  color: #ffffff;
  background: linear-gradient(135deg, var(--secondary) 0%, #111827 100%);
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading span,
.page-hero span {
  color: var(--primary-dark);
  text-transform: uppercase;
}

.dark-section .section-heading span {
  color: #ffd28a;
}

.section-heading h2,
.page-hero h1,
.about-card h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.dark-section .section-heading p {
  color: rgba(255, 255, 255, 0.74);
}

.section-link,
.text-link {
  color: var(--primary-dark);
  background: #fff3df;
}

.movie-grid,
.category-grid,
.category-overview-grid,
.detail-content-grid {
  display: grid;
  gap: 22px;
}

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

.compact-grid,
.ranking-grid,
.search-grid,
.category-movie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(216, 148, 16, 0.36);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.15);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  padding: 5px 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  font-weight: 900;
  text-align: center;
}

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

.movie-card-body h2 {
  margin: 6px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card-body h2 a:hover {
  color: var(--primary-dark);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dark-section .movie-card-body p,
.dark-section .movie-meta-line {
  color: rgba(255, 255, 255, 0.7);
}

.movie-meta-line {
  color: var(--secondary-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--primary-dark);
  background: #fff3df;
  border-radius: 999px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-tile img,
.tile-glow {
  position: absolute;
  inset: 0;
}

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

.category-tile:hover img {
  transform: scale(1.06);
}

.tile-glow {
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.12));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 1.35rem;
}

.category-tile em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.about-card,
.story-card,
.category-overview-card,
.filter-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.about-card {
  padding: clamp(24px, 4vw, 44px);
}

.about-card p,
.story-card p,
.page-hero p,
.category-overview-card p {
  color: var(--muted);
}

.page-main,
.detail-main {
  padding-bottom: 40px;
}

.page-hero {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 72px 16px;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 28% 18%, rgba(249, 92, 22, 0.42), transparent 28%),
    linear-gradient(135deg, var(--secondary) 0%, #111827 100%);
}

.page-hero div {
  max-width: 820px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-collage img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 1.5rem;
}

.filter-panel {
  justify-content: space-between;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  flex: 1 1 220px;
  gap: 8px;
  color: #344054;
  font-weight: 800;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(22px, 5vw, 48px);
  align-items: end;
  padding: clamp(20px, 5vw, 44px);
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 16%, rgba(249, 92, 22, 0.34), transparent 30%),
    linear-gradient(135deg, var(--secondary) 0%, #111827 100%);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
}

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

.player-section {
  padding: 34px 0 0;
}

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

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.16));
  border: 0;
  cursor: pointer;
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 18px 36px rgba(249, 92, 22, 0.42);
  font-size: 1.8rem;
}

.detail-content-grid {
  grid-template-columns: 1.3fr 0.9fr;
  padding: 34px 0 0;
}

.story-card {
  padding: clamp(22px, 3vw, 34px);
}

.story-card h2 {
  margin-bottom: 16px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 40px;
  padding: 48px 16px 28px;
  color: rgba(255, 255, 255, 0.78);
  background: #111827;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.footer-grid p {
  max-width: 520px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #ffd28a;
}

.footer-bottom {
  width: min(1180px, 100%);
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
}

.js-search-card.is-hidden {
  display: none;
}

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

  .category-overview-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    padding: 88px 0 74px;
  }

  .quick-search-inner,
  .search-bar {
    display: grid;
  }

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

  .category-overview-card,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    padding: 14px;
  }

  .category-collage {
    min-height: 180px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .search-grid,
  .category-movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

  .content-section,
  .about-section {
    padding: 48px 0;
  }

  .detail-main,
  .content-section,
  .about-section,
  .nav-shell,
  .mobile-nav,
  .quick-search-inner {
    width: min(100% - 24px, 1180px);
  }
}
