:root {
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --amber: #f59e0b;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f9fafb;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 0;
}

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

.brand strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.brand em {
  display: block;
  font-size: 12px;
  font-style: normal;
  opacity: 0.88;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--red);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}

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

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

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #fef08a;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 7px 8px 7px 12px;
}

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

.header-search button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  color: var(--red);
  background: #fff;
  padding: 8px 16px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-shade,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.42), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.66) 42%, rgba(17, 24, 39, 0.32) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.86), rgba(17, 24, 39, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 56px;
  align-items: center;
  min-height: 650px;
  padding: 70px 0 86px;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 24px);
}

.hero-tags,
.detail-tags,
.tag-cloud,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.tag-cloud span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: var(--red);
  background: #fff;
  padding: 13px 26px;
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.18);
}

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

.ghost-btn {
  border: 2px solid rgba(255, 255, 255, 0.62);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  padding: 11px 24px;
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
  overflow: hidden;
  border: 9px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.detail-poster,
.poster-link img,
.category-tile img,
.row-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img,
.detail-poster,
.poster-link img {
  aspect-ratio: 3 / 4;
}

.hero-poster span,
.play-dot {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 18px 32px rgba(236, 72, 153, 0.35);
}

.hero-poster span {
  right: 18px;
  bottom: 18px;
  width: 62px;
  height: 62px;
  font-size: 24px;
}

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

.hero-controls button {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 28px;
}

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

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

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

.section {
  padding: 72px 0;
}

.white-section {
  background: #fff;
}

.soft-section {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.gray-section {
  background: #f3f4f6;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.03em;
}

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

.section-link,
.small-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  padding: 10px 18px;
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  transition: transform 0.5s ease;
}

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

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
}

.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: rgba(239, 68, 68, 0.94);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin-bottom: 7px;
  color: #111827;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.meta-row {
  align-items: center;
  color: #6b7280;
  font-size: 13px;
}

.meta-row a,
.meta-row span {
  color: #ea580c;
  font-weight: 800;
}

.wide-card .poster-link img {
  aspect-ratio: 16 / 9;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  border-radius: 22px;
  isolation: isolate;
  padding: 22px;
  align-content: end;
  color: #fff;
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0.18));
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.category-tile em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: auto 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.row-poster {
  width: 86px;
  overflow: hidden;
  border-radius: 13px;
}

.row-poster img {
  aspect-ratio: 3 / 4;
}

.ranking-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  font-weight: 900;
}

.row-title {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.row-main p {
  margin: 0 0 10px;
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
}

.gradient-page::before,
.category-page-hero::before,
.search-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.23), transparent 24%),
    radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.18), transparent 26%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

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

.filter-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 760px;
  margin: 22px 0 0;
  padding: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-input,
.filter-select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 12px 14px;
}

.search-input {
  flex: 1;
}

.filter-select {
  border-left: 1px solid var(--line);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-image-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.category-image-stack img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
}

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

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.detail-mask {
  background:
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.32), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.68));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 54px 0 74px;
}

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

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.one-line {
  max-width: 860px;
  margin: 18px 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.detail-tags {
  margin-bottom: 18px;
}

.tag-cloud {
  margin-bottom: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #050505;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.06));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  font-size: 34px;
  box-shadow: 0 24px 50px rgba(236, 72, 153, 0.35);
}

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

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

.detail-article,
.detail-side {
  padding: 30px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: 4px 0 16px;
  font-weight: 800;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

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

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

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

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1080px) {
  .header-search {
    min-width: 220px;
  }

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

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

  .hero-content,
  .detail-grid,
  .detail-content-grid,
  .overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    justify-self: start;
    width: min(270px, 76vw);
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .ranking-row .small-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .row-poster {
    width: 72px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .brand strong {
    font-size: 20px;
  }

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

  .hero-content {
    gap: 28px;
    padding-top: 46px;
  }

  .section {
    padding: 50px 0;
  }

  .section-heading {
    display: block;
  }

  .section-link {
    margin-top: 16px;
  }

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

  .filter-panel {
    align-items: stretch;
    border-radius: 24px;
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .ranking-number {
    width: 36px;
    height: 36px;
  }

  .row-poster {
    display: none;
  }

  .ranking-row .small-btn {
    grid-column: 1 / -1;
  }

  .detail-poster {
    width: min(260px, 78vw);
  }

  .detail-article,
  .detail-side {
    padding: 22px;
  }
}
