:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-500: #f59e0b;
  --orange-600: #ea580c;
  --text: #172033;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #f9fafb 45%, #eef2ff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.24);
}

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

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

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  color: #fff;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.35);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.85);
  transform: translateY(-1px);
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.22);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.8);
}

.hero-carousel {
  position: relative;
  height: clamp(430px, 62vw, 620px);
  overflow: hidden;
  background: var(--slate-900);
}

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

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

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

.hero-bg {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.58) 42%, rgba(15, 23, 42, 0.12) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 82px;
  color: #fff;
}

.hero-kicker,
.detail-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 18px 0 14px;
  max-width: 820px;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 760px;
  color: #e5e7eb;
  font-size: clamp(15px, 2.2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.ranking-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags {
  margin-top: 18px;
}

.hero-tags span,
.detail-meta span,
.card-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 11px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.55);
}

.btn.ghost.light {
  color: var(--slate-900);
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.btn.small {
  min-height: 36px;
  padding: 0 14px;
  color: var(--orange-600);
  background: #fff7ed;
}

.btn.full {
  width: 100%;
  margin-top: 10px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.76);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 26px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.page-main {
  padding: 34px 0 72px;
}

.page-section {
  margin-top: 58px;
}

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

.section-heading h2,
.intro-panel h1,
.detail-card h1 {
  margin: 0;
  color: var(--slate-800);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.section-heading p,
.intro-panel p,
.overview-body p,
.spotlight-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--orange-600);
  font-weight: 800;
}

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

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

.library-grid {
  margin-top: 22px;
}

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 58%);
  opacity: 0.72;
}

.card-category,
.card-duration {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  padding: 5px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  top: 10px;
  left: 10px;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
}

.card-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  padding: 16px;
}

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

.card-body h3 {
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 17px;
  line-height: 1.32;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-body h3 {
  font-size: 15px;
}

.card-body h3 a:hover {
  color: var(--orange-600);
}

.card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 12px;
}

.rating,
.detail-rating,
.ranking-meta strong {
  color: #d97706;
  font-weight: 900;
}

.scroll-row,
.rank-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
}

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

.category-tile,
.overview-card,
.intro-panel,
.spotlight-card,
.detail-card,
.side-card,
.poster-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
}

.category-tile {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 132px;
}

.category-covers,
.overview-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100%;
}

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

.category-info,
.overview-body {
  padding: 20px;
}

.category-info strong,
.overview-body h2,
.side-card h2 {
  display: block;
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 20px;
  font-weight: 900;
}

.category-info span,
.overview-body p {
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.ranking-split {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: stretch;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 88px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rank-no {
  color: var(--orange-600);
  font-weight: 950;
  font-size: 20px;
}

.rank-item img {
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-info strong {
  color: var(--slate-800);
  font-weight: 900;
}

.rank-info em {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.spotlight-card {
  padding: 34px;
  color: #fff;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 35%), linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.spotlight-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.06em;
}

.spotlight-card p {
  color: #cbd5e1;
  margin-bottom: 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px 180px;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--slate-800);
  background: #fff;
  outline: none;
}

.search-box input:focus,
.select-box select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
  margin: 24px 0 0;
  padding: 26px;
  border-radius: 18px;
  text-align: center;
  color: #64748b;
  background: #fff;
}

.intro-panel {
  position: relative;
  padding: clamp(30px, 5vw, 56px);
  background: radial-gradient(circle at right top, rgba(245, 158, 11, 0.22), transparent 30%), linear-gradient(135deg, #fff, #f8fafc);
}

.intro-panel span {
  color: var(--orange-600);
  font-weight: 900;
}

.intro-panel h1 {
  margin-top: 12px;
  font-size: clamp(32px, 5vw, 58px);
}

.category-hero {
  color: var(--slate-900);
}

.overview-card {
  display: grid;
  grid-template-rows: 170px 1fr;
}

.overview-covers {
  grid-template-columns: repeat(4, 1fr);
}

.overview-links {
  display: grid;
  gap: 6px;
  margin: 16px 0;
}

.overview-links a {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.ranking-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  border-radius: 24px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
}

.ranking-cover {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

.ranking-cover img {
  height: 100%;
  object-fit: cover;
}

.ranking-cover span {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 12px;
  padding: 7px 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  font-weight: 950;
}

.ranking-body h2 {
  margin: 4px 0 10px;
  color: var(--slate-800);
  font-size: 24px;
  font-weight: 900;
}

.ranking-body p {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.8;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.card-tags span {
  color: #1d4ed8;
  background: #eff6ff;
}

.ranking-meta span {
  color: #64748b;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange-600);
  font-weight: 800;
}

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

.detail-primary {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 4px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.35);
  font-size: 34px;
}

.play-overlay strong {
  font-size: 18px;
}

.detail-card {
  padding: clamp(22px, 3vw, 32px);
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.detail-card h1 {
  margin-top: 12px;
  font-size: clamp(30px, 4.5vw, 48px);
}

.detail-rating {
  border-radius: 14px;
  padding: 10px 13px;
  background: #fffbeb;
  white-space: nowrap;
}

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

.detail-meta span {
  color: #475569;
  background: var(--slate-100);
}

.detail-card h2 {
  margin: 26px 0 12px;
  color: var(--slate-800);
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.poster-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.poster-card div {
  padding: 16px;
}

.poster-card strong,
.poster-card span {
  display: block;
}

.poster-card strong {
  color: var(--slate-800);
  font-weight: 900;
}

.poster-card span {
  margin-top: 5px;
  color: #64748b;
  font-size: 14px;
}

.side-card {
  padding: 18px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
}

.related-item strong,
.related-item em {
  display: block;
}

.related-item strong {
  color: var(--slate-800);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 900;
}

.related-item em {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 26px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
}

.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 700;
}

.footer-copy {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

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

  .category-grid,
  .overview-grid,
  .ranking-split,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header-inner {
    min-height: 66px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text em {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 14px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-content {
    padding-bottom: 78px;
  }

  .hero-control {
    display: none;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-cover {
    aspect-ratio: 16 / 9;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .container-wide,
  .site-header-inner,
  .footer-inner,
  .footer-copy {
    width: min(100% - 22px, 1280px);
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .scroll-row,
  .rank-strip {
    grid-auto-columns: minmax(250px, 86vw);
  }

  .rank-item {
    grid-template-columns: 38px 74px 1fr;
  }

  .related-item {
    grid-template-columns: 96px 1fr;
  }
}
