:root {
  --rose: #e11d48;
  --rose-dark: #be123c;
  --orange: #f97316;
  --amber: #f59e0b;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --dark: #0f172a;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  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;
  background: linear-gradient(90deg, var(--rose), var(--orange), var(--amber));
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(190, 18, 60, 0.26);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  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__icon,
.footer-brand span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--rose);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.brand__text {
  white-space: nowrap;
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

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

.header-search input,
.mobile-search input,
.search-page-form input,
.toolbar input,
.toolbar select {
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
  border-radius: 999px;
}

.header-search input {
  width: 230px;
  padding: 9px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--rose);
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  background: rgba(190, 18, 60, 0.96);
  backdrop-filter: blur(12px);
}

.mobile-panel.is-open {
  display: block;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 16px 0 8px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-links {
  display: grid;
  gap: 6px;
  padding: 8px 0 18px;
}

.mobile-links a {
  padding: 9px 0;
  font-weight: 700;
}

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

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

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

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

.hero-slide__mask,
.detail-hero__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-slide__content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  max-width: 1180px;
}

.hero-slide__content > * {
  max-width: 700px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 5px 15px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

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

.hero p,
.detail-hero p,
.page-hero p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.hero-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-weight: 650;
}

.hero-actions,
.callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

.button--primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  box-shadow: 0 14px 30px rgba(225, 29, 72, 0.28);
}

.button--ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.button--light {
  color: var(--orange);
  background: #ffffff;
}

.button--outline {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-control:hover {
  background: rgba(255, 255, 255, 0.28);
}

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

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

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

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

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

.section {
  padding: 56px 0;
}

.section--tint {
  background: linear-gradient(90deg, #fff1f2, #fff7ed);
}

.section--dark {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #020617);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-title span {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rose), var(--orange));
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title a {
  margin-left: auto;
  color: var(--orange);
  font-weight: 800;
}

.section-title--light a {
  color: #fdba74;
}

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

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

.category-card {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--category-gradient);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  mix-blend-mode: luminosity;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.48;
}

.category-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.1));
}

.category-card__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-height: 168px;
  padding: 22px;
}

.category-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.category-card em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-style: normal;
  font-size: 14px;
}

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

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

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

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.section--dark .movie-card {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: none;
}

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

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card--compact .movie-card__cover {
  aspect-ratio: 2 / 3;
}

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

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

.movie-card__cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.68));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.movie-card__region,
.movie-card__type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.movie-card__region {
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  background: var(--orange);
}

.movie-card__type {
  left: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 10px;
  left: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.32);
}

.movie-card__body {
  padding: 16px;
}

.movie-card__body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card__body h3 a:hover {
  color: var(--orange);
}

.movie-card__body p {
  display: -webkit-box;
  height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.section--dark .movie-card__body p {
  color: rgba(255, 255, 255, 0.62);
}

.movie-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span,
.detail-tags a {
  border-radius: 999px;
  padding: 4px 9px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
}

.section--dark .tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.callout {
  border-radius: 28px;
  padding: clamp(32px, 6vw, 58px);
  color: #ffffff;
  text-align: center;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  box-shadow: 0 24px 54px rgba(225, 29, 72, 0.22);
}

.callout h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.callout p {
  max-width: 720px;
  margin: 14px auto 28px;
  color: rgba(255, 255, 255, 0.84);
}

.callout__actions {
  justify-content: center;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange), var(--amber));
  padding: 54px 0 62px;
}

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

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

.breadcrumb strong {
  color: #ffffff;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.toolbar input,
.toolbar select,
.search-page-form input {
  border: 1px solid var(--line);
  padding: 12px 16px;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.toolbar input {
  flex: 1 1 260px;
}

.toolbar select {
  min-width: 160px;
}

.detail-hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.detail-hero__content {
  position: relative;
  z-index: 1;
  padding: 48px 0;
}

.breadcrumb--light {
  color: rgba(255, 255, 255, 0.78);
}

.detail-title-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 260px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding-top: 46px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.18);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 18px 44px rgba(225, 29, 72, 0.34);
  font-size: 34px;
  padding-left: 4px;
}

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

.content-card,
.side-card {
  margin-top: 24px;
  border-radius: 20px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.detail-tags a:hover {
  color: var(--orange);
  background: #fff7ed;
}

.side-card {
  position: sticky;
  top: 88px;
  margin-top: 0;
}

.side-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.side-card dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-page-form input {
  min-width: 0;
  flex: 1;
  border-radius: 999px;
}

.search-status {
  min-height: 24px;
  margin-bottom: 22px;
  color: var(--muted);
}

.site-footer {
  margin-top: 58px;
  color: #e5e7eb;
  background: linear-gradient(180deg, #111827, #020617);
}

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

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

.footer-grid p {
  max-width: 380px;
  color: #9ca3af;
}

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

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

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

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

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

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

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

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-control {
    display: none;
  }

  .detail-title-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    display: none;
  }

  .side-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    height: 58px;
  }

  .brand__text {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
    height: 78vh;
  }

  .hero-slide__mask,
  .detail-hero__mask {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.58));
  }

  .hero-slide__content {
    top: 54%;
  }

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

  .movie-card__body {
    padding: 12px;
  }

  .movie-card__body h3 {
    font-size: 16px;
  }

  .section {
    padding: 42px 0;
  }

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

  .section-title a {
    display: none;
  }

  .search-page-form {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid--wide,
  .poster-grid,
  .category-grid,
  .category-grid--large {
    grid-template-columns: 1fr;
  }

  .hero-meta span {
    font-size: 13px;
  }

  .toolbar {
    display: grid;
  }

  .toolbar select {
    width: 100%;
  }
}
