:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --yellow-400: #facc15;
  --yellow-500: #eab308;
  --gray-950: #111827;
  --gray-900: #1f2937;
  --gray-800: #374151;
  --gray-700: #4b5563;
  --gray-600: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-card: 0 18px 35px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 24px 48px rgba(127, 29, 29, 0.2);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: #f8fafc;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--red-600), var(--red-700));
  color: var(--white);
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.25);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--gray-950);
  background: var(--yellow-400);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(250, 204, 21, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.brand:hover {
  color: var(--yellow-400);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: var(--white);
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.page-search-row input {
  width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.nav-search input:focus {
  border-color: var(--yellow-400);
  background: rgba(255, 255, 255, 0.18);
}

.nav-search button,
.btn-primary,
.btn-ghost,
.section-link,
.filter-row button,
.quick-links a {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button,
.btn-primary {
  color: var(--gray-950);
  background: var(--yellow-400);
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.24);
}

.nav-search button:hover,
.btn-primary:hover,
.filter-row button:hover,
.quick-links a:hover {
  transform: translateY(-2px);
  background: var(--yellow-500);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 430px;
  overflow: auto;
  display: none;
  color: var(--gray-900);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
  padding: 12px;
}

.search-panel.is-open {
  display: grid;
  gap: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
}

.search-result:hover {
  background: #fff7ed;
}

.search-result img {
  width: 52px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.search-result strong {
  display: block;
  font-size: 15px;
}

.search-result span {
  display: block;
  margin-top: 3px;
  color: var(--gray-600);
  font-size: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-900), var(--red-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(127, 29, 29, 0.92), rgba(127, 29, 29, 0.62), rgba(17, 24, 39, 0.82)), var(--hero-image);
  background-position: center;
  background-size: cover;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 20%, rgba(250, 204, 21, 0.24), transparent 30%), rgba(0, 0, 0, 0.18);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 570px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 46px;
  align-items: center;
  padding: 66px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--yellow-400);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

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

.hero-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.7;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #7f1d1d;
  background: #fef3c7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster span,
.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 52px;
  background: rgba(0, 0, 0, 0.0);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-poster:hover span,
.movie-card:hover .poster-play {
  opacity: 1;
  background: rgba(0, 0, 0, 0.26);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.hero-controls button:hover,
.hero-dots button.is-active {
  color: var(--gray-950);
  background: var(--yellow-400);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -38px;
  position: relative;
  z-index: 3;
}

.feature-strip a {
  display: grid;
  gap: 5px;
  padding: 22px;
  color: var(--gray-900);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.feature-strip strong {
  color: var(--red-700);
  font-size: 30px;
}

.feature-strip span {
  color: var(--gray-600);
  font-weight: 700;
}

.section {
  padding: 74px 0 0;
}

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

.section-head h2,
.story-card h2,
.category-copy h2 {
  margin: 0;
  color: var(--gray-950);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.category-copy p,
.story-card p {
  margin: 10px 0 0;
  color: var(--gray-600);
  line-height: 1.75;
}

.section-link {
  display: inline-flex;
  align-items: center;
  color: var(--red-700);
  background: #fee2e2;
}

.section-link:hover {
  color: var(--white);
  background: var(--red-700);
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--gray-200);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--gray-950);
  background: var(--yellow-400);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.movie-info {
  padding: 14px;
}

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--gray-950);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-title:hover {
  color: var(--red-700);
}

.movie-meta {
  margin-top: 6px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info p {
  display: -webkit-box;
  min-height: 58px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--red-700);
  background: #fee2e2;
  font-size: 12px;
}

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

.category-tile,
.category-cover {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 24px;
  color: var(--white);
  border-radius: var(--radius-xl);
  background-image: linear-gradient(180deg, rgba(127, 29, 29, 0.14), rgba(15, 23, 42, 0.82)), var(--tile-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span,
.category-cover span {
  font-size: 26px;
  font-weight: 900;
}

.category-tile p {
  max-width: 92%;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  padding: 82px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-900), var(--red-700));
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.26), transparent 28%), rgba(0, 0, 0, 0.16);
}

.page-hero .container {
  position: relative;
}

.page-hero h1 {
  max-width: 850px;
  font-size: clamp(40px, 7vw, 68px);
}

.page-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 19px;
  line-height: 1.8;
}

.category-hero,
.detail-hero {
  background-image: linear-gradient(90deg, rgba(127, 29, 29, 0.94), rgba(127, 29, 29, 0.76), rgba(17, 24, 39, 0.76)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.page-search-row {
  margin-top: 26px;
}

.page-search-row input {
  width: min(520px, 100%);
  border-color: rgba(255, 255, 255, 0.34);
}

.inner-search input {
  color: var(--gray-900);
  background: var(--white);
  border-color: var(--gray-200);
}

.filter-row,
.quick-links {
  margin-top: 18px;
}

.filter-row button,
.quick-links a {
  color: var(--red-700);
  background: #fee2e2;
}

.filter-row button.is-active {
  color: var(--gray-950);
  background: var(--yellow-400);
}

.category-list {
  display: grid;
  gap: 26px;
  padding: 64px 0 0;
}

.category-block {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding: 22px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.category-cover {
  min-height: 250px;
}

.category-copy {
  padding: 14px 0;
}

.mini-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.mini-card {
  overflow: hidden;
  border-radius: 14px;
  background: var(--gray-100);
}

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

.mini-card span {
  display: block;
  overflow: hidden;
  padding: 9px;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-mini-row {
  max-width: 680px;
}

.detail-hero {
  position: relative;
  padding: 48px 0 70px;
  color: var(--white);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.22), transparent 26%), rgba(0, 0, 0, 0.2);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.breadcrumb,
.breadcrumb-sep {
  display: inline-block;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.breadcrumb:hover {
  color: var(--yellow-400);
}

.detail-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
  max-width: 850px;
  font-size: clamp(38px, 6vw, 66px);
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  line-height: 1.75;
}

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

.detail-tags {
  margin: 18px 0 28px;
}

.watch-section {
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.32);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.62));
  border: 0;
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--gray-950);
  background: var(--yellow-400);
  border-radius: 999px;
  font-size: 36px;
  box-shadow: 0 18px 35px rgba(250, 204, 21, 0.32);
}

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

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-top: 42px;
}

.story-card {
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.story-card h2 {
  font-size: 28px;
}

.story-card p {
  color: var(--gray-700);
  font-size: 17px;
}

.detail-nav-row {
  justify-content: space-between;
  padding: 20px;
  background: #fff7ed;
  border-radius: 18px;
}

.detail-nav-row a {
  color: var(--red-700);
  font-weight: 800;
}

.related-section {
  padding-bottom: 30px;
}

.site-footer {
  margin-top: 86px;
  padding: 48px 0;
  color: #d1d5db;
  background: var(--gray-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: var(--white);
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #d1d5db;
}

.site-footer a:hover {
  color: var(--yellow-400);
}

[data-card].is-hidden {
  display: none;
}

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

  .hero-content {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 860px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 8px;
  }

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

  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    flex: 1;
    width: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 48px 0 92px;
  }

  .hero-poster {
    display: none;
  }

  .feature-strip,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .category-block,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .container,
  .section,
  .nav-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .feature-strip,
  .category-grid,
  .footer-grid,
  .mini-row {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding-top: 52px;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info p {
    min-height: 0;
    -webkit-line-clamp: 2;
  }

  .page-hero,
  .detail-hero {
    padding: 58px 0;
  }

  .watch-section {
    margin-top: -24px;
  }

  .story-card {
    padding: 22px;
  }
}
