:root {
  --site-bg: #0a1929;
  --site-bg-2: #102a43;
  --site-bg-3: #243b53;
  --site-border: #334e68;
  --site-text: #f0f4f8;
  --site-muted: #bcccdc;
  --site-dim: #829ab1;
  --site-accent: #f59e0b;
  --site-accent-2: #fbbf24;
  --site-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 30rem),
    radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.10), transparent 28rem),
    var(--site-bg);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
  background: rgba(10, 25, 41, 0.18);
}

.site-header.is-scrolled,
.mobile-nav.is-open {
  background: rgba(10, 25, 41, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.48);
}

.header-inner {
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

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

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0a1929;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
  font-size: 1rem;
}

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

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--site-dim);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 1.25rem;
}

.nav-link {
  position: relative;
  color: var(--site-muted);
  font-size: 0.93rem;
  font-weight: 600;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--site-accent);
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--site-accent-2);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link-muted {
  color: #9fb3c8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-pill,
.menu-button {
  border: 1px solid rgba(51, 78, 104, 0.9);
  background: rgba(36, 59, 83, 0.55);
  color: var(--site-muted);
  border-radius: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
}

.menu-button {
  display: none;
  min-width: 2.75rem;
}

.mobile-nav {
  display: none;
  padding: 0.75rem 1rem 1.25rem;
  border-top: 1px solid rgba(51, 78, 104, 0.65);
}

.mobile-nav .nav-link {
  display: block;
  padding: 0.85rem 0;
}

.hero-section {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  background: #081421;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-bg,
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img {
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 41, 0.94) 0%, rgba(10, 25, 41, 0.72) 38%, rgba(10, 25, 41, 0.20) 100%),
    linear-gradient(0deg, #0a1929 0%, rgba(10, 25, 41, 0.12) 45%, rgba(10, 25, 41, 0.20) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5rem;
  padding-top: 7rem;
}

.hero-copy {
  max-width: 58rem;
}

.hero-copy h1 {
  margin-top: 1rem;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
}

.hero-copy p {
  max-width: 48rem;
  margin-top: 1rem;
  color: #d9e2ec;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.hero-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  color: #9fb3c8;
  font-size: 0.92rem;
}

.hero-meta {
  margin-top: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.8rem 1.25rem;
  font-weight: 800;
  transition: all 0.25s ease;
}

.btn-primary {
  color: #0a1929;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.40);
}

.btn-ghost {
  color: #f0f4f8;
  border: 1px solid rgba(188, 204, 220, 0.25);
  background: rgba(16, 42, 67, 0.55);
  backdrop-filter: blur(12px);
}

.btn-full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  font-size: 2.25rem;
  line-height: 1;
  transition: all 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(245, 158, 11, 0.85);
  color: #0a1929;
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
}

.hero-dot {
  width: 2.25rem;
  height: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  background: var(--site-accent-2);
}

.section-muted {
  background: rgba(8, 20, 33, 0.5);
  border-top: 1px solid rgba(51, 78, 104, 0.45);
  border-bottom: 1px solid rgba(51, 78, 104, 0.45);
}

.section-heading,
.category-overview-head,
.rank-panel-head,
.detail-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-kicker {
  display: inline-flex;
  color: var(--site-accent-2);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-heading h2,
.category-overview-head h2,
.page-hero h1,
.detail-card h1 {
  margin-top: 0.45rem;
  color: #f0f4f8;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.category-overview-head p,
.page-hero p,
.detail-title-row p,
.footer-desc {
  max-width: 48rem;
  margin-top: 0.65rem;
  color: var(--site-muted);
}

.section-link,
.rank-panel-head a {
  color: var(--site-accent-2);
  font-weight: 800;
}

.large-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.large-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  background: #102a43;
  box-shadow: var(--site-shadow);
}

.large-cover img,
.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.large-cover:hover img,
.poster-shell:hover img {
  transform: scale(1.08);
}

.large-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 68%);
}

.large-content {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  color: #fff;
}

.large-content strong {
  display: block;
  margin-top: 0.75rem;
  font-size: clamp(1.2rem, 2vw, 1.85rem);
}

.large-content small {
  display: block;
  margin-top: 0.35rem;
  color: #d9e2ec;
}

.large-play,
.play-hover {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 3.75rem;
  height: 3.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  opacity: 0;
  color: #0a1929;
  background: #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.45);
  transition: all 0.25s ease;
}

.large-cover:hover .large-play,
.poster-shell:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.85rem;
  background:
    radial-gradient(circle at 30% 15%, rgba(245, 158, 11, 0.32), transparent 45%),
    linear-gradient(135deg, #102a43, #07111d);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.movie-card .poster-shell {
  aspect-ratio: 2 / 3;
}

.rating-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card-body {
  padding-top: 0.85rem;
}

.movie-title {
  display: block;
  color: #f0f4f8;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title:hover {
  color: var(--site-accent-2);
}

.movie-desc {
  display: -webkit-box;
  min-height: 2.7rem;
  margin-top: 0.4rem;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--site-dim);
  font-size: 0.88rem;
  line-height: 1.55;
}

.movie-tags,
.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.movie-tags {
  margin-top: 0.65rem;
}

.movie-tags span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.76rem;
  font-weight: 700;
}

.movie-meta {
  margin-top: 0.75rem;
  gap: 0.4rem 0.9rem;
  font-size: 0.78rem;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 2rem;
  align-items: start;
}

.rank-panel,
.sidebar-card,
.detail-card {
  border: 1px solid rgba(51, 78, 104, 0.72);
  border-radius: 1rem;
  background: rgba(16, 42, 67, 0.68);
  box-shadow: var(--site-shadow);
}

.rank-panel,
.sidebar-card {
  padding: 1.25rem;
}

.rank-list {
  display: grid;
  gap: 0.8rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 2.5rem 4.5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  border-radius: 0.85rem;
  padding: 0.6rem;
  background: rgba(36, 59, 83, 0.46);
  border: 1px solid rgba(51, 78, 104, 0.55);
}

.rank-number {
  color: #fbbf24;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 0.55rem;
  background: #102a43;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info a {
  display: block;
  color: #f0f4f8;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info p {
  display: -webkit-box;
  margin-top: 0.25rem;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: var(--site-dim);
  font-size: 0.82rem;
}

.rank-list-full .rank-row {
  grid-template-columns: 3.2rem 7rem minmax(0, 1fr);
}

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

.category-card {
  position: relative;
  min-height: 16rem;
  overflow: hidden;
  border: 1px solid rgba(51, 78, 104, 0.72);
  border-radius: 1rem;
  padding: 1.2rem;
  background: linear-gradient(145deg, rgba(16, 42, 67, 0.95), rgba(8, 20, 33, 0.9));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.55);
}

.category-count {
  color: #fbbf24;
  font-weight: 900;
  font-size: 0.82rem;
}

.category-card h3 {
  margin-top: 0.5rem;
  color: #f0f4f8;
  font-size: 1.35rem;
}

.category-card p {
  margin-top: 0.55rem;
  color: var(--site-muted);
  font-size: 0.92rem;
}

.category-posters {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1rem;
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.mini-poster {
  width: 22%;
  aspect-ratio: 2 / 3;
  border-radius: 0.5rem;
  box-shadow: none;
}

.page-main {
  padding-top: 5rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3rem;
  border-bottom: 1px solid rgba(51, 78, 104, 0.55);
  background:
    radial-gradient(circle at 15% 30%, rgba(245, 158, 11, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(16, 42, 67, 0.85), rgba(8, 20, 33, 0.92));
}

.compact-page-hero h1,
.category-hero h1 {
  font-size: clamp(2.25rem, 5vw, 4.6rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--site-dim);
  font-size: 0.92rem;
}

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

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 48rem;
  margin-top: 1.5rem;
}

.filter-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(51, 78, 104, 0.8);
  border-radius: 0.9rem;
  padding: 0.95rem 1rem;
  outline: none;
  color: #f0f4f8;
  background: rgba(8, 20, 33, 0.64);
}

.filter-input:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.10);
}

.filter-count {
  min-width: max-content;
  color: var(--site-accent-2);
  font-weight: 900;
}

.overview-stack {
  display: grid;
  gap: 3rem;
  padding-top: 3rem;
}

.category-overview-block {
  border-bottom: 1px solid rgba(51, 78, 104, 0.45);
  padding-bottom: 3rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  padding-top: 2rem;
}

.detail-primary {
  min-width: 0;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(245, 158, 11, 0.16), transparent 32rem),
    #020617;
  box-shadow: var(--site-shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(3px);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
}

.player-start span {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0a1929;
  background: #fbbf24;
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.42);
  font-size: 1.8rem;
}

.player-start strong {
  font-size: 1.05rem;
}

.player-message {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  color: #d9e2ec;
  background: rgba(0, 0, 0, 0.58);
  font-size: 0.82rem;
}

.detail-card {
  margin-top: 1.25rem;
  padding: 1.5rem;
}

.detail-title-row {
  align-items: flex-start;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0;
}

.detail-stats div {
  border-radius: 0.85rem;
  padding: 1rem;
  background: rgba(36, 59, 83, 0.58);
}

.detail-stats span {
  display: block;
  color: var(--site-dim);
  font-size: 0.78rem;
}

.detail-stats strong {
  display: block;
  margin-top: 0.25rem;
  color: #f0f4f8;
  font-size: 1.05rem;
}

.detail-meta-list {
  display: grid;
  gap: 0.4rem;
  border-top: 1px solid rgba(51, 78, 104, 0.58);
  padding-top: 1.25rem;
  color: var(--site-muted);
}

.text-section {
  margin-top: 1.5rem;
}

.text-section h2 {
  color: #f0f4f8;
  font-size: 1.35rem;
}

.text-section p {
  margin-top: 0.65rem;
  color: #d9e2ec;
  line-height: 1.8;
}

.tag-cloud {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(51, 78, 104, 0.58);
}

.detail-sidebar {
  display: grid;
  gap: 1rem;
  align-content: start;
  position: sticky;
  top: 6rem;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  margin-bottom: 1rem;
}

.detail-related {
  padding-bottom: 0;
}

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(51, 78, 104, 0.58);
  background: rgba(5, 12, 22, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.2fr;
  gap: 2rem;
  padding: 3rem 1rem;
}

.footer-heading {
  color: #f0f4f8;
  font-size: 1rem;
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

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

.footer-links a {
  color: var(--site-dim);
}

.footer-links a:hover {
  color: var(--site-accent-2);
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 45;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  opacity: 0;
  visibility: hidden;
  color: #0a1929;
  background: #fbbf24;
  font-weight: 900;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.32);
  transition: all 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.is-hidden-by-filter {
  display: none !important;
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 4.25rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-subtitle,
  .search-pill {
    display: none;
  }

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

  .hero-content {
    padding-bottom: 4.2rem;
  }

  .hero-copy h1 {
    font-size: 2.55rem;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-grid-home,
  .movie-grid-preview,
  .movie-grid-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .category-overview-head,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-list-full .rank-row,
  .rank-row {
    grid-template-columns: 2.5rem 4.25rem minmax(0, 1fr);
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .page-main {
    padding-top: 4.25rem;
  }

  .page-hero {
    padding-top: 3.5rem;
  }
}
