:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #eef2ff;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-dark: #b45309;
  --rose: #f43f5e;
  --cyan: #0891b2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(253, 230, 138, 0.65), transparent 32rem),
    radial-gradient(circle at top right, rgba(224, 242, 254, 0.9), transparent 34rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fff7ed, #e0f2fe);
}

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

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

.site-logo {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(120deg, var(--brand-dark), var(--rose), var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
}

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

.nav-link {
  padding: 9px 15px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(120deg, var(--brand), var(--rose));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #9a3412;
  border-radius: 99px;
}

.hero-section {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 610px;
  margin: 32px auto 0;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #fff7ed, #fff1f2 48%, #ecfeff);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(251, 146, 60, 0.32), transparent 24rem),
    radial-gradient(circle at 82% 20%, rgba(14, 165, 233, 0.24), transparent 22rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
}

.hero-carousel {
  position: relative;
  min-height: 610px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 40px;
  padding: 58px;
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 999px;
  color: #9a3412;
  background: rgba(255, 247, 237, 0.82);
  font-weight: 800;
  font-size: 14px;
}

.hero-copy h1,
.sub-hero h1,
.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p,
.sub-hero p,
.detail-one-line {
  max-width: 720px;
  color: #4b5563;
  font-size: 18px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(120deg, var(--brand), var(--rose));
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.26);
}

.ghost-btn {
  color: #9a3412;
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

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

.hero-poster {
  position: relative;
  display: block;
  height: 470px;
  border: 10px solid rgba(255, 255, 255, 0.75);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.28), transparent 50%);
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 36px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(154, 52, 18, 0.22);
  cursor: pointer;
  transition: 0.22s ease;
}

.hero-dot.active {
  width: 58px;
  background: linear-gradient(120deg, var(--brand), var(--rose));
}

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

.compact-section {
  margin-top: 32px;
  margin-bottom: 32px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.section-link {
  flex: 0 0 auto;
  color: #c2410c;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.13);
}

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

.poster-link img {
  transition: transform 0.3s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(120deg, #f59e0b, #e11d48);
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.25);
}

.card-body {
  padding: 17px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f6;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #0e7490;
  background: rgba(236, 254, 255, 0.9);
}

.movie-card.compact .card-body {
  padding: 14px;
}

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

.search-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.search-panel label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 900;
}

.search-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  outline: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.search-panel input:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 14px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 900;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  color: #ffffff;
  background: linear-gradient(120deg, var(--brand), var(--rose));
  border-color: transparent;
}

.empty-result {
  display: none;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.search-panel.empty .empty-result {
  display: block;
}

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

.category-card,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 24px;
  background: #111827;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-card img,
.category-overview-card img {
  position: absolute;
  inset: 0;
  opacity: 0.58;
  transition: transform 0.3s ease;
}

.category-card:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
}

.category-card::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.88), transparent);
}

.category-card span,
.category-card strong,
.category-overview-card div {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
}

.category-card span {
  bottom: 74px;
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.category-overview-card div {
  bottom: 22px;
}

.category-overview-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
  font-weight: 900;
}

.category-overview-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.sub-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 58px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 46%, #ecfeff);
  box-shadow: var(--shadow);
}

.sub-hero h1 {
  margin-bottom: 12px;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
}

.detail-poster {
  overflow: hidden;
  min-height: 520px;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #ffedd5, #e0f2fe);
}

.detail-info {
  padding: 44px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: #c2410c;
}

.detail-info h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.detail-meta {
  margin-top: 22px;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.58));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 7px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand), var(--rose));
  box-shadow: 0 18px 44px rgba(244, 63, 94, 0.32);
  font-size: 34px;
}

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

.detail-content {
  margin-top: 40px;
}

.movie-article {
  padding: 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.movie-article h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.movie-article h2:not(:first-child) {
  margin-top: 28px;
}

.movie-article p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.site-footer {
  margin-top: 70px;
  padding: 38px 0;
  background: #111827;
  color: #e5e7eb;
}

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

.footer-inner strong {
  font-size: 22px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: #9ca3af;
}

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

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

@media (max-width: 980px) {
  .mobile-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

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

  .hero-section,
  .hero-carousel {
    min-height: 820px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .hero-poster {
    height: 360px;
  }

  .hero-dots {
    left: 34px;
  }

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

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

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

  .detail-poster {
    min-height: 440px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .content-section,
  .sub-hero,
  .detail-hero,
  .player-section,
  .footer-inner,
  .hero-section {
    width: min(100% - 22px, 1180px);
  }

  .hero-section,
  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide,
  .sub-hero,
  .detail-info,
  .movie-article {
    padding: 24px;
  }

  .hero-copy h1,
  .sub-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-copy p,
  .sub-hero p,
  .detail-one-line {
    font-size: 16px;
  }

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

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

  .detail-poster {
    min-height: 380px;
  }

  .play-layer span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
