:root {
  --brand: #ea580c;
  --brand-deep: #dc2626;
  --brand-soft: #fed7aa;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --bg: #f9fafb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  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(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #ea580c, #dc2626);
  color: #fff;
  box-shadow: 0 8px 26px rgba(220, 38, 38, 0.25);
}

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

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

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand__name {
  font-size: 24px;
  white-space: nowrap;
}

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

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

.desktop-nav a:hover {
  color: #fef3c7;
  opacity: 1;
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 4px;
  min-width: 240px;
}

.header-search input,
.search-page-form input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
  width: 100%;
  font-size: 15px;
}

.header-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 10px;
  flex-wrap: wrap;
}

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

.mobile-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide__image,
.detail-hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #7c2d12);
}

.hero-slide__shade,
.detail-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.45), rgba(234, 88, 12, 0.18));
}

.hero-slide__content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
  color: #fff;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.sub-hero h1,
.detail-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p,
.sub-hero p,
.detail-hero p {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-tags,
.detail-meta,
.detail-tags,
.movie-card__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-card__tags span {
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, #f97316, #dc2626);
  color: #fff;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

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

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

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

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

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

.section-block {
  padding: 56px 0;
}

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

.section-title h2,
.latest-panel h2,
.side-card h2,
.content-card h2,
.player-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

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

.section-more {
  color: #ea580c;
  font-weight: 800;
}

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

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

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

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

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

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #dc2626);
}

.movie-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-card__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(234, 88, 12, 0.9);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.32);
}

.movie-card__body {
  padding: 16px;
}

.movie-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-card__body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 44px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.movie-card__tags span {
  background: #fff7ed;
  color: #c2410c;
}

.movie-card__category {
  display: inline-flex;
  margin-top: 12px;
  color: #ea580c;
  font-size: 14px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.28);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #dc2626);
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile__image,
.category-overview-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(234, 88, 12, 0.14));
}

.category-tile span,
.category-tile small,
.category-overview-card span,
.category-overview-card p {
  position: relative;
  z-index: 1;
}

.category-tile span,
.category-overview-card span {
  font-size: 24px;
  font-weight: 900;
}

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

.two-column-layout,
.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.latest-panel,
.side-card,
.content-card,
.player-card {
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.latest-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.latest-list,
.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.latest-row,
.rank-row {
  display: grid;
  grid-template-columns: 38px 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: #fff7ed;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row {
  grid-template-columns: 42px 110px 1fr;
  background: #fff;
  border: 1px solid var(--line);
}

.latest-row:hover,
.rank-row:hover {
  background: #ffedd5;
  transform: translateX(3px);
}

.latest-row span,
.rank-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ea580c;
  color: #fff;
  font-weight: 900;
}

.latest-row__image,
.rank-row__image {
  width: 92px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  background: #fed7aa;
}

.rank-row__image {
  width: 110px;
  height: 68px;
}

.latest-row strong,
.rank-row strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.latest-row em,
.rank-row em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sub-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 30%, rgba(254, 215, 170, 0.32), transparent 32%), linear-gradient(120deg, #ea580c, #dc2626 58%, #7f1d1d);
  padding: 72px 0;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar a,
.search-filters button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
  cursor: pointer;
}

.search-filters button.is-active {
  color: #fff;
  background: #ea580c;
}

.search-page-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.search-result-title {
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: #111827;
  color: #fff;
}

.detail-hero__bg,
.detail-hero__shade {
  position: absolute;
  inset: 0;
}

.detail-hero__content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding-bottom: 52px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 44px 0 70px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.content-card,
.side-card {
  padding: 22px;
}

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

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.38);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-overlay:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

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

.detail-info {
  padding-top: 20px;
}

.detail-meta {
  color: var(--muted);
  gap: 14px;
  margin: 10px 0 14px;
}

.detail-tags span {
  color: #c2410c;
  background: #fff7ed;
}

.content-card p {
  margin: 14px 0 0;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 92px;
}

.side-card__grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.side-card .movie-card__body p,
.side-card .movie-card__tags,
.side-card .movie-card__category {
  display: none;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
  padding-top: 44px;
}

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

.site-footer h3 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer p {
  margin: 8px 0 0;
  color: #9ca3af;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  transition: color 0.2s ease;
}

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

.footer-copy {
  margin-top: 34px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

  .two-column-layout,
  .ranking-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .latest-panel,
  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header__inner {
    height: auto;
    min-height: 64px;
    padding: 10px 0;
    flex-wrap: wrap;
  }

  .brand__name {
    font-size: 20px;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .hero-carousel {
    height: 540px;
  }

  .hero-slide__content {
    padding-bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .movie-card__body {
    padding: 13px;
  }

  .movie-card__title {
    font-size: 16px;
  }

  .latest-row,
  .rank-row {
    grid-template-columns: 34px 86px 1fr;
  }

  .latest-row__image,
  .rank-row__image {
    width: 86px;
    height: 54px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .container,
  .site-header__inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-carousel {
    height: 520px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .sub-hero {
    padding: 54px 0;
  }

  .detail-hero {
    height: 380px;
  }
}
