:root {
  --bg: #050816;
  --bg-soft: #0b1024;
  --bg-card: rgba(17, 24, 39, 0.72);
  --bg-card-strong: rgba(17, 24, 39, 0.95);
  --text: #f8fafc;
  --muted: #9ca3af;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --ocean: #38bdf8;
  --ocean-strong: #0284c7;
  --moon: #8b5cf6;
  --pink: #ec4899;
  --gold: #fbbf24;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.42);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.2), transparent 32rem),
    linear-gradient(180deg, #050816 0%, #0b1024 48%, #050816 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.88), rgba(5, 8, 22, 0.38));
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(5, 8, 22, 0.94);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--ocean), var(--moon));
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-5deg);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-text em {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(56, 189, 248, 0.14);
}

.search-bar,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  overflow: hidden;
}

.search-bar {
  width: min(300px, 26vw);
}

.search-bar input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  color: white;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-bar button,
.mobile-search button {
  flex: 0 0 auto;
  border: 0;
  padding: 11px 16px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ocean-strong), var(--moon));
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: white;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

main {
  padding-top: 76px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 22, 0.94) 0%, rgba(5, 8, 22, 0.72) 42%, rgba(5, 8, 22, 0.26) 100%),
    radial-gradient(circle at 64% 24%, rgba(56, 189, 248, 0.24), transparent 26rem);
  z-index: 1;
}

.hero-track {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 42px;
  padding: 70px 0 58px;
}

.hero-kicker,
.section-heading p,
.eyebrow {
  margin: 0 0 12px;
  color: var(--ocean);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

.hero-meta,
.detail-meta,
.movie-meta {
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
}

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

.btn-primary,
.btn-ghost,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  padding: 14px 24px;
  color: white;
  background: linear-gradient(135deg, var(--ocean-strong), var(--moon));
  box-shadow: 0 18px 44px rgba(56, 189, 248, 0.18);
}

.btn-ghost,
.section-action {
  padding: 13px 20px;
  color: white;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

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

.hero-side {
  position: relative;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 22, 0.78));
}

.hero-mini-list {
  position: absolute;
  right: -20px;
  bottom: 24px;
  width: min(280px, 84%);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-mini-list a {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.hero-mini-list a:hover {
  background: rgba(56, 189, 248, 0.12);
}

.hero-mini-list img {
  width: 52px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-mini-list strong {
  display: block;
  font-size: 14px;
}

.hero-mini-list em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(16px, calc((100% - 1180px) / 2));
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 26px;
  background: var(--ocean);
}

.content-section,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.page-shell {
  padding: 56px 0 0;
}

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

.section-heading h2,
.page-title,
.detail-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-action {
  flex: 0 0 auto;
}

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

.category-card {
  position: relative;
  min-height: 172px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 12rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card strong {
  display: block;
  font-size: 20px;
}

.category-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.category-card em {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: var(--ocean);
  font-style: normal;
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(17, 24, 39, 0.92);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(139, 92, 246, 0.18));
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.08) brightness(0.92);
}

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  background: rgba(2, 132, 199, 0.88);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.movie-card:hover .poster-play {
  transform: translateY(0);
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: var(--gold);
  box-shadow: 0 10px 26px rgba(251, 191, 36, 0.28);
}

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

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

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

.movie-meta {
  margin: 8px 0 0;
  font-size: 13px;
}

.movie-desc {
  margin: 10px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.6;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-list span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  font-size: 12px;
  background: rgba(56, 189, 248, 0.12);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.42);
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--moon), var(--ocean-strong));
}

.rank-title {
  min-width: 0;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.filter-panel,
.info-panel,
.detail-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.16);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin: 28px 0 24px;
  padding: 16px;
}

.filter-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 14px 18px;
  color: white;
  background: rgba(2, 6, 23, 0.48);
}

.filter-panel span {
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

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

.page-title {
  max-width: 860px;
}

.page-intro {
  max-width: 860px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.8;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 0;
}

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

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  background: #020617;
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: cover;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.2), rgba(2, 6, 23, 0.42));
}

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

.play-button {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--ocean-strong), var(--moon));
  box-shadow: 0 20px 60px rgba(56, 189, 248, 0.3);
  cursor: pointer;
}

.play-button::before {
  content: "";
  display: block;
  margin-left: 6px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 26px solid white;
}

.player-title-line {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.player-title-line strong {
  display: block;
  font-size: 18px;
}

.player-title-line span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.detail-card {
  padding: 28px;
}

.detail-title {
  margin-top: 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-summary {
  margin-top: 24px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.85;
}

.text-block {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.66);
}

.text-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

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

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

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

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

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

.footer-links a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
}

.footer-links a:hover {
  color: white;
  border-color: rgba(56, 189, 248, 0.42);
}

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

  .search-bar {
    width: min(360px, 40vw);
  }

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

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

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

  .search-bar {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .site-header.is-open .mobile-panel {
    display: block;
  }

  main {
    padding-top: 68px;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 58px;
  }

  .hero-side {
    max-width: 420px;
  }

  .hero-poster {
    transform: none;
  }

  .hero-mini-list {
    right: 12px;
  }

  .rank-layout,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 36px 52px minmax(0, 1fr);
  }

  .rank-info {
    grid-column: 3;
  }
}

@media (max-width: 640px) {
  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-desc,
  .page-intro,
  .detail-summary {
    font-size: 15px;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

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

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

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

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

  .movie-desc,
  .tag-list {
    display: none;
  }

  .detail-card,
  .text-block {
    padding: 20px;
  }

  .play-button {
    width: 70px;
    height: 70px;
  }
}

.category-samples {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.category-samples a {
  color: var(--muted-strong);
}

.category-samples a:hover {
  color: var(--ocean);
}
