:root {
  --site-sky: #0ea5e9;
  --site-cyan: #06b6d4;
  --site-blue: #2563eb;
  --site-dark: #0f172a;
  --site-soft: #f0f9ff;
  --site-border: #e2e8f0;
  --site-text: #111827;
  --site-muted: #64748b;
  --site-radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: var(--site-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  max-width: 100%;
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 22px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--site-sky), var(--site-cyan), var(--site-blue));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong,
.footer-logo {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(90deg, #0284c7, #0891b2);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.brand-copy em {
  margin-top: 4px;
  color: var(--site-muted);
  font-size: 0.76rem;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 1;
}

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 13px;
  color: #334155;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--site-sky), var(--site-cyan));
  box-shadow: 0 12px 22px rgba(14, 165, 233, 0.22);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #e0f2fe;
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 3px;
  background: #0369a1;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 16px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-background,
.detail-bg,
.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade,
.page-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.48), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.1));
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 78px 0 98px;
}

.hero-copy {
  color: #fff;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(224, 242, 254, 0.16);
  color: #bae6fd;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.section-kicker {
  color: #0284c7;
  background: #e0f2fe;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 840px;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.1rem;
  line-height: 1.9;
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags,
.detail-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-tags span {
  background: #e0f2fe;
  color: #0369a1;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--site-sky), var(--site-cyan));
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(14, 165, 233, 0.38);
}

.btn-outline {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.btn-outline:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
  color: #e0f2fe;
  background: rgba(2, 132, 199, 0.18);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 165, 233, 0.9);
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: #38bdf8;
}

.hero-search-band {
  position: relative;
  z-index: 3;
  margin-top: -58px;
}

.hero-search-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: stretch;
}

.hero-search,
.hero-mini-rank,
.filter-panel,
.content-card,
.meta-card,
.category-card,
.category-tile {
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--site-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.1);
}

.hero-search {
  padding: 24px;
}

.hero-search label,
.filter-search label,
.filter-selects span {
  display: block;
  margin-bottom: 10px;
  color: #0369a1;
  font-weight: 850;
}

.hero-search div {
  display: flex;
  gap: 10px;
}

.hero-search input,
.filter-search input,
.filter-control {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--site-border);
  border-radius: 15px;
  background: #fff;
  padding: 0 15px;
  color: #0f172a;
  outline: none;
}

.hero-search input:focus,
.filter-search input:focus,
.filter-control:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.13);
}

.hero-search button {
  min-width: 92px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--site-sky), var(--site-cyan));
  font-weight: 850;
}

.hero-mini-rank {
  padding: 18px;
}

.hero-mini-rank h2 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  font-weight: 850;
}

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

.home-section {
  padding: 74px 0;
}

.muted-section {
  background: linear-gradient(180deg, #f0f9ff, #ffffff);
}

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

.section-heading h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin-top: 10px;
  color: var(--site-muted);
  line-height: 1.75;
}

.section-heading a {
  color: #0284c7;
  font-weight: 850;
}

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 210px;
  overflow: hidden;
  padding: 22px;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.5s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.84));
}

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

.category-tile span,
.category-card span {
  font-size: 1.28rem;
  font-weight: 900;
}

.category-tile p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #cffafe);
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.movie-year,
.rank-badge,
.cover-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
}

.movie-year {
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.cover-play {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.92);
  color: #0284c7;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: 0.2s ease;
}

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

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

.movie-card-top,
.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 750;
}

.movie-card h2 {
  margin-top: 9px;
  font-size: 1.05rem;
  line-height: 1.36;
  font-weight: 900;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.15em;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--site-muted);
  font-size: 0.92rem;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
}

.movie-card.compact .movie-cover img {
  height: 100%;
  aspect-ratio: auto;
}

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

.movie-card.compact h2 {
  font-size: 0.95rem;
}

.movie-card.compact p,
.movie-card.compact .movie-tags {
  display: none;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 18px;
  margin-bottom: 28px;
  padding: 20px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0369a1, #0891b2, #2563eb);
}

.simple-hero,
.category-hero,
.library-hero {
  padding: 96px 0 72px;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-hero .container,
.detail-layout {
  position: relative;
  z-index: 2;
}

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

.category-card {
  overflow: hidden;
}

.category-card a {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  height: 100%;
}

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

.category-card div {
  padding: 20px;
}

.category-card h2 {
  margin: 8px 0;
  font-size: 1.18rem;
  font-weight: 900;
}

.category-card p {
  color: var(--site-muted);
  line-height: 1.72;
}

.ranking-hero {
  min-height: 430px;
  display: flex;
  align-items: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 52px;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.46);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #7dd3fc;
}

.watch-section {
  padding: 70px 0 20px;
  background: #020617;
}

.watch-section .section-heading h2,
.watch-section .section-heading p {
  color: #fff;
}

.compact-heading {
  margin-bottom: 18px;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #0284c7;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.45));
  transition: 0.2s ease;
}

.play-trigger span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.38);
  font-size: 2.3rem;
  text-indent: 5px;
}

.watch-player.is-playing .play-trigger {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  max-width: calc(100% - 36px);
  color: #fff;
  font-size: 0.9rem;
}

.detail-main {
  background: linear-gradient(180deg, #020617 0, #f8fafc 22%);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 360px;
  gap: 24px;
  align-items: start;
}

.content-card,
.meta-card {
  padding: 28px;
}

.content-card h2,
.meta-card h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  font-weight: 900;
}

.content-card h2:not(:first-child) {
  margin-top: 30px;
}

.content-card p {
  color: #334155;
  font-size: 1.02rem;
  line-height: 2;
}

.meta-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.meta-card dt {
  color: #0284c7;
  font-weight: 850;
}

.meta-card dd {
  margin: 0;
  color: #334155;
}

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

.site-footer {
  padding: 56px 0 28px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 36px;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: #94a3b8;
}

.footer-brand p {
  margin-top: 12px;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h2 {
  color: #fff;
  font-size: 1rem;
  font-weight: 850;
}

.footer-links a:hover {
  color: #38bdf8;
}

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

.footer-cats h2 {
  grid-column: 1 / -1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.9rem;
}

[data-hidden="true"] {
  display: none !important;
}

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

  .menu-button {
    display: inline-block;
  }

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

  .hero-layout,
  .detail-layout,
  .detail-content-grid,
  .hero-search-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 330px;
  }

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-copy em {
    display: none;
  }

  .hero-slider,
  .hero-layout {
    min-height: 690px;
  }

  .hero-layout {
    padding: 58px 0 92px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(2.1rem, 12vw, 3.45rem);
  }

  .hero-copy p,
  .page-hero p,
  .detail-copy p {
    font-size: 1rem;
  }

  .hero-search div,
  .section-heading,
  .page-hero-inner,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

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

  .movie-card.compact {
    grid-template-columns: 1fr;
  }

  .category-card a {
    grid-template-columns: 1fr;
  }

  .category-card img {
    height: 190px;
  }

  .filter-selects,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 28px;
    padding: 48px 0;
  }

  .watch-section {
    padding-top: 44px;
  }

  .content-card,
  .meta-card {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .rank-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .mini-rank-grid {
    grid-template-columns: 1fr;
  }

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

  .btn {
    width: 100%;
  }
}
