:root {
  --ash-50: #f8f9fa;
  --ash-100: #f1f3f5;
  --ash-200: #dee2e6;
  --ash-400: #868e96;
  --ash-700: #343a40;
  --ash-800: #212529;
  --ash-900: #0d0f12;
  --volcanic-50: #fef5f1;
  --volcanic-100: #fdeae1;
  --volcanic-600: #f07f4a;
  --volcanic-700: #ee692c;
  --volcanic-800: #e84118;
  --volcanic-900: #c03711;
  --lava-100: #ffe6b3;
  --lava-400: #ffb81a;
  --lava-600: #e68a00;
  --white: #ffffff;
  --shadow-volcanic: 0 10px 40px -15px rgba(232, 65, 24, 0.4);
  --shadow-volcanic-lg: 0 20px 60px -20px rgba(232, 65, 24, 0.5);
  --shadow-card: 0 12px 32px rgba(13, 15, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ash-800);
  background: linear-gradient(180deg, var(--ash-50), #ffffff 45%, var(--volcanic-50));
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--volcanic-800), var(--volcanic-900));
  box-shadow: 0 14px 32px rgba(192, 55, 17, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ash-900);
  background: var(--lava-400);
  box-shadow: 0 0 28px rgba(255, 184, 26, 0.45);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  color: var(--volcanic-100);
  font-size: 0.76rem;
  font-style: normal;
}

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

.nav-link {
  color: #fff8f5;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--lava-400);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 7px 11px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: clamp(540px, 72vw, 660px);
  overflow: hidden;
  background: var(--ash-900);
}

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

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

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 184, 26, 0.18), transparent 26%),
    linear-gradient(0deg, rgba(13, 15, 18, 0.98), rgba(13, 15, 18, 0.5) 48%, rgba(13, 15, 18, 0.12)),
    linear-gradient(90deg, rgba(13, 15, 18, 0.88), rgba(13, 15, 18, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 120px;
  color: var(--white);
}

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

.hero-content h1,
.hero-content h2,
.compact-hero h1,
.detail-intro h1 {
  max-width: 760px;
  margin: 0;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2.1vw, 1.25rem);
}

.hero-tags,
.tag-list,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--volcanic-900);
  background: var(--lava-100);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--volcanic-600), var(--volcanic-800));
  box-shadow: var(--shadow-volcanic);
}

.btn-primary:hover {
  box-shadow: var(--shadow-volcanic-lg);
}

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

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--lava-400);
}

.hero-rail {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 64px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  transform: translateX(-50%);
}

.hero-rail a {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 8px;
  color: var(--white);
  background: rgba(13, 15, 18, 0.5);
  backdrop-filter: blur(10px);
}

.hero-rail img {
  width: 56px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-rail span {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-search,
.page-section {
  padding: 56px 0 0;
}

.home-search-inner,
.filter-panel,
.story-card,
.category-tile,
.movie-card,
.player-box {
  border: 1px solid rgba(222, 226, 230, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
}

.home-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  padding: 26px;
}

.home-search h2,
.section-head h2,
.story-card h2,
.player-section h2 {
  margin: 0;
  color: var(--ash-900);
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  font-weight: 900;
}

.home-search p,
.section-head p,
.compact-hero p,
.story-card p {
  margin: 8px 0 0;
  color: var(--ash-700);
}

.home-search-form {
  display: flex;
  gap: 10px;
}

.home-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--ash-200);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: var(--white);
}

.home-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--volcanic-600);
  box-shadow: 0 0 0 4px rgba(240, 127, 74, 0.15);
}

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

.section-head a {
  color: var(--volcanic-700);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(13, 15, 18, 0.18);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--volcanic-100), var(--ash-200));
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.04);
}

.play-dot,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-dot {
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  color: var(--ash-900);
  background: var(--lava-400);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--volcanic-600), var(--volcanic-900));
}

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

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--ash-900);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title:hover {
  color: var(--volcanic-800);
}

.movie-meta {
  margin: 4px 0 0;
  color: var(--ash-400);
  font-size: 0.82rem;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--ash-700);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list span {
  color: var(--lava-600);
  background: var(--volcanic-50);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px 64px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(13, 15, 18, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 28px rgba(13, 15, 18, 0.14);
}

.rank-number {
  color: var(--volcanic-800);
  font-size: 1.28rem;
  font-weight: 900;
  text-align: center;
}

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

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

.rank-text strong {
  color: var(--ash-900);
  font-weight: 850;
}

.rank-text em {
  overflow: hidden;
  color: var(--ash-400);
  font-size: 0.82rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
}

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

.category-tile:hover img {
  transform: scale(1.07);
}

.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 15, 18, 0.86), rgba(13, 15, 18, 0.18));
}

.category-tile-content {
  position: absolute;
  inset: auto 18px 18px;
  color: var(--white);
}

.category-tile-content strong,
.category-tile-content em {
  display: block;
}

.category-tile-content strong {
  font-size: 1.28rem;
  font-weight: 900;
}

.category-tile-content em {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.86rem;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 184, 26, 0.26), transparent 24%),
    linear-gradient(120deg, var(--ash-900), var(--volcanic-900));
}

.compact-hero .container {
  padding: 76px 0;
}

.compact-hero h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 5vw, 4.1rem);
}

.compact-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 210px));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
}

.filter-panel label span {
  display: block;
  margin: 0 0 6px 8px;
  color: var(--ash-700);
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--ash-900);
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: end;
  min-height: 560px;
  padding: 76px 0;
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 15, 18, 0.95), rgba(13, 15, 18, 0.64), rgba(13, 15, 18, 0.72)),
    linear-gradient(0deg, rgba(13, 15, 18, 1), transparent 55%);
}

.detail-poster {
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.44);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

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

.detail-one-line {
  max-width: 820px;
  margin: 18px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.15rem;
}

.detail-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.player-section {
  padding: 56px 0 0;
}

.player-section h2 {
  margin-bottom: 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: var(--ash-900);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(13, 15, 18, 0.72), rgba(13, 15, 18, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.overlay-play {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ash-900);
  background: var(--lava-400);
  box-shadow: 0 0 46px rgba(255, 184, 26, 0.55);
  font-size: 2rem;
}

.player-overlay strong {
  max-width: min(80%, 680px);
  overflow: hidden;
  font-size: clamp(1.25rem, 3vw, 2rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  padding: 32px 0 0;
}

.story-card {
  padding: 26px;
}

.story-card p {
  font-size: 1.02rem;
}

.accent-card {
  border-left: 5px solid var(--lava-400);
  background: linear-gradient(135deg, var(--white), var(--volcanic-50));
}

.site-footer {
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.75);
  background: var(--ash-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: var(--lava-400);
}

.site-footer p {
  max-width: 440px;
  margin: 12px 0 0;
}

.footer-brand {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 1024px) {
  .movie-grid,
  .rank-page-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .hero-rail {
    display: none;
  }
}

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

  .nav-wrap {
    min-height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 18px;
    padding: 10px;
    background: var(--ash-900);
    box-shadow: 0 20px 48px rgba(13, 15, 18, 0.34);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .hero-carousel {
    height: 620px;
  }

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

  .hero-actions,
  .home-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .home-search-inner,
  .filter-panel,
  .detail-hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    border-radius: 20px;
  }

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

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

  .detail-hero-grid {
    min-height: 0;
    padding: 42px 0 52px;
  }

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

  .brand-text em {
    display: none;
  }

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