:root {
  --primary-50: #f0f9f4;
  --primary-100: #dcf0e3;
  --primary-200: #bce0ca;
  --primary-400: #5dab7d;
  --primary-500: #3a8f5f;
  --primary-600: #2a724c;
  --primary-700: #225b3e;
  --primary-800: #1d4933;
  --secondary-50: #fdf8f3;
  --secondary-100: #f9ede0;
  --secondary-600: #c96c3a;
  --secondary-700: #a85632;
  --accent-50: #f5f8fa;
  --accent-100: #e8eef3;
  --accent-600: #6083b5;
  --accent-800: #475d88;
  --night-50: #f4f6f8;
  --night-100: #e3e8ed;
  --night-300: #a5b5c5;
  --night-400: #7991a8;
  --night-700: #3b4c61;
  --night-900: #2e3946;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 16px 42px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--primary-50) 0%, #ffffff 42%, var(--night-50) 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(42, 114, 76, 0.25);
}

.brand__text {
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #344054;
  font-size: 15px;
  font-weight: 650;
}

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

.nav-links a:hover {
  color: var(--primary-600);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d0d5dd;
  outline: none;
  color: #344054;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(188, 224, 202, 0.75);
}

.header-search input {
  width: 240px;
  padding: 10px 14px;
  border-radius: 999px;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.play-button,
.filter-bar button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-bar button {
  color: var(--white);
  background: var(--primary-600);
  border-radius: 999px;
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.filter-bar button:hover {
  background: var(--primary-700);
  box-shadow: 0 12px 24px rgba(42, 114, 76, 0.25);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--night-50);
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--night-900);
}

.mobile-panel {
  display: none;
  padding: 18px 24px 22px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

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

.mobile-panel a {
  font-weight: 700;
  color: #344054;
}

.mobile-search input {
  flex: 1;
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
}

.mobile-search button {
  padding: 10px 16px;
}

.hero {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-slide__image {
  position: absolute;
  inset: 0;
}

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

.hero-slide__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-slide__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
}

.hero-text {
  max-width: 760px;
  color: var(--white);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  margin-bottom: 18px;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
}

.secondary-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--white);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-arrow--prev {
  left: 28px;
}

.hero-arrow--next {
  right: 28px;
}

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

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

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

.section {
  padding: 72px 0;
}

.section--soft {
  background: linear-gradient(90deg, var(--primary-50), var(--accent-50));
}

.section--night {
  background: var(--night-50);
}

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

.section__head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.03em;
}

.section__head h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.section__head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section__head a {
  min-width: max-content;
  color: var(--primary-600);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--night-100);
}

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

.movie-card:hover .movie-card__cover img,
.wide-card:hover img,
.rank-item:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.movie-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
  transition: opacity 0.25s ease;
}

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

.movie-card__badge,
.movie-card__year {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  color: var(--white);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card__badge {
  top: 10px;
  left: 10px;
  background: var(--primary-600);
}

.movie-card__year {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.78);
}

.movie-card__body {
  padding: 18px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a {
  transition: color 0.2s ease;
}

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

.movie-card__meta,
.movie-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-card__text {
  display: -webkit-box;
  min-height: 44px;
  margin-top: 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card--compact .movie-card__text {
  display: none;
}

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

.wide-card {
  display: flex;
  overflow: hidden;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.wide-card__cover {
  flex: 0 0 42%;
  overflow: hidden;
  background: var(--night-100);
}

.wide-card__cover img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.wide-card__body {
  flex: 1;
  padding: 20px;
}

.wide-card__body span {
  display: inline-flex;
  padding: 4px 10px;
  color: var(--secondary-700);
  background: var(--secondary-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.wide-card__body h3 {
  margin: 12px 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.wide-card__body p {
  margin: 0;
  color: var(--muted);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  scrollbar-color: var(--primary-400) var(--night-100);
}

.page-hero {
  padding: 72px 0;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-600), var(--primary-800));
}

.page-hero--accent {
  background: linear-gradient(90deg, var(--accent-600), var(--accent-800));
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.category-tile {
  min-height: 210px;
  padding: 28px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile span {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  color: var(--primary-700);
  background: var(--primary-100);
  border-radius: 16px;
  font-weight: 900;
}

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  margin: 0 0 22px;
  color: var(--muted);
}

.category-tile strong {
  color: var(--primary-600);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
}

.filter-bar button {
  padding: 0 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 132px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.rank-item__number {
  color: var(--secondary-600);
  font-size: 28px;
  font-weight: 900;
}

.rank-item__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--night-100);
}

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

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-item span:last-child {
  color: var(--night-400);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
  padding: 36px 0 70px;
}

.player-shell {
  overflow: hidden;
  background: #000;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

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

.player-cover.is-hidden {
  display: none;
}

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

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.play-button {
  position: relative;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: var(--white);
  background: rgba(42, 114, 76, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.play-button:hover {
  transform: scale(1.05);
  background: var(--primary-700);
}

.play-button span {
  transform: translateX(3px);
  font-size: 34px;
}

.detail-copy,
.sidebar-card {
  margin-top: 22px;
  padding: 28px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.detail-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 46px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
}

.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  background: var(--night-50);
  border-radius: 999px;
  font-size: 14px;
}

.detail-copy h2,
.sidebar-card h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-copy p {
  margin: 0 0 16px;
  color: #344054;
}

.review-box {
  padding: 22px;
  background: linear-gradient(90deg, var(--accent-50), var(--primary-50));
  border-radius: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.tag-list span {
  display: inline-flex;
  padding: 6px 12px;
  color: #475467;
  background: var(--night-50);
  border-radius: 999px;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

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

.sidebar-card {
  position: sticky;
  top: 92px;
  margin-top: 0;
}

.sidebar-card h2 {
  margin-top: 0;
}

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

.related-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: var(--night-50);
}

.related-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: var(--night-100);
}

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

.related-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-empty {
  padding: 70px 24px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.site-footer {
  color: var(--white);
  background: var(--night-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 52px 0;
}

.brand--footer .brand__text {
  color: var(--white);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

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

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  color: var(--night-300);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding: 18px;
  color: var(--night-400);
  text-align: center;
  border-top: 1px solid var(--night-700);
}

@media (max-width: 1080px) {
  .nav-links,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

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

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }
}

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

  .hero {
    height: 68vh;
    min-height: 500px;
  }

  .hero-slide__content {
    padding-bottom: 68px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section__head {
    display: block;
  }

  .section__head a {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .movie-card__body {
    padding: 14px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card__text {
    display: none;
  }

  .wide-grid,
  .rank-grid,
  .category-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    display: block;
  }

  .wide-card__cover img {
    min-height: auto;
  }

  .rank-item {
    grid-template-columns: 42px 104px 1fr;
    gap: 10px;
  }

  .rank-item p {
    display: none;
  }

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

  .play-button {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid--three,
  .movie-grid--five {
    grid-template-columns: 1fr;
  }

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