* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --dark: #09090b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #fff7ed 100%);
}

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

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

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

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  color: #ffffff;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #fb923c, #ef4444);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 9px 15px;
  color: #4b5563;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: var(--brand);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #111827;
  font-size: 24px;
  background: transparent;
}

.hero-carousel {
  position: relative;
  height: min(72vh, 660px);
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(249, 115, 22, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.16));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1220px) / 2 + 20px));
  width: min(650px, calc(100% - 48px));
  color: #ffffff;
  transform: translateY(-50%);
}

.hero-kicker {
  display: inline-flex;
  padding: 8px 16px;
  margin-bottom: 20px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--brand);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #374151;
  font-size: 13px;
  border-radius: 999px;
  background: #f3f4f6;
}

.hero-meta span,
.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.35);
}

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

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  font-size: 34px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

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

.quick-search,
.category-strip,
.content-section,
.watch-section,
.detail-text,
.ranking-list {
  margin: 44px 0;
}

.quick-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.watch-section h2,
.detail-text h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.quick-search p,
.section-head p,
.page-hero p,
.movie-desc,
.category-overview-card p,
.footer-inner p,
.detail-one-line,
.detail-text p {
  color: var(--muted);
  line-height: 1.75;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(430px, 100%);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.search-box span {
  color: var(--brand);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
  background: transparent;
}

.dark-search {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.dark-search input,
.dark-search span {
  color: #ffffff;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.section-head p {
  margin: 8px 0 0;
}

.section-more {
  color: var(--brand);
  background: #fff7ed;
}

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

.category-card,
.category-overview-card {
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.category-card span,
.category-overview-title {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 800;
}

.category-card p,
.category-overview-card p {
  margin: 0 0 12px;
  font-size: 14px;
}

.category-samples,
.category-overview-card ul {
  display: grid;
  gap: 5px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 13px;
  color: var(--brand-dark);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.poster,
.list-cover,
.rank-cover,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #f97316);
}

.poster {
  aspect-ratio: 3 / 4;
}

.poster img,
.list-cover img,
.rank-cover img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

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

.movie-title {
  display: inline-block;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.movie-title:hover {
  color: var(--brand-dark);
}

.movie-meta {
  margin: 8px 0;
  color: #6b7280;
  font-size: 13px;
}

.movie-desc {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.movie-list-card {
  display: grid;
  grid-template-columns: 170px 1fr;
}

.list-cover {
  min-height: 220px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 220px;
  padding: 40px;
  margin: 36px 0;
  color: #ffffff;
  border-radius: 32px;
  background:
    radial-gradient(circle at 86% 18%, rgba(251, 146, 60, 0.4), transparent 34%),
    linear-gradient(135deg, #111827, #1f2937 55%, #7c2d12);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
}

.page-hero p {
  max-width: 700px;
  margin: 12px 0 0;
  color: #e5e7eb;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 96px 1fr 90px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  transition: 0.2s ease;
}

.rank-index {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #4b5563;
  font-size: 18px;
  font-weight: 900;
  border-radius: 15px;
  background: #f3f4f6;
}

.rank-index.top {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-cover {
  height: 124px;
  border-radius: 16px;
}

.heat-score {
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 900;
  text-align: right;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: #6b7280;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  padding: 34px;
  color: #ffffff;
  border-radius: 34px;
  background:
    radial-gradient(circle at 76% 20%, rgba(249, 115, 22, 0.34), transparent 28%),
    linear-gradient(135deg, #111827, #1f2937 60%, #431407);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta-grid div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta-grid span {
  display: block;
  margin-bottom: 5px;
  color: #cbd5e1;
  font-size: 12px;
}

.detail-meta-grid strong {
  font-size: 15px;
}

.large-meta {
  color: #e5e7eb;
}

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

.detail-info .btn-primary {
  margin-top: 28px;
}

.watch-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
}

.play-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  font-size: 30px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.35);
}

.detail-text {
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
}

.detail-text p {
  margin: 0;
  font-size: 16px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.footer-brand {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

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

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

@media (max-width: 760px) {
  .site-header-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 12px;
  }

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

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

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    left: 22px;
    width: calc(100% - 44px);
  }

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

  .hero-control {
    display: none;
  }

  main,
  .page-main,
  .detail-main {
    width: min(100% - 28px, 1220px);
  }

  .quick-search,
  .page-hero,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    padding: 28px;
  }

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

  .movie-list-card,
  .detail-hero,
  .rank-row,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-row {
    align-items: start;
  }

  .rank-cover {
    width: 140px;
  }

  .heat-score {
    text-align: left;
  }

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