:root {
  color-scheme: dark;
  --deep-950: #020617;
  --deep-900: #0f172a;
  --deep-850: #111c33;
  --deep-800: #1e293b;
  --deep-700: #334155;
  --cloud-500: #0ea5e9;
  --cloud-600: #0284c7;
  --cloud-700: #0369a1;
  --cyber-400: #60a5fa;
  --cyber-600: #2563eb;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(7, 89, 133, 0.32);
  --card: rgba(15, 23, 42, 0.82);
  --card-strong: rgba(15, 23, 42, 0.96);
  --shadow: 0 22px 65px rgba(2, 8, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 34rem),
    var(--deep-950);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cloud-500), var(--cyber-600));
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.35);
}

.brand-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #7dd3fc;
  background: rgba(30, 41, 59, 0.95);
}

.header-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.9);
  border-radius: 12px;
}

.header-search input,
.mobile-search input,
.big-search input {
  width: 240px;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  color: white;
  background: var(--cloud-600);
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.22s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover {
  background: var(--cloud-700);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.95);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

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

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(7, 89, 133, 0.18);
  border-radius: 12px;
}

.hero-carousel {
  position: relative;
  height: 78vh;
  min-height: 590px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.75s ease, transform 1.6s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.hero-bottom {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.62) 43%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-bottom {
  background: linear-gradient(0deg, var(--deep-950) 0%, transparent 44%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(680px, calc(100% - 64px));
  transform: translateY(-50%);
  z-index: 2;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eyebrow {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.primary-button,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: var(--cloud-600);
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(2, 132, 199, 0.24);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.primary-button:hover,
.section-more:hover,
.text-link:hover {
  transform: translateY(-2px);
  background: var(--cloud-700);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.34);
}

.primary-button.slim {
  padding: 9px 14px;
  font-size: 14px;
}

.section-more,
.text-link {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: none;
}

.hero-meta,
.movie-card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: all 0.22s ease;
}

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

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 76px);
  gap: 10px;
}

.hero-thumbs a {
  position: relative;
  overflow: hidden;
  height: 108px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 14px;
}

.hero-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero-thumbs span {
  position: absolute;
  inset: auto 6px 6px;
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hero-thumbs a:hover img {
  opacity: 1;
  transform: scale(1.08);
}

main,
.page-main,
.detail-main {
  min-height: 65vh;
}

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

.no-top {
  padding-top: 0;
}

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(7, 89, 133, 0.32);
  border-radius: 18px;
  box-shadow: 0 14px 42px rgba(2, 8, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.65);
  box-shadow: 0 24px 62px rgba(2, 8, 23, 0.48);
}

.poster-link {
  position: relative;
  display: block;
  height: 330px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(37, 99, 235, 0.1));
}

.compact-card .poster-link {
  height: 260px;
}

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

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.9);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 900;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

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

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover,
.category-card-large h2 a:hover {
  color: #7dd3fc;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile,
.category-card-large,
.detail-panel,
.filter-panel {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.58));
  border: 1px solid rgba(7, 89, 133, 0.32);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.category-tile {
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.7);
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-card-large p,
.detail-panel p,
.page-hero p {
  margin: 0;
  color: #cbd5e1;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 84px 54px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(7, 89, 133, 0.3);
  border-radius: 18px;
}

.large-rank .rank-row {
  grid-template-columns: 106px 64px 1fr auto;
}

.rank-cover {
  overflow: hidden;
  height: 112px;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.12);
}

.large-rank .rank-cover {
  height: 142px;
}

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

.rank-number {
  color: #7dd3fc;
  font-size: 30px;
  font-weight: 950;
  text-align: center;
}

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 21px;
}

.rank-content p {
  margin: 0 0 9px;
  color: #cbd5e1;
}

.page-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 36px;
  padding: 54px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.2), transparent 38%),
    linear-gradient(110deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(7, 89, 133, 0.34);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.category-list-large {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 58px;
  display: grid;
  gap: 20px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
  padding: 22px;
}

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

.category-cover-stack img {
  height: 168px;
  width: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-card-large h2 {
  margin: 8px 0;
  font-size: 30px;
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  color: #e5e7eb;
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 12px;
  outline: 0;
  padding: 12px 13px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
}

.empty-state.show {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  transform: scale(1.04);
  opacity: 0.42;
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.64)),
    linear-gradient(0deg, var(--deep-950), transparent 45%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  margin-bottom: 14px;
  font-size: 14px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: 20px;
}

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

.detail-tags {
  margin-bottom: 28px;
}

.video-player {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 22px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(0, 0, 0, 0.68));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-player.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  background: var(--cloud-600);
  border-radius: 999px;
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.38);
  font-size: 30px;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: none;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.62);
  border: 1px solid rgba(248, 113, 113, 0.32);
  border-radius: 12px;
  padding: 10px 12px;
}

.player-message.show {
  display: block;
}

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

.detail-panel {
  padding: 28px;
}

.detail-panel h2 {
  margin: 10px 0 12px;
  font-size: 28px;
}

.related-section {
  padding-top: 20px;
}

.big-search {
  width: min(680px, 100%);
  margin-top: 24px;
}

.big-search input {
  width: 100%;
  padding: 14px 16px;
}

.big-search button {
  padding: 14px 22px;
  font-weight: 900;
}

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

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

.footer-brand p {
  max-width: 420px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: center;
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-links a:hover {
  color: #7dd3fc;
}

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

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

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

  .hero-thumbs {
    display: none;
  }

  .category-card-large,
  .detail-layout,
  .detail-content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-carousel {
    height: 74vh;
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-section,
  .player-section,
  .detail-content-grid,
  .page-hero,
  .filter-panel,
  .category-list-large {
    width: min(100% - 24px, 1180px);
  }

  .page-hero {
    padding: 34px 22px;
    border-radius: 20px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .poster-link {
    height: 265px;
  }

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

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

  .rank-row,
  .large-rank .rank-row {
    grid-template-columns: 74px 42px 1fr;
  }

  .rank-row .text-link {
    grid-column: 1 / -1;
  }

  .rank-cover,
  .large-rank .rank-cover {
    height: 100px;
  }

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

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

  .detail-hero {
    min-height: 0;
  }

  .detail-layout {
    gap: 24px;
    padding: 34px 0;
  }

  .detail-poster img {
    height: 420px;
  }

  .detail-info h1 {
    font-size: 40px;
  }

  .detail-one-line {
    font-size: 17px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .poster-link,
  .compact-card .poster-link {
    height: 360px;
  }
}
