:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #0891b2;
  --cyan-dark: #0e7490;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
}

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

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.16);
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  outline: none;
}

.nav-search input {
  width: 210px;
  padding: 10px 12px;
}

.nav-search button,
.primary-btn,
.ghost-btn,
.full-btn {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.primary-btn {
  padding: 10px 18px;
  background: var(--cyan-strong);
  color: white;
  font-weight: 700;
}

.nav-search button:hover,
.primary-btn:hover {
  background: var(--cyan-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  padding: 10px 18px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.48);
}

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.8);
  color: var(--cyan);
}

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

.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

.hero-bg,
.hero-bg img,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

.hero-shade {
  background:
    radial-gradient(circle at 75% 25%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(0deg, #020617 1%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  padding: 92px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 36px;
  align-items: end;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-tags,
.hero-cats,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.hero-cats a,
.tag,
.rank-tags span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #cbd5e1;
  font-size: 13px;
  padding: 7px 11px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
  background: rgba(15, 23, 42, 0.76);
  transform: translateX(2px);
}

.hero-mini img {
  width: 92px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini span {
  color: var(--cyan);
  font-size: 12px;
}

.hero-mini strong {
  display: block;
  margin-top: 5px;
  color: white;
  line-height: 1.35;
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100vw - 1180px) / 2));
  background: rgba(15, 23, 42, 0.38);
}

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

.section-head h2,
.content-section h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.section-head a {
  color: var(--cyan);
  font-weight: 700;
}

.card-grid {
  display: grid;
  gap: 20px;
}

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

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.20);
}

.movie-card a {
  display: block;
  min-height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card-wide .poster-frame {
  aspect-ratio: 16 / 9;
}

.movie-card-small .poster-frame {
  aspect-ratio: 1 / 1.16;
}

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

.movie-card:hover img,
.rank-row:hover img,
.category-tile:hover img {
  transform: scale(1.07);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.1) 62%, transparent);
  opacity: 0.9;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 145, 178, 0.92);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
}

.card-content h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
}

.card-content p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  margin: 0 0 10px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

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

.slim-hero {
  padding: 70px 0 20px;
}

.slim-hero > div {
  max-width: 780px;
}

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

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

.category-tile a {
  position: relative;
  display: block;
  min-height: 260px;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.5s ease;
}

.category-tile div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.category-tile span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.category-tile p {
  color: #cbd5e1;
  line-height: 1.65;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 13px 14px;
}

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

.rank-row {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.62);
  overflow: hidden;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(15, 23, 42, 0.92);
  transform: translateY(-1px);
}

.rank-row a {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-thumb {
  height: 94px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-head span {
  color: #475569;
  font-size: 28px;
  font-weight: 900;
}

.rank-head h2 {
  margin: 0;
  font-size: 18px;
}

.rank-main p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-time {
  color: var(--muted);
  white-space: nowrap;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  align-items: end;
  padding: 72px 0 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.tag-row a:hover,
.hero-cats a:hover {
  color: var(--cyan);
}

.watch-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: stretch;
}

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

.player-card video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.70));
  color: white;
  cursor: pointer;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  background: rgba(8, 145, 178, 0.94);
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.35);
  font-size: 28px;
}

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

.watch-aside {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.watch-aside h2 {
  margin: 0 0 12px;
}

.watch-aside p {
  color: var(--muted);
  line-height: 1.7;
}

.full-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

.detail-text article {
  max-width: 880px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.54);
}

.detail-text p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
}

.site-footer p {
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

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

@media (max-width: 860px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

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

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

  .hero-panel {
    display: none;
  }

  .detail-poster {
    width: min(300px, 100%);
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-row a {
    grid-template-columns: 120px 1fr;
  }

  .rank-time {
    display: none;
  }
}

@media (max-width: 640px) {
  .content-section,
  .section-muted {
    padding-top: 42px;
    padding-bottom: 42px;
  }

  .featured-grid,
  .latest-grid,
  .catalog-grid,
  .curated-grid,
  .mosaic-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-content {
    padding: 12px;
  }

  .card-content p {
    display: none;
  }

  .rank-row a {
    grid-template-columns: 92px 1fr;
    gap: 12px;
  }

  .rank-thumb {
    height: 72px;
  }

  .rank-head span {
    font-size: 20px;
  }

  .rank-head h2 {
    font-size: 15px;
  }

  .rank-main p {
    display: none;
  }

  .hero-copy p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }
}
