:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #f97316;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #f1f5f9;
  --shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f9fafb;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.nav-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
}

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

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--amber-dark), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.mobile-link:hover {
  color: var(--amber-dark);
  background: #fffbeb;
}

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

.nav-cta,
.mobile-cta,
.btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.28);
  transition: 0.25s ease;
}

.nav-cta:hover,
.mobile-cta:hover,
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 44px rgba(245, 158, 11, 0.34);
}

.btn-light {
  color: var(--amber-dark);
  background: #fff;
  border: 2px solid #fde68a;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
}

.btn-ghost {
  color: var(--amber-dark);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: none;
}

.btn-small {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fffbeb;
  color: var(--amber-dark);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
}

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

.hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #ffedd5 48%, #fef9c3);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: radial-gradient(circle at 22px 22px, rgba(217, 119, 6, 0.18) 2px, transparent 0), radial-gradient(circle at 70% 20%, rgba(249, 115, 22, 0.22), transparent 26%), radial-gradient(circle at 15% 82%, rgba(245, 158, 11, 0.24), transparent 24%);
  background-size: 46px 46px, 100% 100%, 100% 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 86px 0 76px;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(360px, 0.8fr);
  gap: 46px;
  align-items: center;
}

.hero-copy {
  text-align: left;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--amber-dark);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 24px 0 20px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero h1 span,
.page-hero h1 span {
  background: linear-gradient(90deg, var(--amber-dark), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-hero p,
.detail-copy p {
  color: #4b5563;
  font-size: 19px;
  line-height: 1.8;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-focus {
  position: relative;
  border-radius: 32px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-focus-card {
  display: none;
  grid-template-columns: 48% minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.hero-focus-card.active {
  display: grid;
  animation: fadeInUp 0.45s ease both;
}

.hero-image {
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image:hover img,
.movie-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.hero-movie-copy {
  padding: 18px 8px 18px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-movie-copy span,
.card-meta,
.detail-stats,
.breadcrumbs {
  color: var(--muted);
  font-size: 14px;
}

.hero-movie-copy h2 {
  margin: 14px 0 12px;
  font-size: 30px;
  line-height: 1.18;
}

.hero-movie-copy p {
  font-size: 15px;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 20px;
}

.hero-switch {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-switch button,
.back-top {
  border: 0;
  cursor: pointer;
}

.hero-switch > button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 26px;
  line-height: 1;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  margin: 0 4px;
  background: #fcd34d;
  opacity: 0.6;
}

.hero-dot.active {
  width: 28px;
  opacity: 1;
  background: var(--orange);
}

.section {
  padding: 76px 0;
}

.white-section {
  background: #fff;
}

.soft-section {
  background: linear-gradient(135deg, #f9fafb, #fff7ed);
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-link {
  color: var(--amber-dark);
  font-weight: 900;
  white-space: nowrap;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 54px rgba(17, 24, 39, 0.14);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 290px;
  overflow: hidden;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.compact-card .poster-wrap {
  height: 230px;
}

.poster-wrap img,
.category-cover img,
.ranking-poster img,
.detail-poster img,
.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-play,
.play-button {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
  font-size: 26px;
}

.score-badge,
.year-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.score-badge {
  left: 12px;
  color: #fff;
  background: var(--amber);
}

.year-badge {
  right: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h2 a:hover,
.ranking-copy h2 a:hover,
.hero-movie-copy h2 a:hover {
  color: var(--amber-dark);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.detail-stats span,
.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f8fafc;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #111827;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.16));
}

.category-copy {
  position: absolute;
  inset: auto 18px 18px;
  color: #fff;
}

.category-copy strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.category-copy small {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.75fr);
  gap: 44px;
}

.rank-list,
.mini-list,
.ranking-list {
  display: grid;
  gap: 14px;
}

.rank-item,
.mini-card,
.ranking-card {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
  transition: 0.25s ease;
}

.rank-item {
  grid-template-columns: 54px 76px minmax(0, 1fr) 24px;
}

.rank-item:hover,
.mini-card:hover,
.ranking-card:hover {
  background: #fffbeb;
  transform: translateY(-2px);
}

.rank-num,
.ranking-num {
  font-size: 24px;
  font-weight: 950;
  color: var(--amber-dark);
}

.rank-item img,
.mini-card img {
  width: 76px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy strong,
.mini-card strong {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy small,
.mini-card small {
  color: var(--muted);
}

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

.mini-card img {
  width: 96px;
  height: 64px;
}

.mini-list.tight {
  gap: 8px;
  margin: 16px 0;
}

.page-hero {
  padding: 72px 0;
  text-align: center;
}

.page-hero .site-container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(34px, 4vw, 56px);
}

.page-hero p {
  margin: 0 auto;
}

.category-overview-list {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 26px;
  padding: 22px;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover {
  min-height: 260px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  font-size: 30px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 30px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.08);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, 180px);
  gap: 14px;
  align-items: end;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 800;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid #fde68a;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdf7;
  color: var(--ink);
  outline: none;
}

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

.filter-empty {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.ranking-list {
  gap: 16px;
}

.ranking-card {
  grid-template-columns: 74px 110px minmax(0, 1fr) 90px;
  padding: 16px;
}

.ranking-poster {
  height: 78px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.ranking-copy h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-copy p {
  margin: 0 0 10px;
  color: #4b5563;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-link {
  justify-self: end;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  font-weight: 900;
}

.detail-hero {
  padding: 42px 0 64px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
}

.breadcrumbs a:hover {
  color: var(--amber-dark);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  min-height: 520px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(34px, 4vw, 56px);
}

.detail-stats {
  margin: 24px 0;
}

.detail-stats strong {
  color: var(--amber-dark);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tag-list span {
  color: var(--amber-dark);
  background: #fffbeb;
  font-weight: 800;
}

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

.movie-player-video,
.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player-video {
  z-index: 1;
  background: #030712;
}

.player-poster {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #030712;
}

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1));
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  font-size: 34px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(249, 115, 22, 0.9));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.movie-player.is-playing .player-poster {
  display: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.detail-panel {
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-panel p {
  margin: 0;
  color: #374151;
  line-height: 2;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: none;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: var(--shadow);
  z-index: 60;
}

.back-top.visible {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 34px;
  padding: 56px 0 38px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
  margin-bottom: 16px;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h2 {
  color: #fff;
  font-size: 18px;
  margin: 0 0 16px;
}

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

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

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .hero-copy {
    text-align: center;
  }

  .hero-copy p,
  .hero-actions {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 980px) {
  .nav-menu,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

  .two-column,
  .detail-layout,
  .detail-text,
  .category-overview-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .site-container {
    width: min(100% - 24px, 1280px);
  }

  .brand-subtitle {
    display: none;
  }

  .brand-name {
    font-size: 19px;
  }

  .hero-inner,
  .page-hero,
  .detail-hero {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

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

  .hero-image {
    min-height: 300px;
  }

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

  .section {
    padding: 52px 0;
  }

  .section-head {
    display: grid;
  }

  .filter-controls,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .ranking-num,
  .ranking-link {
    justify-self: start;
  }

  .poster-wrap,
  .compact-card .poster-wrap {
    height: 360px;
  }
}
