:root {
  --deep-950: #020617;
  --deep-900: #0f172a;
  --deep-850: #142033;
  --deep-800: #1e293b;
  --deep-700: #334155;
  --cloud-300: #7dd3fc;
  --cloud-400: #38bdf8;
  --cloud-500: #0ea5e9;
  --cloud-600: #0284c7;
  --cyber-400: #60a5fa;
  --orange-500: #f97316;
  --yellow-500: #eab308;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --border-soft: rgba(14, 165, 233, 0.28);
  --card-bg: rgba(15, 23, 42, 0.82);
  --card-bg-strong: rgba(30, 41, 59, 0.88);
  --shadow-soft: 0 20px 70px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: var(--deep-950);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 10%, rgba(14, 165, 233, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(96, 165, 250, 0.15), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cloud-400), var(--cyber-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  color: var(--cloud-400);
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.55));
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 6px;
}

.desktop-nav {
  display: flex;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--text-soft);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--cloud-400);
  background: rgba(30, 41, 59, 0.9);
}

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

.header-search input,
.mobile-search input,
.search-hero input {
  color: var(--text-main);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  outline: none;
  transition: 0.25s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.search-hero input:focus {
  border-color: var(--cloud-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22);
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button,
.secondary-button {
  border: 0;
  color: white;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button {
  background: linear-gradient(135deg, var(--cloud-600), #2563eb);
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.28);
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.secondary-button {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-soft);
  padding: 13px 22px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.76);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text-main);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border-soft);
}

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

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: var(--deep-950);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.12) 52%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 74vh;
  margin: 0 auto;
  padding: 96px 24px 120px;
  display: flex;
  align-items: center;
}

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

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: white;
  background: rgba(14, 165, 233, 0.8);
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 12px 42px rgba(14, 165, 233, 0.28);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0 0 26px;
  max-width: 640px;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 21px);
}

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

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
}

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

.hero-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

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

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

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

.section,
.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 24px;
}

.section-dark {
  background: rgba(15, 23, 42, 0.66);
  border-top: 1px solid rgba(14, 165, 233, 0.08);
  border-bottom: 1px solid rgba(14, 165, 233, 0.08);
}

.section-gradient {
  background: linear-gradient(135deg, rgba(23, 37, 84, 0.78), rgba(2, 6, 23, 0.96));
}

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

.section-kicker,
.page-kicker {
  color: var(--cloud-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.section h2,
.page-hero h1,
.detail-title,
.search-hero h1 {
  margin: 0;
  color: white;
  letter-spacing: -0.045em;
}

.section h2,
.page-hero h1,
.search-hero h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.section-header p,
.page-hero p,
.search-hero p {
  margin: 8px 0 0;
  color: var(--text-muted);
  max-width: 760px;
}

.view-more {
  color: var(--cloud-400);
  font-weight: 700;
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(56, 189, 248, 0.56);
  background: var(--card-bg-strong);
  box-shadow: var(--shadow-soft);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #172554, #020617);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.86));
}

.year-badge,
.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.year-badge {
  top: 10px;
  left: 10px;
  padding: 7px 9px;
  background: rgba(2, 132, 199, 0.92);
}

.type-badge {
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.rank-badge {
  right: 10px;
  top: 10px;
  min-width: 32px;
  padding: 8px 9px;
  text-align: center;
  background: linear-gradient(135deg, var(--yellow-500), var(--orange-500));
}

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

.movie-title {
  display: block;
  color: white;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}

.movie-card:hover .movie-title {
  color: var(--cloud-400);
}

.movie-card-body p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-large .movie-card-body p {
  -webkit-line-clamp: 3;
}

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

.movie-meta span,
.tag-row span,
.chips span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--text-soft);
  font-size: 12px;
  padding: 5px 8px;
}

.tag-row {
  margin-top: 9px;
}

.tag-row span,
.chips span {
  color: var(--cloud-300);
  border-color: rgba(56, 189, 248, 0.22);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.76));
  border: 1px solid rgba(14, 165, 233, 0.22);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.55);
}

.category-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  right: -45px;
  top: -45px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.24), transparent 68%);
}

.category-card strong {
  position: relative;
  display: block;
  font-size: 22px;
  color: white;
  margin-bottom: 10px;
}

.category-card p {
  position: relative;
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.category-card small {
  position: relative;
  color: var(--cloud-400);
  font-weight: 800;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.18);
  transition: 0.25s ease;
}

.compact-card:hover {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(56, 189, 248, 0.5);
}

.compact-card img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  background: #172554;
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--yellow-500), var(--orange-500));
  color: white;
  font-weight: 900;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: white;
  margin-bottom: 4px;
}

.compact-card em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.search-hero {
  background: linear-gradient(135deg, rgba(23, 37, 84, 0.94), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid rgba(14, 165, 233, 0.14);
}

.page-hero-inner,
.search-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

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

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

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 70px;
}

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

.detail-title {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.detail-meta,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0;
}

.detail-meta span {
  color: var(--text-soft);
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

.player-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(14, 165, 233, 0.3);
  background: black;
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
}

.player-wrapper video {
  width: 100%;
  height: 100%;
  background: black;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-position: center;
  background-size: cover;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 42%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.28));
}

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

.play-button {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, var(--cloud-500), #2563eb);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(2, 132, 199, 0.42);
  transition: 0.25s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.play-button svg {
  width: 42px;
  height: 42px;
  margin-left: 4px;
}

.content-panel,
.side-panel {
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.18);
}

.content-panel {
  padding: 28px;
  margin-bottom: 28px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  color: var(--text-soft);
  margin: 0 0 18px;
}

.side-panel {
  position: sticky;
  top: 100px;
  overflow: hidden;
}

.side-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #172554;
}

.side-panel-body {
  padding: 18px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 12px;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

.side-panel dt {
  color: var(--text-muted);
}

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

.search-hero form {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  max-width: 760px;
}

.search-hero input {
  flex: 1;
  padding: 15px 17px;
  font-size: 17px;
}

.search-hero button {
  padding: 15px 28px;
}

.search-state {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.site-footer {
  background: rgba(2, 6, 23, 0.96);
  border-top: 1px solid rgba(14, 165, 233, 0.18);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 28px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--text-muted);
  margin: 12px 0 0;
}

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

.footer-links a {
  color: var(--text-soft);
  padding: 8px 10px;
  border-radius: 10px;
}

.footer-links a:hover {
  color: var(--cloud-400);
  background: rgba(30, 41, 59, 0.76);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: var(--text-muted);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 68vh;
  }

  .movie-grid,
  .movie-grid.medium,
  .movie-grid.large,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid,
  .rank-list,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .hero-content {
    padding: 72px 18px 104px;
  }

  .hero-actions,
  .search-hero form {
    flex-direction: column;
    align-items: stretch;
  }

  .section,
  .page-section,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero-inner,
  .search-hero-inner {
    padding: 54px 16px;
  }

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

  .movie-grid,
  .movie-grid.medium,
  .movie-grid.large,
  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

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

  .movie-title {
    font-size: 15px;
  }

  .movie-card-body p,
  .movie-meta,
  .tag-row {
    display: none;
  }

  .compact-card {
    grid-template-columns: 30px 56px 1fr;
  }

  .compact-card img {
    width: 56px;
    height: 76px;
  }

  .content-panel {
    padding: 20px;
  }
}
