:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  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: 80;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #22d3ee, #2563eb);
  color: white;
  font-size: 15px;
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.3);
}

.brand-name {
  font-size: 20px;
  color: #f8fafc;
}

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

.nav-link {
  color: var(--muted-strong);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #22d3ee;
}

.top-search,
.mobile-search,
.large-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.large-search input {
  border: 1px solid var(--border);
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 220px;
  padding: 10px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.top-search button,
.mobile-search button,
.large-search button,
.primary-action,
.watch-link {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.top-search button {
  padding: 10px 16px;
}

.top-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-action:hover,
.watch-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 12px;
  padding: 8px 11px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

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

.mobile-category-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--muted-strong);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 4s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 78px;
  max-width: 1180px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #67e8f9;
  background: var(--cyan-soft);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 740px;
  margin: 20px 0 8px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h2 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
}

.hero p {
  max-width: 720px;
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.hero-meta a,
.detail-meta span,
.detail-meta a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  font-size: 14px;
}

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

.primary-action,
.secondary-action,
.watch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
}

.secondary-action {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
}

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

.hero-dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  width: 46px;
  background: #22d3ee;
}

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

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

.section-head.tight {
  margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-article h1,
.detail-card h2,
.aside-panel h2,
.footer-block h2 {
  margin: 0;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head a {
  color: #22d3ee;
  font-weight: 700;
}

.intro-search-block {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  align-items: center;
  gap: 30px;
}

.intro-search-block h2 {
  margin: 12px 0;
  font-size: clamp(28px, 4vw, 44px);
}

.intro-search-block p,
.page-hero p {
  color: var(--muted-strong);
  line-height: 1.8;
}

.large-search {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.large-search input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
}

.large-search button {
  padding: 14px 22px;
  font-weight: 800;
}

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

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

.compact-grid,
.poster-grid,
.category-movie-grid {
  grid-template-columns: repeat(4, 1fr);
}

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  transform: translateZ(0);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  background: var(--panel-strong);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.7);
}

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

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

.movie-card.small .poster-wrap,
.movie-card.mosaic .poster-wrap {
  aspect-ratio: 2 / 3;
}

.poster-wrap img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

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

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: white;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-desc {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.category-card {
  display: grid;
  gap: 10px;
  min-height: 160px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.14));
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card span {
  color: white;
  font-size: 21px;
  font-weight: 800;
}

.category-card strong,
.category-card em {
  color: var(--muted-strong);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.7;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 28px;
}

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

.rank-page-list {
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 52px 128px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.95);
}

.rank-number {
  color: rgba(148, 163, 184, 0.42);
  font-size: 26px;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  height: 78px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.7);
}

.rank-content {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.rank-content strong {
  color: white;
  font-size: 17px;
}

.rank-content em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 34rem), linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.98));
}

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

.slim-hero,
.category-hero {
  padding: 72px 0 50px;
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -0.06em;
}

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

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

.category-movie-grid {
  align-items: start;
}

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

.breadcrumb a:hover {
  color: #22d3ee;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 34px 0 74px;
}

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

.media-player {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  color: white;
  cursor: pointer;
  background: black;
}

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

.player-cover-bg,
.player-cover-shade {
  position: absolute;
  inset: 0;
}

.player-cover-bg {
  background-size: cover;
  background-position: center;
  filter: saturate(0.95);
}

.player-cover-shade {
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), transparent 16rem), linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.34));
}

.player-button {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.94);
  box-shadow: 0 20px 70px rgba(6, 182, 212, 0.32);
  font-size: 28px;
}

.detail-article {
  margin-top: 26px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.detail-article h1 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.18);
  font-size: 13px;
}

.detail-card,
.aside-panel {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
}

.detail-card h2,
.aside-panel h2 {
  margin-bottom: 12px;
  color: white;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.info-grid span {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.34);
}

.info-grid em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.info-grid strong {
  color: white;
  font-size: 15px;
}

.detail-aside {
  position: relative;
}

.aside-panel {
  position: sticky;
  top: 92px;
}

.aside-card-grid {
  display: grid;
  gap: 14px;
}

.aside-card-grid .movie-card {
  min-height: 0;
}

.aside-card-grid .poster-wrap {
  aspect-ratio: 16 / 10;
}

.search-page-form {
  margin-top: 24px;
}

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

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

.footer-about p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-block h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

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

.footer-block a {
  color: var(--muted);
  font-size: 14px;
}

.footer-block a:hover {
  color: #22d3ee;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  color: rgba(148, 163, 184, 0.72);
  text-align: center;
  font-size: 14px;
}

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

  .large-grid,
  .compact-grid,
  .poster-grid,
  .category-movie-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .split-layout,
  .detail-layout,
  .footer-inner,
  .intro-search-block {
    grid-template-columns: 1fr;
  }

  .detail-aside .aside-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    height: 62px;
  }

  .desktop-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-search input {
    flex: 1;
    width: 100%;
    padding: 12px 14px;
  }

  .mobile-search button {
    padding: 12px 16px;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .section-wrap {
    padding: 46px 0;
  }

  .section-head,
  .detail-title-row {
    display: grid;
    align-items: start;
  }

  .large-grid,
  .compact-grid,
  .poster-grid,
  .category-movie-grid,
  .category-grid,
  .full-category-grid,
  .mini-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rank-item {
    grid-template-columns: 36px 92px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-thumb {
    height: 64px;
  }

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

  .detail-layout {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .detail-card,
  .aside-panel {
    padding: 18px;
  }

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

@media (max-width: 500px) {
  .large-grid,
  .compact-grid,
  .poster-grid,
  .category-movie-grid,
  .category-grid,
  .full-category-grid,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .brand-name {
    font-size: 18px;
  }

  .large-search {
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  .large-search button {
    width: 100%;
  }
}
