: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(34, 211, 238, 0.18);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --orange: #fb923c;
  --green: #34d399;
  --purple: #c084fc;
  --pink: #f472b6;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.9);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(8, 145, 178, 0.12);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

.brand-copy strong,
.footer-logo {
  display: block;
  font-size: 1.28rem;
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: rgba(34, 211, 238, 0.68);
  font-size: 0.76rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.header-search {
  margin-left: auto;
  display: flex;
  width: min(320px, 28vw);
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.68);
}

.header-search input,
.big-search input,
.catalog-search {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

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

.header-search button,
.big-search button {
  border: 0;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
}

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

.header-search button:hover,
.big-search button:hover,
.primary-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--cyan);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

.hero {
  position: relative;
  height: min(72vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  z-index: 0;
  transition: opacity 900ms ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.28) 70%, rgba(2, 6, 23, 0.82) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.04) 42%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 42px;
}

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

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
}

.hero h1,
.page-hero h1,
.detail-main h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
}

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

.primary-btn,
.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.28);
}

.primary-btn.small {
  min-height: 40px;
  padding-inline: 16px;
  font-size: 0.92rem;
}

.ghost-btn,
.more-link {
  color: #dffaff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
}

.ghost-btn:hover,
.more-link:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.44);
  background: rgba(34, 211, 238, 0.1);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: 0.25s ease;
}

.hero-control:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(8, 145, 178, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.72);
}

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

.search-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: center;
}

.search-hero h2,
.section-title h2,
.category-panel h2,
.content-card h2,
.side-box h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.search-hero p,
.page-hero p,
.category-panel p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 60px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.big-search input {
  padding: 0 20px;
  font-size: 1rem;
}

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

.section-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.section-title span {
  display: inline-flex;
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: rgba(34, 211, 238, 0.1);
}

.cyan-title span,
.cyan-title h2 {
  color: var(--cyan);
}

.orange-title span,
.orange-title h2 {
  color: var(--orange);
}

.green-title span,
.green-title h2 {
  color: var(--green);
}

.purple-title span,
.purple-title h2 {
  color: var(--purple);
}

.blue-title span,
.blue-title h2 {
  color: var(--blue);
}

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

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

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.28);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 24px 70px rgba(8, 145, 178, 0.2);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.28), rgba(15, 23, 42, 0.9));
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 48%);
}

.type-badge,
.rank-mark {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #00111a;
  font-size: 0.76rem;
  font-weight: 900;
  background: rgba(34, 211, 238, 0.92);
}

.type-badge {
  right: 12px;
}

.rank-mark {
  left: 12px;
  color: #fff7ed;
  background: rgba(251, 146, 60, 0.92);
}

.card-body {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  color: #f8fafc;
  font-size: 1.04rem;
  line-height: 1.35;
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body small {
  color: #94a3b8;
  line-height: 1.45;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag-row span,
.detail-tags span {
  padding: 5px 8px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.74rem;
}

.list-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 150px;
}

.list-card .poster-wrap {
  aspect-ratio: auto;
  min-height: 150px;
}

.list-card .card-body {
  min-height: unset;
}

.compact-card .card-body {
  min-height: 150px;
}

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

.category-tile,
.category-panel,
.content-card,
.side-box,
.catalog-tools,
.player-shell {
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.54)),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 18rem);
  box-shadow: var(--shadow);
}

.category-tile {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  transition: 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
}

.category-tile strong {
  color: var(--cyan);
  font-size: 1.25rem;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
}

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

.side-list {
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  transition: 0.25s ease;
}

.mini-card:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(8, 145, 178, 0.14);
}

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

.mini-card strong {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 5px;
  color: #e2e8f0;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card small {
  color: var(--muted);
}

.page-hero {
  padding-top: 74px;
  padding-bottom: 34px;
}

.compact-hero {
  min-height: 280px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.page-hero p {
  max-width: 760px;
  font-size: 1.06rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 26px;
  color: var(--muted);
}

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

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

.category-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  padding: 24px;
}

.category-panel-head p {
  margin-bottom: 22px;
}

.compact-side-list {
  align-self: start;
}

.catalog-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
  padding: 14px;
}

.catalog-search {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.3);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-buttons button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.66);
  cursor: pointer;
  transition: 0.24s ease;
}

.filter-buttons button:hover,
.filter-buttons button.active {
  color: #00111a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.empty-state {
  margin-top: 24px;
  padding: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
}

.detail-layout {
  padding-top: 36px;
}

.player-shell {
  padding: 14px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.52);
}

.video-frame video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-frame video {
  z-index: 1;
  object-fit: contain;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 18rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.28));
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 52px rgba(34, 211, 238, 0.46);
  transform: translate(-50%, -50%);
  font-size: 2rem;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  margin-top: 30px;
}

.detail-main h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.detail-meta {
  margin-bottom: 20px;
}

.detail-tags {
  margin: 0 0 26px;
}

.content-card {
  margin-bottom: 20px;
  padding: 26px;
}

.content-card h2 {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 1.35rem;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.95;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 104px;
}

.detail-poster {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.side-box {
  padding: 18px;
}

.side-box h2 {
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 1.25rem;
}

.large-rank-list .list-card {
  grid-template-columns: 130px 1fr;
}

.search-page-form {
  margin-bottom: 28px;
}

.site-footer {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.3), rgba(2, 6, 23, 0.96));
}

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

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 1.05rem;
}

.site-footer a,
.site-footer span {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line-soft);
  color: #64748b;
}

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

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

  .header-search {
    display: none;
  }
}

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

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

  .mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

  .search-hero,
  .split-section,
  .detail-grid,
  .category-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .header-inner {
    height: 66px;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .brand-copy small {
    font-size: 0.68rem;
  }

  .hero {
    min-height: 580px;
  }

  .hero-copy {
    padding-top: 16px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 15vw, 3.6rem);
  }

  .hero p {
    font-size: 0.96rem;
  }

  .section-wrap {
    width: min(100% - 24px, 1180px);
    padding: 42px 0;
  }

  .big-search {
    grid-template-columns: 1fr;
  }

  .big-search button {
    min-height: 50px;
  }

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

  .category-grid,
  .category-panels {
    grid-template-columns: 1fr;
  }

  .card-body {
    min-height: 160px;
    padding: 12px;
  }

  .card-body strong {
    font-size: 0.96rem;
  }

  .card-body em {
    font-size: 0.86rem;
  }

  .list-card,
  .large-rank-list .list-card {
    grid-template-columns: 104px 1fr;
    min-height: 126px;
  }

  .list-card .poster-wrap {
    min-height: 126px;
  }

  .play-mark {
    width: 68px;
    height: 68px;
    font-size: 1.6rem;
  }
}
