:root {
  --page-bg: #f8fafc;
  --text-main: #111827;
  --text-muted: #6b7280;
  --brand: #f97316;
  --brand-deep: #ef4444;
  --dark: #111827;
  --dark-soft: #1f2937;
  --card: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

body {
  background: var(--page-bg);
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #111827, #1f2937 50%, #111827);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.site-nav {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  font-size: 0.8rem;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
}

.logo-text {
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: #d1d5db;
  font-size: 0.95rem;
  font-weight: 650;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fb923c;
}

.mobile-menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  border-radius: 0.65rem;
  color: #ffffff;
}

.mobile-menu-button span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slides,
.hero-slide {
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(17, 24, 39, 0.72) 48%, rgba(17, 24, 39, 0.38));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
  gap: 3rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
  color: #ffffff;
}

.hero-copy {
  max-width: 760px;
  animation: fadeInUp 0.8s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(251, 146, 60, 0.45);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 1.25rem 0 1rem;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-title {
  margin: 0 0 0.8rem;
  color: #ffffff;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 800;
}

.hero-desc {
  max-width: 680px;
  color: #e5e7eb;
  font-size: 1.1rem;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags {
  margin-top: 1.2rem;
}

.hero-tags span,
.card-tags span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  padding: 0.32rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
  display: block;
  border-radius: 1.4rem;
  overflow: hidden;
  min-height: 420px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 2.25rem;
  background: #f97316;
}

.quick-search-section,
.category-strip-section,
.section-block {
  padding: 4rem 0;
}

.quick-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 2rem;
  align-items: center;
  margin-top: -6.5rem;
  position: relative;
  z-index: 4;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.quick-search-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}

.quick-search-card p {
  margin: 0;
  color: var(--text-muted);
}

.quick-search-form,
.search-panel,
.inline-filter {
  display: flex;
  gap: 0.75rem;
}

.quick-search-form input,
.search-panel input,
.search-panel select,
.inline-filter input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #ffffff;
  padding: 0 1rem;
  color: var(--text-main);
  outline: none;
}

.quick-search-form input:focus,
.search-panel input:focus,
.search-panel select:focus,
.inline-filter input:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.quick-search-form button,
.search-panel button {
  min-width: 6rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #ffffff;
  font-weight: 800;
}

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

.category-tile,
.category-overview-card {
  display: block;
  border-radius: 1.1rem;
  background: #ffffff;
  padding: 1.25rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-name {
  display: block;
  color: var(--text-main);
  font-weight: 850;
  font-size: 1.08rem;
}

.category-tile p,
.category-overview-card p {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.category-count {
  display: inline-flex;
  margin-top: 0.55rem;
  color: #ea580c;
  font-weight: 800;
  font-size: 0.9rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-main);
}

.section-heading a {
  color: #ea580c;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.08);
}

.poster-year {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  padding: 0.24rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.88);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card-body {
  padding: 1rem;
}

.movie-card-body h3 {
  margin: 0 0 0.5rem;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 2.7rem;
  margin: 0 0 0.8rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  color: #6b7280;
  font-size: 0.78rem;
}

.card-list .movie-card-link {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem;
}

.card-list .poster-frame {
  aspect-ratio: 16 / 10;
  min-height: 100%;
}

.dark-section {
  background: linear-gradient(135deg, #111827, #1f2937);
}

.dark-section .section-heading h2,
.dark-section .movie-card-body h3 {
  color: #ffffff;
}

.dark-section .section-heading a {
  color: #fed7aa;
}

.page-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  overflow: hidden;
}

.slim-hero {
  background: linear-gradient(135deg, #111827, #374151);
}

.page-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62));
}

.page-hero-content,
.slim-hero .container-custom {
  position: relative;
  z-index: 2;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.page-hero span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.18);
  color: #fed7aa;
  padding: 0.36rem 0.85rem;
  font-weight: 800;
}

.page-hero h1 {
  margin: 1rem 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.page-hero p {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 1.08rem;
}

.inline-filter {
  max-width: 520px;
  margin-top: 1.5rem;
}

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

.ranking-column,
.side-card,
.detail-card {
  border-radius: 1.2rem;
  background: #ffffff;
  padding: 1.4rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.ranking-column h2,
.side-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border-radius: 0.9rem;
  background: #ffffff;
  padding: 0.85rem;
  color: var(--text-main);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-column .rank-item,
.compact-ranks .rank-item {
  background: #f9fafb;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #fff7ed;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #ffffff;
  font-weight: 900;
}

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

.rank-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.search-panel {
  margin-bottom: 2rem;
  border-radius: 1.2rem;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.search-panel select {
  max-width: 14rem;
}

.search-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.search-result-heading h2 {
  margin: 0;
  font-size: 1.6rem;
}

.search-result-heading span {
  color: var(--text-muted);
  font-weight: 700;
}

.player-section {
  background: #050505;
  padding: 2rem 0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  background: #000000;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.36);
  font-size: 2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

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

.detail-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.detail-meta span {
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  padding: 0.34rem 0.76rem;
  font-size: 0.85rem;
  font-weight: 800;
}

.lead-text {
  color: #374151;
  font-weight: 700;
  font-size: 1.08rem;
}

.detail-card h2 {
  margin: 1.8rem 0 0.75rem;
  font-size: 1.35rem;
}

.detail-card p {
  color: #4b5563;
  line-height: 1.85;
}

.detail-tags {
  margin-top: 1.5rem;
}

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

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

.detail-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 5.5rem;
}

.poster-side-card img {
  width: 100%;
  border-radius: 0.85rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 1rem;
}

.full-button {
  display: flex;
  width: 100%;
  justify-content: center;
}

.info-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.75rem;
}

.info-list dt {
  color: var(--text-muted);
  font-weight: 700;
}

.info-list dd {
  margin: 0;
  color: var(--text-main);
  font-weight: 800;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer p {
  max-width: 560px;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin-bottom: 0.55rem;
  color: #9ca3af;
}

.site-footer a:hover {
  color: #fb923c;
}

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

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

@media (max-width: 900px) {
  .mobile-menu-button {
    display: flex;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 4rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 1rem;
    background: #111827;
    padding: 0.75rem;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 0.85rem 1rem;
    border-radius: 0.8rem;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(249, 115, 22, 0.12);
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .quick-search-card,
  .detail-grid,
  .footer-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .movie-list-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero-carousel,
  .hero-slides,
  .hero-slide {
    min-height: 560px;
  }

  .quick-search-section,
  .category-strip-section,
  .section-block {
    padding: 2.5rem 0;
  }

  .quick-search-card {
    margin-top: -4rem;
    padding: 1.25rem;
  }

  .quick-search-form,
  .search-panel {
    flex-direction: column;
  }

  .search-panel select {
    max-width: none;
  }

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

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

  .card-list .movie-card-link {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }

  .rank-item {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }
}
