:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --brand: #06b6d4;
  --brand-2: #2563eb;
  --hot: #f59e0b;
  --danger: #ef4444;
  --radius: 24px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 48%, #0f172a 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 80%);
}

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.84);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 380px);
  gap: 22px;
  align-items: center;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 12px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.25);
}

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

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nav-link,
.quick-cats a,
.text-link {
  color: var(--muted-2);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.15);
}

.header-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input {
  padding: 10px 14px;
}

.header-search button,
.big-search button {
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.header-search button {
  padding: 0 16px;
}

.quick-cats {
  display: flex;
  gap: 16px;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 12px;
  overflow-x: auto;
  font-size: 14px;
}

.quick-cats a:hover,
.text-link:hover {
  color: #67e8f9;
}

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

.hero-carousel {
  position: relative;
  min-height: 680px;
  margin: 28px auto 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

.hero-bg::after,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 76% 35%, rgba(6, 182, 212, 0.22), transparent 28rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  min-height: 680px;
  padding: 70px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 11px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.1);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p,
.one-line {
  max-width: 760px;
  color: var(--muted-2);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.genre-row span,
.detail-tags a {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.65);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.25);
}

.primary-btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-btn {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-panel:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(37, 99, 235, 0.18));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.hero-poster img,
.poster-frame img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  right: 44px;
  bottom: 36px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 40px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.active {
  background: #67e8f9;
}

.home-search-block,
.section-wrap,
.split-section,
.table-section,
.detail-content,
.player-section,
.prev-next,
.category-overview-card {
  margin-bottom: 42px;
}

.home-search-block {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 26px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.home-search-block h2,
.section-head h2,
.content-card h2,
.player-section h2,
.category-overview-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.home-search-block p {
  margin: 8px 0 0;
  color: var(--muted);
}

.big-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.62);
}

.big-search input {
  padding: 17px 18px;
}

.big-search button {
  padding: 0 24px;
  font-weight: 800;
}

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

.section-head.compact {
  align-items: center;
}

.text-link {
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(6, 182, 212, 0.36);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(103, 232, 249, 0.26), transparent 12rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
}

.poster-frame.no-image::after,
.hero-poster.no-image::after,
.detail-poster.no-image::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: rgba(226, 232, 240, 0.8);
  content: attr(data-title);
  text-align: center;
  font-weight: 800;
}

.poster-score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #fb923c);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 8px 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body h3 a:hover {
  color: #67e8f9;
}

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

.card-large .card-body h3 {
  font-size: 20px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) 1.4fr;
  gap: 22px;
}

.ranking-card,
.recent-card,
.category-panel,
.content-card,
.table-section,
.player-section,
.filter-panel,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ranking-card,
.recent-card,
.table-section,
.player-section,
.content-card,
.category-overview-card {
  padding: 24px;
}

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

.ranking-list li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-num {
  color: #67e8f9;
  font-weight: 900;
}

.ranking-list em {
  color: #facc15;
  font-style: normal;
  font-weight: 900;
}

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

.category-panel {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-panel h3 {
  margin: 6px 0;
  font-size: 26px;
}

.category-panel p,
.category-overview-head p {
  margin: 0;
  color: var(--muted);
}

.category-panel span {
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
}

.mini-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-link-list a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0 28px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 25%, rgba(6, 182, 212, 0.28), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.9));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(42px, 7vw, 72px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 190px 190px auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.52);
}

.filter-panel select option {
  color: #111827;
}

.filter-count {
  min-width: 78px;
  color: #67e8f9;
  font-weight: 900;
  text-align: right;
}

.sticky-filter {
  position: sticky;
  top: 106px;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.table-wrap {
  overflow-x: auto;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.rank-table th,
.rank-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.rank-table th {
  color: #67e8f9;
  font-size: 13px;
}

.rank-table td {
  color: var(--muted-2);
}

.rank-table a {
  color: #fff;
  font-weight: 800;
}

.detail-main {
  width: 100%;
}

.detail-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 860px);
  gap: 44px;
  align-items: center;
  width: min(1320px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  padding: 60px 0;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(37, 99, 235, 0.18));
  box-shadow: var(--shadow);
}

.detail-poster span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #fb923c);
  font-weight: 900;
}

.crumb {
  color: #67e8f9;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.player-section,
.detail-content,
.prev-next,
.detail-main > .section-wrap {
  width: min(1320px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.source-label {
  color: #facc15;
  font-weight: 900;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 8px;
  place-content: center;
  place-items: center;
  color: #fff;
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 18rem),
    rgba(2, 6, 23, 0.68);
}

.play-cover.hidden {
  display: none;
}

.play-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 45px rgba(6, 182, 212, 0.28);
}

.play-cover strong {
  font-size: 26px;
}

.play-cover em {
  color: var(--muted-2);
  font-style: normal;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr 0.75fr;
  gap: 22px;
}

.content-card p {
  margin-bottom: 0;
  color: var(--muted-2);
}

.prev-next {
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.prev-next a {
  flex: 1;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-2);
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  color: var(--muted);
}

.footer-grid strong {
  color: #fff;
  font-size: 20px;
}

.footer-grid span {
  display: block;
  color: #fff;
  font-weight: 900;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
}

[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: flex-start;
  }

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

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

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

  .split-section,
  .detail-content,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  main,
  .page-main,
  .player-section,
  .detail-content,
  .prev-next,
  .detail-main > .section-wrap {
    width: min(100% - 22px, 1320px);
  }

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

  .hero-content {
    padding: 28px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 42px;
  }

  .home-search-block,
  .category-panel,
  .footer-grid,
  .category-overview-head,
  .section-head,
  .prev-next {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .home-search-block,
  .big-search {
    display: block;
  }

  .big-search button {
    width: 100%;
    min-height: 48px;
  }

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

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

  .page-hero,
  .ranking-card,
  .recent-card,
  .table-section,
  .player-section,
  .content-card,
  .category-overview-card {
    padding: 18px;
  }

  .sticky-filter {
    top: 152px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .catalog-grid,
  .featured-grid,
  .small-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .header-search {
    display: none;
  }
}
