:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-500: #64748b;
  --color-slate-300: #cbd5e1;
  --color-red-600: #dc2626;
  --color-red-500: #ef4444;
  --color-red-400: #f87171;
  --color-amber-300: #fcd34d;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #1e293b 0%, #334155 48%, #1e293b 100%);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
}

.header-inner {
  max-width: 1240px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  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 {
  font-size: 24px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red-500), var(--color-red-400));
  box-shadow: 0 12px 22px rgba(239, 68, 68, 0.34);
  font-size: 15px;
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

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

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.95);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.channel-strip {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.channel-strip::-webkit-scrollbar {
  display: none;
}

.channel-strip a {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.channel-strip a:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.78);
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
}

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

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

main {
  overflow: hidden;
}

.hero {
  position: relative;
  height: 560px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.48), transparent 32%), linear-gradient(135deg, #020617, #450a0a 55%, #0f172a);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-image {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(48vw, 580px);
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
  opacity: 0.88;
  mask-image: linear-gradient(90deg, transparent 0%, #000000 28%);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.14) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 90px 22px 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
}

.hero-content p {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

.hero-eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--color-red-400);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red-500), var(--color-red-600));
  box-shadow: 0 18px 30px rgba(220, 38, 38, 0.34);
}

.button-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-tags,
.detail-tags,
.quick-links,
.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.tag,
.quick-links a,
.filter-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

.tag:hover,
.quick-links a:hover,
.filter-links a:hover {
  background: rgba(239, 68, 68, 0.82);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--color-red-500);
}

.search-panel {
  width: min(1180px, calc(100% - 44px));
  margin: -42px auto 0;
  position: relative;
  z-index: 5;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.search-form input,
.advanced-search input,
.advanced-search select,
.filter-bar input {
  width: 100%;
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: none;
  padding: 0 16px;
  background: #ffffff;
  color: var(--color-slate-900);
}

.search-form input:focus,
.advanced-search input:focus,
.advanced-search select:focus,
.filter-bar input:focus {
  border-color: var(--color-red-400);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.16);
}

.search-form button {
  min-width: 132px;
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red-500), var(--color-red-600));
  font-weight: 800;
  cursor: pointer;
}

.quick-links {
  margin-top: 14px;
}

.quick-links a,
.filter-links a {
  color: var(--color-slate-700);
  background: #f1f5f9;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 74px 22px 0;
}

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

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

.section-heading p {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--color-slate-500);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  color: var(--color-red-600);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
}

.poster-year {
  right: 10px;
  top: 10px;
  min-width: 52px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-red-500), var(--color-red-600));
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
  font-size: 14px;
}

.movie-info {
  padding: 14px 14px 16px;
}

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--color-slate-900);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-line {
  min-height: 42px;
  margin: 8px 0 10px;
  color: var(--color-slate-500);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--color-slate-500);
  font-size: 12px;
}

.movie-meta span:last-child {
  color: var(--color-red-600);
  font-weight: 800;
}

.movie-tags-text {
  margin: 8px 0 0;
  color: var(--color-slate-500);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.category-tile {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 128px;
  overflow: hidden;
  background: var(--color-slate-900);
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.category-copy {
  padding: 20px;
}

.category-copy h2 {
  margin: 0;
  font-size: 22px;
}

.category-copy p {
  min-height: 52px;
  margin: 8px 0 16px;
  color: var(--color-slate-500);
  line-height: 1.7;
}

.category-copy span {
  color: var(--color-red-600);
  font-weight: 800;
}

.callout {
  max-width: 1240px;
  margin: 74px auto;
  padding: 34px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red-500), #991b1b);
  box-shadow: 0 24px 60px rgba(220, 38, 38, 0.26);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.callout p,
.callout h2,
.callout span {
  margin: 0;
}

.callout p {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 800;
}

.callout h2 {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 40px);
}

.callout span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background: radial-gradient(circle at 18% 10%, rgba(239, 68, 68, 0.45), transparent 28%), linear-gradient(135deg, #020617 0%, #1e293b 56%, #450a0a 100%);
}

.page-hero {
  min-height: 320px;
  padding: 80px 22px;
  display: grid;
  place-items: center;
  text-align: center;
}

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

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

.page-hero p:not(.hero-eyebrow) {
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.85;
}

.slim-hero {
  min-height: 280px;
}

.filter-section {
  padding-top: 42px;
}

.filter-bar,
.advanced-search {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  align-items: center;
  gap: 18px;
}

.advanced-search {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 76px max(22px, calc((100vw - 1240px) / 2 + 22px));
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb span {
  color: #ffffff;
}

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

.detail-one-line {
  max-width: 800px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin-top: 18px;
}

.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 22px 0;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red-500), var(--color-red-600));
  box-shadow: 0 18px 35px rgba(220, 38, 38, 0.38);
  font-size: 34px;
}

.detail-text {
  max-width: 940px;
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.detail-text h2:not(:first-child) {
  margin-top: 32px;
}

.detail-text p {
  margin: 0;
  color: var(--color-slate-700);
  font-size: 17px;
  line-height: 2;
}

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

.search-page-section {
  padding-top: 48px;
}

.site-footer {
  margin-top: 78px;
  color: var(--color-slate-300);
  background: var(--color-slate-950);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
}

.footer-inner p {
  max-width: 430px;
  margin: 14px 0 0;
  color: var(--color-slate-300);
  line-height: 1.8;
}

.footer-inner h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--color-slate-300);
}

.footer-links a:hover {
  color: var(--color-red-400);
}

.footer-bottom {
  padding: 18px 22px 28px;
  color: var(--color-slate-500);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1180px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .desktop-nav,
  .channel-strip {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero {
    height: 680px;
  }

  .hero-image {
    width: 100%;
    height: 48%;
    inset: auto 0 0;
    mask-image: linear-gradient(180deg, transparent 0%, #000000 34%);
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.88) 58%, rgba(15, 23, 42, 0.46) 100%);
  }

  .hero-content {
    justify-content: flex-start;
    padding-top: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .search-form,
  .filter-bar,
  .advanced-search,
  .detail-hero,
  .footer-inner,
  .callout {
    grid-template-columns: 1fr;
  }

  .callout {
    display: grid;
    margin-left: 22px;
    margin-right: 22px;
  }

  .detail-hero {
    padding-top: 46px;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 620px;
  }

  .hero-content h1,
  .hero-content h2,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-content p,
  .page-hero p:not(.hero-eyebrow),
  .detail-one-line {
    font-size: 16px;
  }

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

  .movie-grid,
  .related-grid,
  .category-grid,
  .category-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-line {
    display: none;
  }

  .category-covers {
    height: 96px;
  }

  .category-copy {
    padding: 16px;
  }

  .category-copy p {
    min-height: 0;
  }

  .play-circle {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
