:root {
  --deep-950: #020617;
  --deep-900: #0f172a;
  --deep-850: #111c33;
  --deep-800: #1e293b;
  --deep-700: #334155;
  --cloud-500: #0ea5e9;
  --cloud-400: #38bdf8;
  --cloud-300: #7dd3fc;
  --blue-600: #2563eb;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(7, 89, 133, 0.32);
  --card: rgba(15, 23, 42, 0.82);
  --card-strong: rgba(30, 41, 59, 0.82);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--deep-950);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 8%, rgba(14, 165, 233, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(37, 99, 235, 0.14), transparent 30rem),
    linear-gradient(180deg, var(--deep-950), var(--deep-900) 42%, var(--deep-950));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

img {
  width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  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-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--cloud-400);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(37, 99, 235, 0.16));
  box-shadow: 0 0 32px rgba(14, 165, 233, 0.24);
}

.brand-text,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(90deg, var(--cloud-400), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-links a,
.footer-links a {
  color: var(--text-soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cloud-300);
  background: rgba(30, 41, 59, 0.88);
}

.header-search,
.mobile-search,
.inline-search,
.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.inline-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  color: var(--text-main);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.inline-search button,
.big-search button,
.primary-btn {
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cloud-500), var(--blue-600));
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.22);
  cursor: pointer;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: rgba(30, 41, 59, 0.88);
}

.mobile-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-links a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.62);
}

.hero {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  background: #000;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.26)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.1) 42%, rgba(2, 6, 23, 0.48));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 10vh 24px 80px;
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cloud-300);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.tag-cloud span {
  padding: 7px 11px;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.hero-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 22px;
  font-weight: 800;
  border-radius: 14px;
}

.ghost-btn {
  color: var(--cloud-300);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.hero-dot.active {
  width: 34px;
  background: var(--cloud-500);
}

.section-wrap,
.page-hero,
.filter-panel,
.search-panel,
.breadcrumb,
.detail-hero,
.watch-section {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-wrap {
  padding-top: 70px;
  padding-bottom: 70px;
}

.dark-band {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: rgba(15, 23, 42, 0.74);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.intro-card,
.category-tile,
.movie-card,
.rank-row,
.filter-panel,
.search-panel,
.detail-hero,
.watch-section,
.detail-text {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.58));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.intro-card {
  padding: 28px;
}

.intro-card h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.watch-section h2,
.detail-text h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.intro-card h2 {
  margin-bottom: 14px;
  font-size: clamp(26px, 4vw, 42px);
}

.intro-card p,
.page-hero p,
.detail-one,
.detail-text p {
  color: var(--text-soft);
  line-height: 1.85;
}

.inline-search,
.big-search {
  margin-top: 22px;
}

.inline-search input,
.big-search input {
  flex: 1;
  min-width: 0;
  padding: 15px 16px;
}

.inline-search button,
.big-search button {
  padding: 15px 22px;
}

.text-link {
  display: block;
  padding: 14px 0;
  color: var(--cloud-300);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-head a {
  color: var(--cloud-300);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, border 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--deep-900);
}

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

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

.score-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  color: white;
  font-weight: 900;
  border-radius: 999px;
}

.score-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(14, 165, 233, 0.92);
}

.score-badge.big {
  top: 16px;
  left: 16px;
  font-size: 18px;
}

.play-badge {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card h3 a:hover {
  color: var(--cloud-300);
}

.meta-line,
.card-desc,
.tag-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.meta-line,
.tag-line {
  color: var(--text-muted);
}

.card-desc {
  color: var(--text-soft);
  margin-top: 8px;
}

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

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

.category-tile {
  min-height: 170px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile strong {
  font-size: 24px;
}

.category-tile span {
  color: var(--text-soft);
  line-height: 1.65;
}

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

.rank-list.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rank-list.full {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-row {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px 64px 1fr;
  gap: 12px;
  align-items: center;
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-num {
  color: var(--cloud-300);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  color: white;
  font-weight: 850;
}

.rank-info em {
  margin-top: 6px;
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
}

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

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

.page-hero.slim h1 {
  max-width: 880px;
  margin-bottom: 16px;
  font-size: clamp(34px, 6vw, 58px);
}

.page-hero.slim p:not(.eyebrow) {
  max-width: 760px;
  font-size: 18px;
}

.filter-panel,
.search-panel {
  display: flex;
  gap: 12px;
  padding: 18px;
}

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

.filter-panel input {
  flex: 1;
}

.breadcrumb {
  padding-top: 26px;
  padding-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-hero {
  padding: 24px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
}

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

.detail-info h1 {
  margin-bottom: 16px;
  font-size: clamp(34px, 6vw, 58px);
}

.detail-one {
  margin: 0 0 20px;
  font-size: 18px;
}

.detail-meta,
.tag-cloud {
  margin-bottom: 18px;
}

.watch-section {
  margin-top: 28px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.watch-section h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

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

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

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38));
  cursor: pointer;
}

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

.video-play {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cloud-500), var(--blue-600));
  box-shadow: 0 22px 60px rgba(14, 165, 233, 0.36);
  font-size: 34px;
}

.detail-text {
  padding: 28px;
}

.detail-text h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.detail-text p + h2 {
  margin-top: 28px;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 30px;
}

.footer-inner p {
  max-width: 460px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 22px;
}

.footer-links a:hover {
  color: var(--cloud-300);
}

.footer-bottom {
  padding: 18px 24px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(7, 89, 133, 0.18);
}

.hidden-card {
  display: none !important;
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .movie-grid.latest,
  .category-grid,
  .category-grid.expanded,
  .rank-list.three-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

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

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    margin-left: 0;
    padding: 88px 18px 90px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .intro-grid,
  .detail-hero,
  .footer-inner,
  .rank-list.full {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 280px;
  }

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

  .category-grid,
  .category-grid.expanded,
  .rank-list.three-cols {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .search-panel,
  .big-search,
  .inline-search {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .section-wrap,
  .page-hero,
  .filter-panel,
  .search-panel,
  .breadcrumb,
  .detail-hero,
  .watch-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-wrap {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 14px;
  }

  .card-desc {
    display: none;
  }

  .rank-row {
    grid-template-columns: 34px 58px 1fr;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }
}
