:root {
  color-scheme: dark;
  --bg: #080b12;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --rose: #fb4f79;
  --rose-strong: #e11d48;
  --amber: #fbbf24;
  --cyan: #38bdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(225, 29, 72, 0.18), transparent 32rem),
    radial-gradient(circle at 75% 8%, rgba(56, 189, 248, 0.12), transparent 28rem),
    linear-gradient(180deg, #080b12 0%, #0f172a 48%, #080b12 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(8, 11, 18, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose), #7c3aed);
  box-shadow: 0 12px 32px rgba(225, 29, 72, 0.35);
}

.brand-name {
  font-size: 1.08rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.95rem;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(244, 63, 94, 0.16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.home-hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.01);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) brightness(0.58);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 18, 0.96) 0%, rgba(8, 11, 18, 0.72) 48%, rgba(8, 11, 18, 0.34) 100%),
    linear-gradient(0deg, #080b12 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 54px;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  padding: 108px 0 128px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.14);
  color: #fecdd3;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbe3ee;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

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

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: #cbd5e1;
  padding: 6px 11px;
  font-size: 0.82rem;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.search-field button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 0 24px;
  background: linear-gradient(135deg, var(--rose), #7c3aed);
  color: #fff;
  box-shadow: 0 16px 38px rgba(225, 29, 72, 0.34);
}

.ghost-btn,
.section-more {
  padding: 0 20px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.search-field button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.hero-poster::after {
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 72px;
  border-radius: 20px;
  content: "";
  background: linear-gradient(135deg, rgba(251, 79, 121, 0.38), rgba(56, 189, 248, 0.22));
  filter: blur(28px);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
  bottom: 86px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
  background: #fff;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 6;
  display: flex;
  width: min(720px, calc(100% - 32px));
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-search input,
.search-field input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
}

.hero-search input {
  padding: 0 18px;
}

.hero-search button {
  min-width: 108px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
}

.quick-categories,
.content-section,
.page-main,
.detail-main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.quick-categories {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.56);
}

.quick-title {
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
}

.quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-list a {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.12);
  color: #fecdd3;
  font-size: 0.9rem;
}

.content-section {
  margin-top: 56px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(251, 113, 133, 0.42);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.18), rgba(56, 189, 248, 0.1));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.year-badge,
.rank-label {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 12px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-label {
  right: 12px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.card-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 3.1em;
  overflow: hidden;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: #fecdd3;
}

.card-meta,
.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 0.85rem;
  -webkit-line-clamp: 1;
}

.card-desc {
  min-height: 4.4em;
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  -webkit-line-clamp: 3;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.76rem;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-list span {
  display: grid;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.16);
  color: #fecdd3;
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list em {
  color: #94a3b8;
  font-size: 0.86rem;
  font-style: normal;
}

.page-main,
.detail-main {
  padding-top: 34px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.22), rgba(56, 189, 248, 0.08)),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dbe3ee;
  font-size: 1.05rem;
}

.small-hero {
  padding-bottom: 46px;
}

.search-panel {
  max-width: 720px;
  margin-top: 28px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: #fecdd3;
  font-weight: 800;
}

.search-field {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  background: rgba(8, 11, 18, 0.58);
}

.search-field input {
  padding: 0 14px;
}

.search-field button {
  min-width: 84px;
  border: 0;
  background: #fff;
  color: #0f172a;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.category-main {
  display: block;
  min-height: 178px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.25), transparent 14rem),
    linear-gradient(135deg, rgba(56, 189, 248, 0.13), rgba(15, 23, 42, 0));
}

.category-main span {
  display: block;
  margin-bottom: 16px;
  color: #fecdd3;
  font-weight: 900;
}

.category-main strong {
  display: block;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.45;
}

.category-samples {
  display: grid;
  gap: 10px;
  padding: 18px 24px 24px;
}

.category-samples a {
  overflow: hidden;
  color: #cbd5e1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-samples a:hover {
  color: #fecdd3;
}

.listing-section {
  margin-top: 34px;
}

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

.filter-empty {
  display: none;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #cbd5e1;
}

.filter-empty.is-visible {
  display: block;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.22), transparent 24rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 26px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.detail-line {
  max-width: 780px;
  margin: 20px 0 0;
  color: #dbe3ee;
  font-size: 1.08rem;
}

.detail-meta {
  margin-top: 22px;
}

.large-tags span {
  font-size: 0.84rem;
}

.detail-info .primary-btn {
  margin-top: 28px;
}

.player-section {
  margin-top: 38px;
}

.player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-button {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(8, 11, 18, 0.05), rgba(8, 11, 18, 0.5));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-button span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), #7c3aed);
  box-shadow: 0 18px 45px rgba(225, 29, 72, 0.42);
  clip-path: polygon(34% 24%, 34% 76%, 78% 50%);
}

.player.is-playing .play-button {
  visibility: hidden;
  opacity: 0;
}

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

.detail-content article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.64);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-content p {
  margin: 0;
  color: #dbe3ee;
}

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

.compact-card .card-desc {
  display: none;
}

.site-footer {
  margin-top: 72px;
  padding: 36px 0 42px;
  border-top: 1px solid var(--line);
  color: #a7b0c0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 620px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: #dbe3ee;
}

.copyright {
  margin: 28px 0 0;
  color: #64748b;
  font-size: 0.92rem;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

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

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 70px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8, 11, 18, 0.96);
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    min-height: 720px;
    padding-top: 96px;
  }

  .hero-poster {
    display: none;
  }

  .hero-dots {
    right: 16px;
    bottom: 104px;
  }

  .quick-categories,
  .section-heading,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .listing-grid,
  .related-grid,
  .category-overview,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .quick-categories,
  .content-section,
  .page-main,
  .detail-main,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

  .hero-search,
  .search-field {
    border-radius: 22px;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-search input {
    min-height: 44px;
  }

  .hero-search button {
    min-height: 44px;
  }

  .page-hero,
  .detail-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .movie-grid,
  .listing-grid,
  .related-grid,
  .category-overview,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-list a {
    grid-template-columns: 38px 1fr;
  }

  .rank-list em {
    grid-column: 2;
  }
}
