:root {
  --brand-orange: #ea580c;
  --brand-red: #dc2626;
  --brand-gold: #f97316;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: #f3f4f6;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-red));
  box-shadow: 0 10px 30px rgba(185, 28, 28, 0.24);
}

.header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--brand-red);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand-text {
  font-size: 1.25rem;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-panel a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #fed7aa;
  opacity: 1;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-grid input,
.filter-grid select {
  border: 1px solid transparent;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 240px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.search-page-form button,
.intro-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.intro-search button:hover {
  transform: translateY(-1px);
  background: #000000;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

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

.mobile-search input {
  padding: 10px 14px;
}

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 78px;
  color: #ffffff;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand-gold);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-content h1 {
  max-width: 840px;
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #f3f4f6;
  font-size: 1.08rem;
}

.hero-tags,
.detail-tags,
.movie-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px 10px;
  font-size: 0.78rem;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: var(--brand-gold);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

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

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

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 2.1rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.section-block {
  margin-top: 48px;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  padding: 34px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.section-eyebrow {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-red));
}

.intro-panel h2,
.section-heading h2,
.content-card h2,
.player-heading h2 {
  margin: 12px 0 8px;
  color: #1f2937;
  line-height: 1.18;
}

.intro-panel p {
  margin: 0;
  color: var(--muted);
}

.intro-search,
.search-page-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.intro-search input,
.search-page-form input {
  min-width: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  outline: none;
}

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

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading a {
  color: var(--brand-orange);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.16);
}

.movie-card a {
  display: block;
  height: 100%;
}

.movie-poster {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.movie-card-small .movie-poster {
  height: 180px;
}

.movie-card-large .movie-poster {
  height: 360px;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-poster::after {
  opacity: 1;
}

.movie-year,
.movie-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.movie-year {
  right: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-badge {
  left: 12px;
  background: var(--brand-gold);
}

.movie-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: var(--brand-red);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-tags span {
  color: var(--brand-orange);
  background: #fff7ed;
}

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

.category-card,
.category-overview-card,
.content-card,
.filter-panel,
.search-panel,
.player-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  color: #1f2937;
  font-size: 1.08rem;
}

.category-card span {
  color: var(--brand-orange);
  font-weight: 800;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tinted-block {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.category-strip + .category-strip {
  margin-top: 26px;
}

.strip-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.strip-heading h3 {
  margin: 0;
  color: #374151;
}

.strip-heading a:hover {
  color: var(--brand-orange);
}

.strip-heading span {
  color: var(--muted);
  font-weight: 700;
}

.two-column-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

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

.ranking-row {
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ranking-row a {
  display: grid;
  grid-template-columns: auto 124px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.ranking-row img {
  width: 124px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
  font-weight: 900;
}

.ranking-row h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  line-height: 1.35;
}

.ranking-row p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-row span {
  color: #9ca3af;
  font-size: 0.82rem;
}

.sub-hero {
  padding: 70px 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-red));
}

.sub-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.filter-panel,
.search-panel {
  padding: 24px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 16px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.filter-count {
  margin: 16px 0 0;
  color: var(--muted);
}

.filter-count strong {
  color: var(--brand-orange);
}

.category-overview-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card a {
  display: block;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 128px;
  overflow: hidden;
  background: #111827;
}

.category-thumbs img {
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.category-overview-card div:last-child {
  padding: 18px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--brand-orange);
  font-weight: 900;
}

.detail-hero {
  padding: 44px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.42), transparent 34%), linear-gradient(135deg, #111827, #1f2937 55%, #7f1d1d);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #111827;
}

.detail-poster img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

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

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
}

.detail-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 24px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
}

.player-card {
  overflow: hidden;
  padding: 22px;
}

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

.player-heading > span {
  color: var(--muted);
  font-size: 0.92rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: var(--brand-red);
  background: rgba(255, 255, 255, 0.93);
  font-size: 2.4rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.content-card {
  padding: 26px;
}

.content-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

.search-page-form {
  max-width: 820px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-filters button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--brand-orange);
  background: #fff7ed;
  cursor: pointer;
  font-weight: 800;
}

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

.content-card ul {
  margin: 0;
  padding-left: 20px;
}

.content-card li {
  margin: 8px 0;
}

.content-card a:hover {
  color: var(--brand-orange);
}

.sitemap-movies {
  columns: 3 260px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.08rem;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #fdba74;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #9ca3af;
}

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

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

@media (max-width: 960px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-carousel {
    height: 540px;
  }

  .intro-panel,
  .two-column-block,
  .detail-layout,
  .detail-content-grid,
  .sitemap-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content {
    padding-bottom: 66px;
  }

  .hero-arrow {
    display: none;
  }

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

  .intro-panel,
  .tinted-block,
  .filter-panel,
  .search-panel,
  .player-card,
  .content-card {
    border-radius: 18px;
    padding: 18px;
  }

  .intro-search,
  .search-page-form,
  .mobile-search {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .movie-grid-featured,
  .movie-grid-catalog,
  .movie-grid-3,
  .category-card-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-poster,
  .movie-card-small .movie-poster,
  .movie-card-large .movie-poster {
    height: 240px;
  }

  .ranking-row a {
    grid-template-columns: auto 96px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 96px;
    height: 66px;
  }

  .detail-poster img {
    height: 360px;
  }

  .player-overlay span {
    width: 68px;
    height: 68px;
    font-size: 2rem;
  }
}
