:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.78);
  --panel-solid: #1e293b;
  --panel-soft: rgba(51, 65, 85, 0.55);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --orange: #fb923c;
  --green: #4ade80;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 85% 12%, rgba(59, 130, 246, 0.18), transparent 24rem),
    linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: var(--text);
}

body.is-locked {
  overflow: hidden;
}

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

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

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: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-weight: 800;
  font-size: 24px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.brand:hover {
  color: #67e8f9;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: white;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.22);
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-menu {
  position: relative;
  padding: 24px 0;
}

.dropdown {
  position: absolute;
  top: 64px;
  left: 0;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  background: #1e293b;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-menu:hover .dropdown,
.nav-menu:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-link:hover {
  background: rgba(51, 65, 85, 0.9);
  color: var(--cyan);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.header-search input,
.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  outline: none;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.header-search button,
.search-box button {
  border: 0;
  border-radius: 12px;
  background: var(--cyan-strong);
  color: white;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-soft);
  cursor: pointer;
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #cbd5e1;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.is-open {
  display: grid;
  gap: 4px;
}

.mobile-link {
  padding: 11px 12px;
  border-radius: 10px;
  color: #cbd5e1;
}

.mobile-link:hover {
  background: rgba(51, 65, 85, 0.85);
  color: var(--cyan);
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-images {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  opacity: 0.72;
}

.hero-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.75) 48%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  color: white;
  font-weight: 900;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 72px);
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

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

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

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

.btn.primary {
  background: var(--cyan-strong);
  color: white;
}

.btn.primary:hover {
  background: #0891b2;
}

.btn.muted {
  background: rgba(51, 65, 85, 0.86);
  color: white;
  border: 1px solid var(--line);
}

.btn.muted:hover {
  background: rgba(71, 85, 105, 0.95);
}

.btn.full {
  width: 100%;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.section-block {
  padding: 64px 0 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title span {
  color: white;
  font-size: 30px;
  font-weight: 900;
}

.section-title a {
  color: var(--cyan);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 22px 54px rgba(8, 145, 178, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.large .poster-wrap {
  aspect-ratio: 16 / 9;
}

.movie-card.small .poster-wrap {
  aspect-ratio: 3 / 4;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.82;
}

.card-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 6px 9px;
  border-radius: 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-type {
  left: 12px;
  background: rgba(8, 145, 178, 0.88);
}

.rank-badge {
  right: 12px;
  background: rgba(249, 115, 22, 0.9);
}

.play-icon {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.86);
  color: white;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 2.75em;
  margin: 0 0 10px;
  overflow: hidden;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.card-link:hover h2 {
  color: var(--cyan);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.6em;
  margin: 0 0 14px;
  overflow: hidden;
  color: #aab7c9;
  font-size: 14px;
  line-height: 1.8;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: var(--cyan);
  font-size: 12px;
}

.category-panel {
  padding: 36px;
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.56);
  box-shadow: var(--shadow);
}

.category-grid,
.collections-grid {
  display: grid;
  gap: 20px;
}

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

.category-tile,
.collection-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(37, 99, 235, 0.12));
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-tile {
  min-height: 118px;
  padding: 22px;
}

.category-tile:hover,
.collection-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.52);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.23), rgba(37, 99, 235, 0.18));
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 18px;
}

.category-tile span,
.collection-card p {
  color: #aab7c9;
  font-size: 14px;
  line-height: 1.7;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.25), transparent 24rem);
  border-bottom: 1px solid var(--line);
}

.page-hero.slim h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:not(.eyebrow) {
  width: min(760px, 100%);
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.collections-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 54px 0;
}

.collection-card {
  padding: 22px;
  background: rgba(30, 41, 59, 0.72);
}

.collection-head h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 22px;
}

.collection-samples {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.6);
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: rgba(51, 65, 85, 0.76);
}

.mini-card img {
  width: 86px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}

.mini-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mini-info strong {
  overflow: hidden;
  color: white;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-info small {
  color: #94a3b8;
}

.mini-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.9);
  color: white;
  font-weight: 900;
  margin-left: auto;
}

.filter-bar,
.search-box,
.quick-chips {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar select {
  max-width: 180px;
}

.empty-state {
  display: none;
  padding: 70px 20px;
  color: #94a3b8;
  text-align: center;
  font-size: 18px;
}

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

.search-panel .search-box input {
  flex: 1;
}

.quick-chips {
  flex-wrap: wrap;
}

.quick-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.74);
  color: #cbd5e1;
  padding: 8px 13px;
  cursor: pointer;
}

.quick-chips button:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
}

.ranking-layout,
.detail-layout {
  display: grid;
  gap: 30px;
}

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

.ranking-aside,
.detail-aside .side-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
}

.ranking-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px;
}

.ranking-aside h2,
.side-card h2 {
  margin: 0 0 18px;
  color: white;
  font-size: 20px;
}

.detail-layout {
  grid-template-columns: minmax(0, 1fr) 330px;
  padding: 34px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: black;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: black;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.08), transparent 17rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.76));
}

.player-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.88);
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.35);
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.78);
}

.detail-card h1 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
}

.detail-card h2 {
  margin: 28px 0 12px;
  color: white;
  font-size: 22px;
}

.detail-card p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.95;
}

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

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 13px;
}

.detail-meta span:nth-child(1) {
  color: var(--cyan);
}

.detail-meta span:nth-child(4) {
  color: var(--orange);
}

.lead-text {
  margin-top: 22px;
  font-style: italic;
}

.detail-aside {
  display: grid;
  gap: 22px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 20px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 18px;
}

.related-block {
  padding-top: 36px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.95);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0 34px;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 18px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 10px 0;
  color: #94a3b8;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

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

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

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

  .ranking-aside,
  .detail-aside {
    position: static;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 560px;
  }

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

  .hero-images img:nth-child(n + 2) {
    display: none;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.42));
  }

  .hero p,
  .page-hero p:not(.eyebrow) {
    font-size: 16px;
  }

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

  .section-title span {
    font-size: 26px;
  }

  .featured-grid,
  .compact-grid,
  .listing-grid,
  .category-grid,
  .collections-grid {
    grid-template-columns: 1fr;
  }

  .category-panel,
  .detail-card {
    padding: 20px;
    border-radius: 20px;
  }

  .filter-bar,
  .search-box {
    flex-direction: column;
  }

  .filter-bar select {
    max-width: none;
  }

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

  .player-button {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
