:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff7ed;
  --accent-soft: #fdf8f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  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(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.nav-shell {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 15px;
  color: #374151;
}

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

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

.global-search,
.mobile-search {
  position: relative;
  width: 230px;
}

.global-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: block;
}

.search-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
}

.search-item:hover {
  background: var(--primary-soft);
}

.search-thumb {
  width: 46px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #f97316);
}

.search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-title {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-meta {
  font-size: 12px;
  color: var(--muted);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 24px;
  padding: 6px 10px;
}

.mobile-nav {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 18px;
  gap: 12px;
  flex-wrap: wrap;
}

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

.mobile-search {
  width: 100%;
}

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

.hero-slide {
  display: none;
  position: relative;
  min-height: 620px;
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.06);
  opacity: 0.48;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.42), transparent 32%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.68) 52%, rgba(17, 24, 39, 0.25));
}

.hero-content {
  max-width: 1200px;
  min-height: 620px;
  margin: 0 auto;
  padding: 72px 22px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 20px 0 18px;
  color: #fff;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.detail-meta span,
.genre-row span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
}

.detail-meta span,
.genre-row span {
  color: #374151;
  background: #fff;
  border: 1px solid var(--line);
}

.hero-actions,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.primary-button {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

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

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.10);
}

.ghost-button.light {
  color: #fff;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #fb923c);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

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

.home-search-band,
.content-section,
.detail-top,
.player-section,
.page-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.home-search-band {
  margin-top: -42px;
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.home-search-band h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.home-search-band h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 38px);
}

.home-search-band p,
.page-hero p,
.detail-copy p,
.detail-article p {
  color: var(--muted);
}

.content-section {
  padding-top: 54px;
}

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-link {
  color: var(--primary-dark);
  font-weight: 800;
}

.section-link span {
  margin-left: 4px;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(249, 115, 22, 0.6), transparent 28%),
    linear-gradient(135deg, #111827, #374151);
}

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

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

.year-badge,
.rank-badge,
.play-mark {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.year-badge {
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.86);
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
  margin: 6px 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

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

.movie-meta-line {
  display: flex;
  gap: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #9a3412;
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.feature-section {
  margin-top: 54px;
  padding-top: 40px;
  padding-bottom: 46px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.ranking-preview .movie-grid,
.side-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card-compact .movie-card-body h3 {
  font-size: 16px;
}

.movie-card-compact .movie-card-body p {
  display: none;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  isolation: isolate;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  transition: transform 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.12), rgba(17, 24, 39, 0.92));
}

.category-tile:hover::before {
  transform: scale(1.08);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: #e5e7eb;
  font-size: 14px;
}

.page-hero {
  margin-top: 38px;
  padding-top: 60px;
  padding-bottom: 60px;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 12%, rgba(249, 115, 22, 0.5), transparent 34%),
    linear-gradient(135deg, #111827, #374151);
}

.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 62px);
}

.page-hero p {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.detail-top {
  padding-top: 34px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--primary-dark);
  font-weight: 700;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff, var(--primary-soft));
  box-shadow: var(--shadow);
}

.large-poster {
  border-radius: 24px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.detail-copy h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

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

.large-tags span {
  font-size: 13px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.26), rgba(0, 0, 0, 0.64));
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
  font-size: 28px;
}

.play-overlay strong {
  font-size: 18px;
}

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

.detail-article,
.detail-side {
  border-radius: 24px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.detail-article h2,
.detail-side h2 {
  margin-top: 0;
}

.detail-article p {
  white-space: pre-line;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: #111827;
}

.footer-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 22px;
}

.footer-shell nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.copyright {
  color: #9ca3af;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .global-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero-poster,
  .large-poster {
    max-width: 360px;
  }

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

@media (max-width: 760px) {
  .nav-shell {
    height: 62px;
    padding: 0 16px;
  }

  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 56px 18px 92px;
    gap: 28px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .home-search-band {
    margin-top: 0;
    border-radius: 0;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .content-section,
  .detail-top,
  .player-section,
  .page-hero,
  .home-search-band {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .detail-hero-grid {
    padding: 20px;
  }
}

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

  .hero-actions,
  .page-hero-actions,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-poster,
  .large-poster {
    max-width: 100%;
  }
}
