:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.18);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 74, 110, 0.94);
  backdrop-filter: blur(18px);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-400), var(--primary-500));
  color: var(--neutral-900);
  box-shadow: var(--shadow-md);
}

.brand-text {
  font-size: 1.08rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.mobile-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.mobile-category-row a {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 720px;
  padding: 54px 0 84px;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.55), transparent 36%),
    linear-gradient(135deg, var(--primary-900), #07111f 68%, #000000);
  color: var(--white);
  overflow: hidden;
}

.hero-static-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  position: relative;
  z-index: 3;
}

.hero-static-copy span,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-static-copy h1 {
  margin: 10px 0 10px;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 1.05;
  max-width: 820px;
}

.hero-static-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
}

.hero-frame {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  height: min(540px, 62vw);
  min-height: 420px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.54) 42%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent 46%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  bottom: clamp(24px, 5vw, 58px);
  width: min(610px, calc(100% - 48px));
}

.eyebrow,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.88rem;
}

.hero-copy h2 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  max-width: 580px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: #111827;
}

.btn.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.hero-nav {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 28px;
  background: var(--accent-400);
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: linear-gradient(135deg, var(--primary-50), var(--neutral-50));
}

.section-overlap {
  padding: 0;
  margin-top: -42px;
  position: relative;
  z-index: 8;
}

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

.section-head.inline {
  margin-bottom: 18px;
}

.section-head h2,
.ranking-sidebar h2,
.content-card h2,
.category-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.more-link {
  color: var(--primary-700);
  font-weight: 800;
}

.search-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--neutral-200);
}

.search-panel.floating {
  margin-bottom: 0;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--neutral-700);
  font-weight: 800;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 170px 170px auto;
  gap: 12px;
}

.search-controls input,
.search-controls select,
.search-controls button {
  min-height: 46px;
  border: 1px solid var(--neutral-300);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--neutral-800);
  background: var(--neutral-50);
  outline: none;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.search-controls button {
  background: var(--neutral-900);
  color: var(--white);
  border: 0;
  cursor: pointer;
}

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

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

.movie-card {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-400));
}

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

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

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  font-size: 0.82rem;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: var(--accent-400);
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-meta {
  color: var(--neutral-500);
  font-size: 0.78rem;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 1.02rem;
  line-height: 1.3;
}

.card-body h3 a:hover {
  color: var(--primary-700);
}

.card-body p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  background: var(--primary-50);
  color: var(--primary-700);
}

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

.category-tile,
.category-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 220px;
  border-radius: 28px;
  padding: 22px;
  background: var(--neutral-900);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.58;
  transform: scale(1.08);
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  margin-top: 102px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.category-card {
  min-height: auto;
  background: var(--white);
  color: var(--neutral-900);
  border: 1px solid var(--neutral-200);
}

.category-card p {
  color: var(--neutral-600);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-thumbs img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.two-column,
.ranking-layout,
.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: var(--primary-500);
}

.rank-number {
  color: var(--accent-600);
  font-weight: 900;
  font-size: 1.08rem;
}

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

.rank-info strong,
.rank-info small {
  display: block;
}

.rank-info strong {
  line-height: 1.25;
}

.rank-info small {
  margin-top: 4px;
  color: var(--neutral-500);
}

.spotlight-card {
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.spotlight-card img {
  height: 320px;
  object-fit: cover;
  opacity: 0.86;
}

.spotlight-card div {
  padding: 28px;
}

.spotlight-card span {
  color: var(--accent-400);
  font-weight: 900;
}

.spotlight-card p {
  color: rgba(255, 255, 255, 0.82);
}

.page-hero,
.detail-hero {
  position: relative;
  padding: 84px 0 74px;
  color: var(--white);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 32%),
    linear-gradient(135deg, var(--primary-900), #050b14);
  overflow: hidden;
}

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

.ranking-hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.5), transparent 34%),
    linear-gradient(135deg, #120f0b, var(--primary-900));
}

.page-hero h1,
.detail-copy h1 {
  margin: 10px 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
}

.ranking-layout {
  grid-template-columns: 340px 1fr;
}

.ranking-sidebar {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 28px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-md);
}

.compact-list .rank-row {
  grid-template-columns: 38px 46px 1fr;
  padding: 8px;
}

.compact-list .rank-row img {
  width: 46px;
  height: 62px;
}

.detail-hero {
  padding: 38px 0 64px;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(12px);
  transform: scale(1.06);
}

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.72);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

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

.detail-tags span {
  background: rgba(14, 165, 233, 0.18);
  color: var(--white);
}

.player-card,
.content-card {
  border-radius: 30px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-md);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.play-button {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.play-button::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 24px;
  border-left: 26px solid var(--primary-700);
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
}

.detail-content-section {
  padding-top: 0;
}

.content-card {
  padding: 30px;
}

.content-card p {
  color: var(--neutral-700);
  font-size: 1.02rem;
}

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

.movie-card.compact .card-body p {
  -webkit-line-clamp: 2;
}

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: var(--neutral-900);
  padding: 50px 0 22px;
}

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

.footer-logo {
  color: var(--white);
  font-weight: 900;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

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

.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .ranking-sidebar {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 62px;
  }

  .hero-frame {
    height: 620px;
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.18));
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    bottom: 26px;
    width: auto;
  }

  .hero-nav {
    right: 22px;
    top: 22px;
    bottom: auto;
  }

  .section {
    padding: 46px 0;
  }

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

  .search-controls {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .category-page-grid,
  .two-column,
  .detail-content-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .hero-static-copy,
  .hero-frame,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .hero-frame {
    height: 560px;
    min-height: 560px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 0.94rem;
  }

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

  .page-hero,
  .detail-hero {
    padding: 50px 0;
  }

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

  .play-button::before {
    left: 27px;
    top: 20px;
    border-left-width: 22px;
    border-top-width: 13px;
    border-bottom-width: 13px;
  }
}
