:root {
  --color-space-dark: #0a0e27;
  --color-space-blue: #1a2332;
  --color-space-navy: #2d3e50;
  --color-star-silver: #c5d0de;
  --color-star-gold: #f4c430;
  --color-nebula-cyan: #4a9eff;
  --color-nebula-teal: #00d4aa;
  --color-cosmic-orange: #ff6b35;
  --color-text-primary: #e8eef5;
  --color-text-secondary: #a8b5c7;
  --color-text-muted: #6b7b8c;
  --shadow-card: 0 22px 60px rgba(0, 0, 0, 0.28);
  --radius-large: 24px;
  --radius-card: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--color-space-dark);
  color: var(--color-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 10%, rgba(74, 158, 255, 0.18), transparent 32%),
    radial-gradient(circle at 78% 18%, rgba(0, 212, 170, 0.12), transparent 30%),
    linear-gradient(180deg, #0a0e27 0%, #111936 48%, #0a0e27 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle, rgba(232, 238, 245, 0.32) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(74, 158, 255, 0.25) 1px, transparent 1.5px);
  background-position: 0 0, 46px 70px;
  background-size: 180px 180px, 240px 240px;
  opacity: 0.2;
  pointer-events: none;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.section-spacing {
  padding: 72px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(197, 208, 222, 0.12);
  background: rgba(10, 14, 39, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--color-nebula-cyan), var(--color-nebula-teal));
  color: #fff;
  box-shadow: 0 12px 28px rgba(74, 158, 255, 0.25);
}

.logo-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--color-nebula-cyan), var(--color-nebula-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-subtitle {
  margin-top: 3px;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: var(--color-star-silver);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-nebula-cyan);
}

.mobile-menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 13px;
  background: rgba(45, 62, 80, 0.7);
  color: var(--color-star-silver);
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #050816;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 39, 0.96) 0%, rgba(10, 14, 39, 0.72) 40%, rgba(10, 14, 39, 0.24) 100%),
    linear-gradient(0deg, var(--color-space-dark) 0%, rgba(10, 14, 39, 0.45) 42%, rgba(10, 14, 39, 0.08) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 86px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--color-star-gold);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.page-hero h1,
.detail-main-copy h1 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.hero-copy h1 {
  max-width: 920px;
  font-size: clamp(42px, 7vw, 86px);
}

.hero-summary {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--color-star-silver);
  font-size: clamp(17px, 2.2vw, 22px);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(197, 208, 222, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(10, 14, 39, 0.45);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(74, 158, 255, 0.12);
  color: var(--color-star-silver);
  font-size: 12px;
}

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

.btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.btn-primary,
.section-more,
.btn-small {
  background: linear-gradient(90deg, var(--color-nebula-cyan), var(--color-nebula-teal));
  color: #fff;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-small {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 84px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-2px);
}

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

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

.hero-dot.is-active {
  background: var(--color-nebula-cyan);
}

.intro-section,
.latest-section,
.related-section {
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.2), rgba(26, 35, 50, 0.5));
}

.intro-grid,
.footer-grid,
.detail-grid {
  display: grid;
  gap: 32px;
}

.intro-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: center;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.14;
  background: linear-gradient(90deg, var(--color-nebula-cyan), var(--color-nebula-teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-desc,
.page-hero p,
.footer-desc {
  margin: 18px 0 0;
  color: var(--color-text-secondary);
  font-size: 17px;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.intro-stats span {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(197, 208, 222, 0.12);
  border-radius: var(--radius-card);
  padding: 20px;
  background: rgba(26, 35, 50, 0.72);
  box-shadow: var(--shadow-card);
}

.intro-stats strong {
  color: var(--color-nebula-cyan);
  font-size: 32px;
  line-height: 1;
}

.intro-stats em {
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-style: normal;
}

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

.category-section {
  background: linear-gradient(180deg, rgba(26, 35, 50, 0.56), rgba(10, 14, 39, 0.18));
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-space-blue);
  box-shadow: var(--shadow-card);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 14, 39, 0.92), rgba(10, 14, 39, 0.25));
}

.category-info {
  position: absolute;
  inset: auto 18px 18px;
  display: flex;
  flex-direction: column;
}

.category-info strong {
  color: #fff;
  font-size: 21px;
}

.category-info em {
  color: var(--color-star-silver);
  font-size: 13px;
  font-style: normal;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: flex;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(197, 208, 222, 0.11);
  border-radius: var(--radius-card);
  background: rgba(26, 35, 50, 0.82);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(74, 158, 255, 0.45);
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.22), rgba(0, 212, 170, 0.12));
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.04) 56%);
  opacity: 0.8;
  transition: opacity 0.25s ease;
}

.card-link:hover .poster-wrap::after {
  opacity: 0.95;
}

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

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

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(74, 158, 255, 0.88);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-rank,
.card-year {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-rank {
  left: 10px;
  top: 10px;
  color: var(--color-star-gold);
}

.card-year {
  right: 10px;
  bottom: 10px;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--color-text-primary);
  font-size: 16px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--color-nebula-cyan);
}

.card-body p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.compact-card .card-body p,
.ranked-grid .card-body p {
  -webkit-line-clamp: 2;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
  border: 1px solid rgba(197, 208, 222, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(26, 35, 50, 0.74);
  box-shadow: var(--shadow-card);
}

.filter-input-wrap {
  position: relative;
}

.filter-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  color: var(--color-text-muted);
  transform: translateY(-50%);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(197, 208, 222, 0.12);
  border-radius: 14px;
  outline: 0;
  background: rgba(10, 14, 39, 0.75);
  color: var(--color-text-primary);
}

.filter-panel input {
  padding: 0 16px 0 42px;
}

.filter-panel select {
  padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(74, 158, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}

.filter-count {
  min-width: 118px;
  color: var(--color-star-silver);
  font-weight: 800;
  text-align: center;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0;
  background:
    linear-gradient(135deg, rgba(74, 158, 255, 0.2), transparent 38%),
    linear-gradient(180deg, rgba(26, 35, 50, 0.88), rgba(10, 14, 39, 0.96));
}

.compact-hero {
  padding: 58px 0;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 70px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--color-text-secondary);
  font-size: 14px;
}

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

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card,
.content-card,
.player-card {
  border: 1px solid rgba(197, 208, 222, 0.12);
  border-radius: var(--radius-large);
  background: rgba(26, 35, 50, 0.78);
  box-shadow: var(--shadow-card);
}

.category-overview-card {
  padding: 26px;
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 30px;
}

.category-overview-head p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--color-text-secondary);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-large);
  background: var(--color-space-blue);
  box-shadow: var(--shadow-card);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-main-copy h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.detail-one-line {
  max-width: 860px;
  margin: 20px 0 0;
  color: var(--color-star-silver);
  font-size: 19px;
}

.detail-tags {
  margin-top: 18px;
}

.detail-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
}

.detail-primary {
  display: grid;
  gap: 24px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.player-start-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-nebula-cyan), var(--color-nebula-teal));
  box-shadow: 0 20px 60px rgba(74, 158, 255, 0.34);
  font-size: 34px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--color-text-primary);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.9;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-card div {
  border-bottom: 1px solid rgba(197, 208, 222, 0.1);
  padding-bottom: 13px;
}

.info-card dt {
  color: var(--color-text-muted);
  font-size: 13px;
}

.info-card dd {
  margin: 4px 0 0;
  color: var(--color-text-primary);
}

.info-card a {
  color: var(--color-nebula-cyan);
}

.site-footer {
  border-top: 1px solid rgba(197, 208, 222, 0.12);
  background: rgba(26, 35, 50, 0.78);
}

.footer-grid {
  grid-template-columns: 1.2fr 0.8fr 1fr;
  padding: 56px 0;
}

.footer-logo .logo-mark {
  width: 38px;
  height: 38px;
}

.footer-desc {
  max-width: 460px;
  font-size: 14px;
}

.footer-heading {
  margin: 0 0 15px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 14px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(197, 208, 222, 0.1);
  padding: 18px 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.movie-card.is-hidden {
  display: none;
}

.no-results {
  grid-column: 1 / -1;
  border: 1px solid rgba(197, 208, 222, 0.12);
  border-radius: var(--radius-card);
  padding: 34px;
  background: rgba(26, 35, 50, 0.74);
  color: var(--color-star-silver);
  text-align: center;
}

@media (max-width: 1180px) {
  .movie-grid,
  .overview-preview {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .section-spacing {
    padding: 54px 0;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 1px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid rgba(197, 208, 222, 0.12);
    border-radius: 0 0 18px 18px;
    padding: 12px;
    background: rgba(26, 35, 50, 0.98);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
  }

  .hero-slider {
    min-height: 680px;
  }

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

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 44px;
  }

  .intro-grid,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .filter-count {
    text-align: left;
  }

  .detail-layout {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .container-custom {
    width: min(100% - 22px, 1280px);
  }

  .site-nav {
    min-height: 68px;
  }

  .logo-title {
    font-size: 18px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero-slider {
    min-height: 640px;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .hero-meta span:nth-child(n + 4) {
    display: none;
  }

  .section-head,
  .category-overview-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body p {
    display: none;
  }

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

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

  .content-card {
    padding: 22px;
  }
}
