:root {
  --rose: #e11d48;
  --rose-dark: #be123c;
  --orange: #f97316;
  --amber: #f59e0b;
  --ink: #14121a;
  --muted: #6b7280;
  --surface: #ffffff;
  --soft: #fff7ed;
  --line: rgba(17, 24, 39, 0.09);
  --shadow: 0 24px 70px rgba(88, 28, 135, 0.16);
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #f9fafb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--rose-dark), var(--orange), var(--amber));
  box-shadow: 0 12px 32px rgba(190, 18, 60, 0.22);
}

.header-inner,
.footer-inner,
.section-wrap,
.home-search-panel,
.detail-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-name {
  font-size: 22px;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.top-search input,
.large-search input,
.inline-filter input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.top-search input::placeholder,
.large-search input::placeholder,
.inline-filter input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.top-search button,
.large-search button {
  border: 0;
  border-radius: 999px;
  color: var(--rose-dark);
  background: #fff;
  padding: 8px 16px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  font-size: 26px;
  border: 0;
  background: transparent;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  gap: 42px;
  align-items: center;
  padding: 84px max(32px, calc((100vw - 1180px) / 2)) 72px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1s ease;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.24)), var(--bg-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 28%, rgba(249, 115, 22, 0.32), transparent 30%), radial-gradient(circle at 86% 18%, rgba(225, 29, 72, 0.28), transparent 34%);
}

.hero-content,
.hero-poster,
.detail-copy,
.detail-poster {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin-top: 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
  max-width: 820px;
}

.hero-content p {
  max-width: 680px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.9;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-cloud span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  box-shadow: 0 16px 34px rgba(225, 29, 72, 0.28);
}

.btn.ghost {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
}

.btn.soft {
  color: var(--rose-dark);
  background: #fff;
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img {
  aspect-ratio: 2 / 3;
}

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

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

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

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  margin-top: -46px;
  position: relative;
  z-index: 5;
  padding: 30px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(90deg, var(--rose-dark), var(--orange));
  box-shadow: var(--shadow);
}

.home-search-panel h2 {
  font-size: 32px;
  font-weight: 950;
  margin-bottom: 10px;
}

.home-search-panel p {
  color: rgba(255, 255, 255, 0.84);
}

.large-search,
.inline-filter {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.large-search input,
.inline-filter input {
  flex: 1;
  width: 100%;
  padding-left: 14px;
}

.section-wrap {
  margin-top: 62px;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.content-card h2 {
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(28px, 3vw, 42px);
}

.section-head a {
  color: var(--orange);
  font-weight: 900;
}

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

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

.latest-grid,
.related-grid,
.category-movie-grid,
.search-results {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.15);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fb7185, #fdba74);
}

.poster-frame img {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: #111827;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--orange);
}

.card-meta,
.card-genre,
.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.card-meta {
  margin-top: 8px;
}

.card-genre {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--rose-dark);
  font-weight: 800;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 10px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-hero {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.86)), var(--bg-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
}

.category-tile span,
.category-hero span {
  font-size: 24px;
  font-weight: 950;
}

.category-tile em,
.category-hero em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
  border-radius: 26px;
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
}

.panel-title {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 950;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: #fb923c;
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  color: inherit;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row .rank-meta {
  grid-column: 2;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.64);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
  gap: 32px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 44px;
  border-radius: 32px;
  color: #fff;
  background: radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.16), transparent 32%), linear-gradient(90deg, var(--rose-dark), var(--orange));
  box-shadow: var(--shadow);
}

.slim-hero,
.search-hero {
  grid-template-columns: 1fr;
}

.page-hero h1,
.detail-copy h1 {
  margin-top: 12px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
}

.page-hero p {
  margin-top: 16px;
  max-width: 740px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.category-overview {
  display: grid;
  gap: 26px;
}

.category-preview {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

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

.category-page-hero {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.34)), var(--bg-image);
  background-size: cover;
  background-position: center;
}

.detail-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #fb7185, #fdba74);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
}

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

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

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

.detail-one-line {
  max-width: 820px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.9;
}

.player-card {
  overflow: hidden;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050816;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050816;
}

.video-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
  padding: 16px 34px;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 18px 50px rgba(225, 29, 72, 0.42);
}

.video-start.hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: 26px;
}

.content-card {
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, 0.08);
}

.content-card h2 {
  margin-top: 12px;
  margin-bottom: 18px;
  font-size: 34px;
}

.content-card p {
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

.content-card p + p {
  margin-top: 14px;
}

.pager-links {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.pager-links a {
  flex: 1;
  padding: 18px 20px;
  border-radius: 18px;
  color: var(--rose-dark);
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  font-weight: 900;
}

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

.ranking-list-row a {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.rank-num.big {
  color: var(--orange);
  font-size: 22px;
}

.site-footer {
  margin-top: 80px;
  color: #fff;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(180px, 0.6fr));
  gap: 40px;
  padding: 54px 0;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.62);
}

.footer-brand p {
  margin-top: 16px;
  max-width: 460px;
  line-height: 1.9;
}

.footer-links {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-links h2 {
  margin-bottom: 4px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

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

.footer-bottom {
  padding: 22px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

img.image-missing {
  opacity: 0;
}

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

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

  .split-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 18px 18px;
    background: rgba(190, 18, 60, 0.96);
    backdrop-filter: blur(12px);
  }

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

  .nav-links a {
    padding: 13px 4px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 76vh;
    padding-top: 76px;
  }

  .hero-poster {
    display: none;
  }

  .home-search-panel,
  .page-hero,
  .category-page-hero,
  .category-preview,
  .detail-inner,
  .footer-inner,
  .ranking-list-row a {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .featured-grid,
  .latest-grid,
  .related-grid,
  .category-movie-grid,
  .search-results,
  .preview-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .header-inner,
  .footer-inner,
  .section-wrap,
  .home-search-panel,
  .detail-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 19px;
  }

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

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

  .movie-grid,
  .featured-grid,
  .latest-grid,
  .related-grid,
  .category-movie-grid,
  .search-results,
  .preview-list,
  .category-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .page-hero,
  .home-search-panel,
  .content-card {
    padding: 24px;
  }
}
