:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --slate-50: #f8fafc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 22px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-900);
  background: var(--slate-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.logo:hover {
  color: var(--amber-700);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.30);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-weight: 650;
  color: var(--gray-700);
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--amber-600);
}

.top-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.top-search input,
.mobile-search input,
.hero-search input,
.filter-input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 16px;
  color: var(--gray-900);
}

.top-search button,
.mobile-search button,
.hero-search button {
  border: 0;
  padding: 12px 18px;
  color: white;
  background: var(--amber-600);
  cursor: pointer;
  font-weight: 750;
}

.top-search button:hover,
.mobile-search button:hover,
.hero-search button:hover {
  background: var(--amber-700);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-700);
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--gray-200);
  background: white;
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  color: white;
  background: linear-gradient(110deg, var(--amber-600), var(--orange-600));
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(circle at 84% 30%, rgba(17, 24, 39, 0.26), transparent 32%),
    linear-gradient(120deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.04));
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 54px;
  align-items: center;
  padding: 78px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--amber-700);
  background: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-search {
  width: min(560px, 100%);
  margin-bottom: 20px;
}

.hero-search input {
  flex: 1;
}

.hero-actions,
.hero-categories,
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.category-chip,
.more-link,
.filter-pills button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: var(--amber-700);
  background: white;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.ghost-btn,
.category-chip {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-chip:hover,
.more-link:hover,
.filter-pills button:hover {
  transform: translateY(-2px);
}

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

.hero-stage {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  overflow: hidden;
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  border-radius: 28px;
  background: rgba(17, 24, 39, 0.20);
  box-shadow: var(--shadow-xl);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.02));
}

.hero-card-copy {
  position: relative;
  z-index: 1;
  padding: 34px;
}

.hero-card-copy span {
  color: var(--amber-100);
  font-weight: 800;
}

.hero-card-copy h2 {
  margin: 10px 0;
  font-size: 34px;
  line-height: 1.12;
}

.hero-card-copy p {
  display: -webkit-box;
  margin: 0 0 20px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.90);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hero-card-copy a {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 32px;
  background: white;
}

.page-stack {
  display: grid;
  gap: 72px;
  padding: 72px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-heading span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  font-size: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
}

.with-tools {
  justify-content: space-between;
  gap: 16px;
}

.filter-input {
  width: min(420px, 100%);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow-sm);
}

.featured-panel,
.library-panel,
.ranking-panel,
.latest-panel,
.side-panel,
.detail-info,
.player-card,
.more-movies {
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-md);
}

.featured-panel {
  margin-inline: -18px;
  padding: 42px 18px;
  background: linear-gradient(135deg, var(--amber-50), #fff7ed);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-md);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.poster-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), #fed7aa);
}

.movie-card-large .poster-wrap {
  height: 330px;
}

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

.movie-card:hover .poster-wrap img,
.related-item:hover img,
.compact-card:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.06));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 7px;
  color: white;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.badge-year {
  right: 12px;
}

.badge-type {
  left: 12px;
  background: var(--amber-600);
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.70);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--amber-600);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span,
.filter-pills button {
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-50);
  font-size: 12px;
  font-weight: 750;
}

.tag-row span {
  padding: 5px 9px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 30px;
}

.ranking-panel,
.latest-panel,
.library-panel {
  padding: 30px;
}

.ranking-panel.wide {
  max-width: 980px;
  margin: 0 auto;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 82px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  background: white;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: var(--amber-100);
  background: var(--amber-50);
}

.rank-no {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  font-weight: 850;
}

.rank-row img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

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

.rank-text strong {
  margin-bottom: 3px;
}

.rank-text em {
  overflow: hidden;
  color: var(--gray-600);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--gray-500);
  font-size: 13px;
  white-space: nowrap;
}

.compact-grid {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: var(--gray-50);
  font-weight: 750;
}

.compact-card img {
  width: 118px;
  height: 78px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

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

.category-block {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.category-block strong {
  font-size: 23px;
}

.category-block span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

.sub-hero {
  padding: 72px 0;
  color: white;
  background: linear-gradient(120deg, var(--amber-600), var(--orange-600));
}

.sub-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.filter-pills {
  margin: 0 0 28px;
}

.filter-pills button {
  border: 0;
  padding: 10px 16px;
  cursor: pointer;
}

.filter-pills button.is-active {
  color: white;
  background: var(--amber-600);
}

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

.detail-page {
  background: var(--gray-50);
}

.detail-shell {
  padding: 30px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 24px;
  color: var(--gray-600);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-600);
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  padding: 0;
  overflow: hidden;
  background: #000;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: white;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.20));
}

.play-button {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: var(--amber-600);
  font-size: 32px;
  box-shadow: 0 18px 44px rgba(217, 119, 6, 0.45);
}

.player-overlay strong {
  position: relative;
  z-index: 2;
  margin-top: 128px;
  padding: 0 30px;
  font-size: clamp(24px, 4vw, 42px);
  text-align: center;
}

.detail-info,
.more-movies {
  padding: 30px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 700;
}

.detail-tags {
  margin: 18px 0 28px;
}

.detail-tags span {
  padding: 7px 11px;
}

.detail-info section {
  border-top: 1px solid var(--gray-200);
  padding-top: 24px;
  margin-top: 24px;
}

.detail-info h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-info p {
  margin: 0 0 12px;
  color: var(--gray-700);
}

.lead-text {
  font-weight: 750;
}

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

.side-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: var(--gray-50);
}

.related-item img {
  width: 112px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.25s ease;
}

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

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item em {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 40px;
  padding: 52px 0;
}

.footer-logo {
  color: white;
}

.footer-brand p {
  max-width: 620px;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: var(--amber-500);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  color: #9ca3af;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

[data-card].is-hidden {
  display: none;
}

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

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }

  .top-search {
    display: none;
  }

  .hero-layout,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 460px;
  }

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

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

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

  .with-tools {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .logo {
    font-size: 20px;
  }

  .hero-layout {
    padding: 48px 0;
    gap: 32px;
  }

  .hero-stage {
    min-height: 430px;
  }

  .hero-card-copy {
    padding: 24px;
  }

  .hero-card-copy h2 {
    font-size: 26px;
  }

  .page-stack {
    gap: 46px;
    padding: 46px 0;
  }

  .featured-panel,
  .library-panel,
  .ranking-panel,
  .latest-panel,
  .detail-info,
  .more-movies {
    padding: 22px;
    border-radius: 20px;
  }

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

  .poster-wrap,
  .movie-card-large .poster-wrap {
    height: 320px;
  }

  .rank-row {
    grid-template-columns: 38px 74px minmax(0, 1fr);
  }

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

  .related-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .related-item img {
    width: 96px;
    height: 64px;
  }
}
