:root {
  color-scheme: light;
  --surface: #ffffff;
  --muted: #64748b;
  --ink: #0f172a;
  --line: rgba(148, 163, 184, 0.24);
  --shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #f8fafc;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.22);
}

.site-header-row {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fb923c, #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
  font-size: 0.8rem;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  color: #e2e8f0;
  font-weight: 650;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.95);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.22);
}

.mobile-menu-button {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-button span {
  width: 1.25rem;
  height: 0.12rem;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 0 0 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #020617;
  color: #fff;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.05) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(249, 115, 22, 0.32), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(6, 182, 212, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.76) 48%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.5fr);
  align-items: center;
  gap: 3rem;
  padding-top: 3.25rem;
  padding-bottom: 8.5rem;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.34);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.55rem, 7vw, 5.6rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.065em;
  margin-bottom: 1.1rem;
}

.hero p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0 2rem;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.9rem 1.35rem;
  border-radius: 1rem;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, #f97316, #ea580c);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.35);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-poster {
  position: relative;
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 1.5rem;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4.4rem;
  height: 4.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 6.8rem;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
}

.hero-controls > button {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  font-size: 1.85rem;
  line-height: 1;
  transition: 0.22s ease;
}

.hero-controls > button:hover {
  background: rgba(249, 115, 22, 0.85);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

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

.hero-dot.active {
  width: 2rem;
  background: #fb923c;
}

.hero-strip {
  position: absolute;
  left: 50%;
  bottom: 1.15rem;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero-mini-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.55rem;
  border-radius: 1rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  transition: 0.22s ease;
}

.hero-mini-card:hover {
  background: rgba(249, 115, 22, 0.8);
}

.hero-mini-card img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

.hero-mini-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  font-size: 0.92rem;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.22), transparent 32%),
    linear-gradient(135deg, #1e3a8a, #1e40af, #0f172a);
  padding: 5rem 0 4rem;
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 820px;
  color: #dbeafe;
  font-size: 1.15rem;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  color: #bfdbfe;
  font-weight: 650;
}

.breadcrumb a:hover {
  color: #fff;
}

.content-section {
  padding: 4rem 0;
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #111827;
}

.section-heading p {
  margin-top: 0.45rem;
  color: #64748b;
  line-height: 1.7;
}

.title-bar {
  width: 0.5rem;
  height: 2rem;
  display: inline-flex;
  border-radius: 999px;
  flex: 0 0 auto;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.movie-card:hover {
  transform: translateY(-0.45rem);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 56%);
  opacity: 0.86;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.year-badge {
  left: 0.65rem;
  bottom: 0.65rem;
}

.rank-badge {
  right: 0.65rem;
  top: 0.65rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

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

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

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

.movie-card-body h3 {
  min-height: 2.75rem;
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.35;
  color: #111827;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card-body p {
  margin-top: 0.45rem;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.card-meta span {
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
}

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

.category-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-0.3rem);
  box-shadow: var(--shadow);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 190px;
  background: #0f172a;
}

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

.category-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-body h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card-body p {
  margin: 0.75rem 0 1rem;
  color: #64748b;
  line-height: 1.7;
}

.category-link {
  font-weight: 850;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.96);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 3rem;
  border-radius: 0.9rem;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  padding: 0 0.9rem;
  color: #0f172a;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.18);
}

.empty-state {
  margin-bottom: 1.5rem;
  padding: 1rem;
  text-align: center;
  border-radius: 1rem;
  color: #64748b;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.96);
}

.detail-page {
  min-height: 100vh;
  color: #e2e8f0;
  background: linear-gradient(135deg, #020617, #111827 48%, #0f172a);
}

.detail-shell {
  padding: 2rem 0 4rem;
}

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

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  background: #000;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.38);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: #fff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.24), rgba(2, 6, 23, 0.66));
  transition: 0.25s ease;
}

.player-cover strong {
  width: 4.8rem;
  height: 4.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
  font-size: 1.4rem;
}

.player-cover span {
  font-weight: 850;
  letter-spacing: 0.05em;
}

.player-wrap.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  display: none;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  color: #fff;
  background: rgba(220, 38, 38, 0.9);
}

.player-message.show {
  display: block;
}

.detail-card,
.related-card {
  border-radius: 1.15rem;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.18);
}

.detail-card {
  padding: 1.5rem;
}

.detail-card h1 {
  color: #fff;
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

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

.detail-meta span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #334155;
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 700;
}

.detail-meta span:first-child {
  background: #f97316;
  color: #fff;
}

.detail-lead {
  color: #67e8f9;
  font-size: 1.1rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.detail-card h2,
.detail-card h3,
.related-card h2 {
  color: #fff;
  font-weight: 900;
  margin-bottom: 0.8rem;
}

.detail-card h2 {
  font-size: 1.35rem;
}

.detail-card h3 {
  font-size: 1.15rem;
}

.detail-card p {
  color: #cbd5e1;
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

.review-box {
  padding: 1.2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #334155, #1e293b);
  border-left: 4px solid #f97316;
}

.related-card {
  padding: 1.2rem;
}

.related-list {
  display: grid;
  gap: 0.75rem;
}

.related-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 0.9rem;
  color: #e2e8f0;
  transition: 0.22s ease;
}

.related-item:hover {
  background: rgba(51, 65, 85, 0.95);
}

.related-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.7rem;
  object-fit: cover;
}

.related-item h3 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.related-item p {
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.82rem;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-weight: 900;
  margin-bottom: 0.85rem;
}

.site-footer h2 {
  font-size: 1.35rem;
}

.site-footer h3 {
  font-size: 1.1rem;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-panel {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.7fr));
  }
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }

  .mobile-nav.open {
    display: none;
  }

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

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

  .footer-grid {
    grid-template-columns: 1.35fr 0.8fr 0.8fr 1fr;
  }
}

@media (min-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .related-card {
    position: sticky;
    top: 6rem;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 640px;
    gap: 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 8rem;
  }

  .hero-poster {
    display: none;
  }

  .hero-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    bottom: 0.8rem;
  }

  .hero-mini-card:nth-child(n + 4) {
    display: none;
  }

  .hero-controls {
    bottom: 5.4rem;
  }
}

@media (max-width: 640px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .category-covers {
    min-height: 150px;
  }

  .related-item {
    grid-template-columns: 6rem 1fr;
  }
}
