:root {
  --bg: #070716;
  --bg-soft: #101025;
  --card: rgba(255, 255, 255, 0.94);
  --card-dark: rgba(16, 16, 37, 0.82);
  --text: #171723;
  --muted: #697084;
  --light: #f8fafc;
  --line: rgba(148, 163, 184, 0.28);
  --primary: #7c3aed;
  --primary-2: #ec4899;
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.28), transparent 32rem),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.22), transparent 30rem),
    linear-gradient(180deg, #080816 0%, #111129 36%, #f5f7fb 36%, #f8fafc 100%);
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 7, 22, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--danger), var(--accent), var(--primary-2));
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.32);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.nav-menu a:hover,
.footer-links a:hover,
.card-meta a:hover,
.rank-meta a:hover {
  color: #fbbf24;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 6px;
}

.nav-categories a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  padding: 11px 16px;
  min-width: 220px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.header-search button,
.primary-btn,
.secondary-btn,
.hero-dot,
.filter-controls button {
  border: 0;
  cursor: pointer;
}

.header-search button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--danger), var(--accent), var(--primary-2));
  box-shadow: 0 18px 38px rgba(236, 72, 153, 0.26);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  display: block;
  background: #fff;
  border-radius: 99px;
}

main {
  overflow: hidden;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  color: #fff;
}

.hero-frame {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border-radius: 34px;
  background: #080816;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.36);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 680ms ease, transform 680ms ease;
  transform: scale(1.02);
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 4, 12, 0.94) 0%, rgba(4, 4, 12, 0.76) 42%, rgba(4, 4, 12, 0.2) 72%, rgba(4, 4, 12, 0.76) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(4, 4, 12, 0.84));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 76px 64px 64px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags span,
.meta-pills span,
.tag-row span,
.category-chips a {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-controls {
  position: absolute;
  left: 64px;
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 240ms ease, background 240ms ease;
}

.hero-dot.is-active {
  width: 72px;
  background: linear-gradient(90deg, var(--danger), var(--accent));
}

.hero-side-card {
  position: absolute;
  right: 42px;
  bottom: 42px;
  z-index: 3;
  width: min(330px, calc(100% - 84px));
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
}

.hero-side-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.hero-side-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  line-height: 1.7;
}

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

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

.section-title,
.page-head h1,
.page-head h2,
.filter-panel h2,
.detail-section h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3.5vw, 42px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p,
.page-head p,
.filter-panel p {
  margin: 8px 0 0;
  max-width: 650px;
  color: var(--muted);
  line-height: 1.8;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.88);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-link img,
.rank-poster img,
.category-card img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms ease;
}

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

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

.movie-card-body {
  padding: 16px;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #7c8499;
  font-size: 12px;
  font-weight: 800;
}

.card-meta a,
.rank-meta a {
  color: var(--primary);
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 950;
}

.movie-card h3 a:hover,
.rank-title:hover,
.text-link-grid a:hover {
  color: var(--primary);
}

.movie-card p {
  margin: 0;
  min-height: 48px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.movie-card .tag-row span,
.detail-tags span {
  color: #5b21b6;
  background: #f3e8ff;
  border: 1px solid #e9d5ff;
}

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

.category-pill {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  border-radius: 22px;
  padding: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.92), rgba(236, 72, 153, 0.86)),
    var(--bg-soft);
  box-shadow: 0 22px 48px rgba(124, 58, 237, 0.24);
}

.category-pill strong {
  font-size: 19px;
}

.category-pill span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}

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

.rank-item {
  position: relative;
  min-height: 160px;
  display: grid;
  grid-template-columns: 112px 56px 1fr;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.12);
}

.rank-poster {
  display: block;
  width: 112px;
  height: 132px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.rank-number {
  color: transparent;
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(124, 58, 237, 0.78);
}

.rank-title {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 20px;
  font-weight: 950;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 54px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.32), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(236, 72, 153, 0.32), transparent 34%),
    linear-gradient(135deg, rgba(15, 15, 38, 0.98), rgba(42, 18, 78, 0.96));
  box-shadow: 0 34px 100px rgba(15, 23, 42, 0.28);
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.9;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.84));
}

.category-card-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 24px;
  color: #fff;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
}

.filter-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-radius: 28px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.86);
  margin-bottom: 24px;
}

.filter-panel .eyebrow {
  color: var(--primary);
  background: #f3e8ff;
  border-color: #e9d5ff;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.filter-controls input,
.filter-controls select {
  min-width: 180px;
  border-color: #dbe2ef;
  background: #f8fafc;
}

.no-results {
  display: none;
  border-radius: 24px;
  padding: 30px;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
}

.no-results.is-visible {
  display: block;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: stretch;
  color: #fff;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  min-height: 440px;
  box-shadow: 0 34px 88px rgba(0, 0, 0, 0.34);
}

.detail-title {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 44px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.26), transparent 36%),
    linear-gradient(135deg, rgba(11, 11, 30, 0.96), rgba(58, 25, 104, 0.92));
  box-shadow: 0 34px 88px rgba(15, 23, 42, 0.24);
}

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

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

.detail-title p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.9;
}

.detail-title .meta-pills {
  margin: 20px 0;
}

.player-panel {
  overflow: hidden;
  border-radius: 34px;
  background: #030712;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.3);
}

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

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #000;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  filter: blur(1px) saturate(1.08);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.64));
}

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

.play-badge {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--danger), var(--accent), var(--primary-2));
  box-shadow: 0 22px 48px rgba(236, 72, 153, 0.36);
}

.content-card {
  border-radius: 30px;
  padding: 30px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

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

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.info-list div {
  border-radius: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.info-list span {
  display: block;
  color: #7c8499;
  font-size: 13px;
  font-weight: 800;
}

.info-list strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-tags span {
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 900;
}

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

.text-link-grid a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 14px;
  padding: 11px 12px;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.site-footer {
  margin-top: 72px;
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.76);
  background: #070716;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 560px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-content: flex-start;
  font-weight: 800;
}

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
    padding: 18px;
    background: rgba(7, 7, 22, 0.96);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
  }

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

  .hero-content {
    padding: 56px 36px 92px;
  }

  .hero-controls {
    left: 36px;
  }

  .hero-side-card {
    display: none;
  }

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

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

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

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

  .detail-poster {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

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

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at top, rgba(124, 58, 237, 0.28), transparent 30rem),
      linear-gradient(180deg, #080816 0%, #111129 28%, #f8fafc 28%, #f8fafc 100%);
  }

  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero,
  .section,
  .page-section,
  .page-hero,
  .detail-section,
  .detail-hero {
    width: min(100% - 24px, 1180px);
  }

  .hero-frame {
    min-height: 620px;
    border-radius: 28px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.045em;
  }

  .hero-content {
    padding: 44px 24px 90px;
  }

  .hero p,
  .page-hero p,
  .detail-title p {
    font-size: 15px;
  }

  .hero-controls {
    left: 24px;
    bottom: 28px;
  }

  .section-head,
  .page-head,
  .filter-panel,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .movie-card-body {
    padding: 13px;
  }

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

  .movie-card p {
    font-size: 13px;
    min-height: auto;
  }

  .category-strip,
  .category-grid,
  .text-link-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-title,
  .content-card {
    padding: 28px;
    border-radius: 26px;
  }

  .filter-controls {
    width: 100%;
    justify-content: stretch;
  }

  .filter-controls input,
  .filter-controls select {
    width: 100%;
    min-width: 0;
  }

  .rank-item {
    grid-template-columns: 86px 42px 1fr;
    gap: 12px;
  }

  .rank-poster {
    width: 86px;
    height: 108px;
  }

  .rank-number {
    font-size: 30px;
  }

  .rank-title {
    font-size: 17px;
  }

  .rank-content p {
    display: none;
  }

  .play-badge {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
