:root {
  color-scheme: light;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #ffedd5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img,
video {
  display: block;
  width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

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

.brand-name {
  font-size: 21px;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: 0.2s ease;
}

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

.nav-toggle {
  display: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 25%, rgba(249, 115, 22, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.76) 45%, rgba(15, 23, 42, 0.38) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 650px;
  margin: 0 auto;
  padding: 96px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 48px;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--primary);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span,
.movie-badges span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.2s ease;
}

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

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.ghost:hover,
.btn.link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.btn.link {
  color: rgba(255, 255, 255, 0.78);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
  transition: 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-4px);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111827;
}

.hero-poster span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 18px 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), transparent);
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.35);
  font-size: 32px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: var(--primary);
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

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

.home-search-panel,
.page-title-card,
.content-section,
.detail-hero-card,
.player-panel,
.detail-content article {
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.home-search-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 24px;
  padding: 28px;
  margin-bottom: 30px;
}

.home-search-panel h2,
.page-title-card h1,
.section-heading h2,
.detail-copy h1,
.detail-content h2 {
  margin: 10px 0 0;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.home-search-panel h2 {
  font-size: 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 150px 150px;
  gap: 12px;
  align-items: end;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

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

.empty-state {
  display: none;
  padding: 24px;
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  background: #fff7ed;
  border-radius: 16px;
}

.empty-state.show {
  display: block;
}

.content-section {
  padding: 30px;
  margin-top: 30px;
}

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

.section-heading h2 {
  font-size: 28px;
}

.section-heading p,
.page-title-card p,
.category-card p,
.movie-info em,
.detail-copy .lead,
.detail-content p,
.site-footer p {
  color: var(--muted);
}

.section-heading p,
.page-title-card p {
  margin: 8px 0 0;
}

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

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

.movie-card {
  position: relative;
  display: grid;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: var(--shadow);
}

.poster-box {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #f59e0b);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.28);
}

.movie-info {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.movie-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.movie-info em {
  min-height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-style: normal;
  font-size: 14px;
}

.movie-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--primary-dark);
}

.movie-badges span {
  background: var(--primary-soft);
}

.movie-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4b5563;
  font-size: 13px;
}

.small-card {
  grid-template-columns: 98px minmax(0, 1fr);
  min-height: 138px;
}

.small-card .poster-box img {
  height: 100%;
  aspect-ratio: auto;
}

.small-card .movie-info {
  align-content: center;
}

.ranking-strip,
.rank-list {
  display: grid;
  gap: 14px;
}

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

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

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

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

.category-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(249, 115, 22, 0.18);
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 34%),
    linear-gradient(135deg, #fff, #fff7ed);
  transition: 0.22s ease;
}

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

.category-kicker {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.category-card h3 {
  margin: 0;
  font-size: 23px;
}

.category-card p {
  margin: 0;
}

.category-preview {
  display: grid;
  gap: 4px;
  color: #374151;
  font-size: 13px;
}

.category-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-title-card {
  padding: 32px;
  margin-bottom: 26px;
  background:
    radial-gradient(circle at 88% 20%, rgba(249, 115, 22, 0.16), transparent 30%),
    #fff;
}

.page-title-card h1 {
  font-size: clamp(32px, 5vw, 52px);
}

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

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 750;
}

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: #d1d5db;
}

.detail-page {
  max-width: 1180px;
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  padding: 30px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(30px, 5vw, 54px);
}

.detail-copy .lead {
  margin: 18px 0 0;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  color: var(--primary-dark);
}

.detail-meta span,
.tag-row span {
  background: var(--primary-soft);
}

.detail-copy .btn {
  margin-top: 26px;
}

.player-panel {
  margin-top: 28px;
  padding: 18px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.38);
  font-size: 28px;
  text-indent: 4px;
}

.play-layer strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.detail-content article {
  padding: 28px;
}

.detail-content h2 {
  margin-top: 0;
  font-size: 26px;
}

.detail-content p {
  margin: 14px 0 0;
  font-size: 17px;
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 20px;
}

.site-footer p {
  max-width: 700px;
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #fff;
  font-weight: 750;
}

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

@media (max-width: 1080px) {
  .hero-content {
    grid-template-columns: 1fr;
    padding-right: 84px;
  }

  .hero-poster {
    display: none;
  }

  .home-search-panel,
  .detail-hero-card {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .hero {
    min-height: 590px;
  }

  .hero-content {
    min-height: 590px;
    padding: 76px 18px 72px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-nav {
    top: auto;
    bottom: 24px;
    width: 40px;
    height: 40px;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .page-shell {
    padding: 28px 16px 52px;
  }

  .home-search-panel,
  .content-section,
  .page-title-card,
  .detail-hero-card,
  .detail-content article {
    padding: 20px;
    border-radius: 16px;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .category-grid.wide,
  .rank-list,
  .ranking-strip,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .small-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .detail-hero-card {
    gap: 22px;
  }

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

  .play-icon {
    width: 62px;
    height: 62px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .category-grid.wide,
  .rank-list,
  .ranking-strip,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
