* {
  box-sizing: border-box;
}

:root {
  --lava-50: #fff7ed;
  --lava-100: #ffedd5;
  --lava-300: #fdba74;
  --lava-400: #fb923c;
  --lava-500: #f97316;
  --lava-600: #ea580c;
  --lava-700: #c2410c;
  --volcanic-50: #fafafa;
  --volcanic-100: #f4f4f5;
  --volcanic-200: #e4e4e7;
  --volcanic-300: #d4d4d8;
  --volcanic-400: #a1a1aa;
  --volcanic-500: #71717a;
  --volcanic-700: #3f3f46;
  --volcanic-800: #27272a;
  --volcanic-900: #18181b;
  --volcanic-950: #09090b;
  --shadow-card: 0 20px 45px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.10);
  font-family: Inter, Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--volcanic-900);
  background: #fff;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.text-gradient-lava {
  background: linear-gradient(90deg, var(--lava-600), var(--lava-500), #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-volcanic {
  background: radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.25), transparent 34%),
              linear-gradient(135deg, var(--volcanic-800), var(--volcanic-900) 48%, var(--volcanic-950));
  color: #fff;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--lava-600), var(--lava-400));
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.35);
}

.brand-text {
  font-size: clamp(1.15rem, 2vw, 1.8rem);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  font-weight: 700;
  color: var(--volcanic-800);
  transition: color 0.25s ease;
}

.hero-slider + .site-header .nav-link,
.site-header:not(.is-scrolled):not(.is-open) .nav-link {
  color: var(--volcanic-800);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--lava-600);
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--lava-600);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--volcanic-800);
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--volcanic-800);
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: var(--lava-50);
  color: var(--lava-600);
}

.hero-slider {
  position: relative;
  min-height: 88vh;
  overflow: hidden;
  background: var(--volcanic-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.52) 44%, rgba(0, 0, 0, 0.14) 100%),
              linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 14vh;
  transform: translateX(-50%);
  color: #fff;
  max-width: 1280px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lava-300);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 760px;
  margin: 24px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-tags,
.tag-row,
.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.mini-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
}

.tag-row span,
.mini-chip-row span {
  color: var(--lava-700);
  background: var(--lava-50);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: var(--lava-600);
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover,
.card-hover:hover {
  transform: translateY(-4px);
}

.btn-primary:hover {
  background: var(--lava-700);
  box-shadow: 0 22px 38px rgba(234, 88, 12, 0.40);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-arrow:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(0, 0, 0, 0.56);
}

.hero-prev {
  left: 22px;
  transform: translateY(-50%);
}

.hero-next {
  right: 22px;
  transform: translateY(-50%);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 34px;
  background: var(--lava-500);
}

.hero-search {
  position: absolute;
  right: max(16px, calc((100vw - 1280px) / 2));
  bottom: 86px;
  display: flex;
  width: min(430px, calc(100% - 32px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: #fff;
  background: transparent;
  padding: 0 12px;
  outline: none;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--lava-600);
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.section-block {
  padding: clamp(54px, 8vw, 96px) 0;
}

.section-warm {
  background: linear-gradient(180deg, #fff7ed, #fff);
}

.section-deep {
  background: linear-gradient(180deg, var(--volcanic-950), var(--volcanic-900));
  color: #fff;
}

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

.section-heading h2,
.detail-main h2,
.detail-side h2,
.category-overview-card h2,
.footer-grid h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--volcanic-500);
}

.section-deep .section-heading p {
  color: var(--volcanic-300);
}

.section-link,
.text-link {
  color: var(--lava-600);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 176px;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow-card);
}

.movie-card-compact {
  grid-template-columns: 104px 1fr;
  min-height: 154px;
}

.movie-poster {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: hidden;
  background: var(--volcanic-200);
}

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

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.detail-poster:hover img {
  transform: scale(1.06);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--lava-600), var(--lava-400));
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-width: 0;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--volcanic-900);
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.25;
}

.movie-title:hover {
  color: var(--lava-600);
}

.movie-meta {
  margin: 8px 0;
  color: var(--volcanic-500);
  font-size: 0.92rem;
  font-weight: 700;
}

.movie-desc {
  margin: 0 0 12px;
  color: var(--volcanic-700);
  font-size: 0.94rem;
}

.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px;
  color: #fff;
  background: var(--volcanic-900);
  box-shadow: var(--shadow-soft);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.82));
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.page-hero {
  padding: 132px 0 76px;
}

.page-hero-inner {
  max-width: 900px;
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--volcanic-200);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--volcanic-500);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--volcanic-200);
  border-radius: 12px;
  color: var(--volcanic-900);
  background: var(--volcanic-50);
  padding: 0 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--lava-500);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.movie-card.is-hidden {
  display: none;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 20px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 120px;
  gap: 8px;
}

.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.category-overview-card p {
  color: var(--volcanic-600);
}

.detail-hero {
  padding: 122px 0 72px;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: clamp(24px, 5vw, 58px);
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--lava-300);
}

.detail-one-line {
  max-width: 860px;
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.2rem;
}

.detail-tags {
  margin-bottom: 28px;
}

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

.detail-main,
.detail-side {
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-main {
  padding: clamp(18px, 3vw, 30px);
}

.detail-main h2,
.detail-side h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.detail-main p {
  color: var(--volcanic-700);
  font-size: 1.05rem;
}

.detail-side {
  padding: 24px;
  position: sticky;
  top: 96px;
}

.info-list {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0 0 22px;
}

.info-list dt {
  color: var(--volcanic-500);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--volcanic-900);
  font-weight: 700;
}

.movie-player {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

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

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), rgba(0, 0, 0, 0.56));
}

.player-poster.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--lava-600);
  font-size: 2rem;
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.42);
}

.site-footer {
  padding-top: 54px;
}

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

.footer-grid a {
  display: block;
  width: fit-content;
  margin-top: 8px;
  color: var(--volcanic-300);
}

.footer-grid a:hover {
  color: var(--lava-300);
}

.footer-brand p {
  max-width: 520px;
  color: var(--volcanic-300);
}

.footer-logo {
  color: #fff;
  font-size: 1.4rem;
}

.footer-bottom {
  margin-top: 36px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--volcanic-400);
}

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

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

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

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

  .menu-toggle {
    display: flex;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-content {
    bottom: 190px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
    bottom: 78px;
    width: auto;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

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

  .detail-poster {
    max-width: 280px;
  }

  .detail-side {
    position: static;
  }

  .category-cover-stack {
    grid-auto-rows: 150px;
  }
}

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

  .header-inner {
    height: 64px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.4rem;
  }

  .hero-actions,
  .hero-search {
    flex-direction: column;
  }

  .hero-search button {
    width: 100%;
  }

  .movie-card,
  .movie-card-compact {
    grid-template-columns: 96px 1fr;
    min-height: 150px;
    border-radius: 18px;
  }

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

  .movie-desc {
    -webkit-line-clamp: 2;
  }

  .play-ring {
    width: 68px;
    height: 68px;
  }
}
