:root {
  --fire-50: #fff8f0;
  --fire-100: #ffefd6;
  --fire-500: #ff7a14;
  --fire-600: #f05d00;
  --fire-700: #c74400;
  --ember-50: #fdf4f3;
  --ember-100: #fce7e4;
  --ember-600: #cf4332;
  --ember-700: #ad3427;
  --forest-50: #f3f6f3;
  --forest-100: #e3e9e3;
  --forest-600: #475e47;
  --forest-700: #3a4c3a;
  --ash-50: #f8f7f6;
  --ash-100: #efedeb;
  --ash-200: #ddd9d5;
  --ash-300: #c3bdb6;
  --ash-400: #a59d93;
  --ash-500: #83766d;
  --ash-600: #6d625c;
  --ash-700: #5a524e;
  --ash-900: #4a4441;
  --white: #ffffff;
  --black: #000000;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 22px rgba(74, 68, 65, 0.12);
  --shadow-lg: 0 18px 40px rgba(74, 68, 65, 0.18);
  --shadow-2xl: 0 30px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  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: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(221, 217, 213, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

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

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

.brand-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--fire-500), var(--ember-600));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(240, 93, 0, 0.24);
  transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.05);
}

.brand-text strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  color: var(--ash-500);
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--ash-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ash-700);
  border-radius: 4px;
}

.hero-carousel {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--fire-50), var(--ember-50), var(--ash-100));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(0.92);
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 17, 15, 0.86), rgba(20, 17, 15, 0.58), rgba(20, 17, 15, 0.18)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 76vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 420px);
  align-items: center;
  gap: 56px;
  padding: 72px 0 120px;
}

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

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

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 18px 0 10px;
  color: var(--fire-100);
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.hero-tags,
.movie-tags,
.tag-cloud,
.filter-row,
.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span,
.tag-cloud span,
.detail-meta-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

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

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--fire-600), var(--ember-600));
  box-shadow: 0 14px 28px rgba(240, 93, 0, 0.28);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.btn-ghost.light {
  color: var(--ash-900);
  background: var(--white);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-2xl);
  transform: rotate(1.5deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 14px;
  color: var(--white);
  background: rgba(240, 93, 0, 0.92);
  border-radius: 999px;
  font-weight: 800;
}

.hero-tools {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-search,
.search-panel {
  display: flex;
  width: min(520px, 100%);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.hero-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  color: var(--ash-900);
  background: transparent;
  outline: none;
}

.hero-search button,
.search-panel button {
  border: 0;
  padding: 0 20px;
  color: var(--white);
  background: var(--fire-600);
  cursor: pointer;
  font-weight: 800;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  background: var(--fire-500);
  border-color: var(--fire-500);
}

.category-ribbon {
  background: var(--white);
  border-bottom: 1px solid var(--ash-200);
}

.ribbon-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}

.ribbon-wrap strong {
  color: var(--ash-900);
}

.ribbon-wrap div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ribbon-wrap a,
.filter-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  color: var(--ash-700);
  background: var(--ash-100);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  transition: all 0.2s ease;
}

.ribbon-wrap a:hover,
.filter-row button:hover,
.filter-row button.active {
  color: var(--white);
  background: var(--fire-600);
}

.section {
  padding: 72px 0;
  background: var(--white);
}

.section-soft {
  background: linear-gradient(135deg, var(--forest-50), var(--ash-50));
}

.section-warm {
  background: linear-gradient(135deg, var(--ember-50), var(--fire-50));
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
  color: var(--ash-900);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.15;
}

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

.section-line {
  display: inline-block;
  width: 5px;
  height: 38px;
  background: linear-gradient(180deg, var(--fire-600), var(--ember-600));
  border-radius: 999px;
}

.section-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--fire-600), var(--ember-600));
  border-radius: 12px;
  font-size: 1rem;
}

.more-link {
  color: var(--fire-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(221, 217, 213, 0.72);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(240, 93, 0, 0.35);
  box-shadow: var(--shadow-lg);
}

.movie-link {
  display: block;
  height: 100%;
}

.movie-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ash-200), var(--ash-100));
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .movie-thumb img {
  transform: scale(1.08);
}

.year-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.year-pill {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: var(--fire-600);
}

.movie-info {
  padding: 17px;
}

.movie-tags {
  min-height: 24px;
  margin-bottom: 9px;
}

.movie-tags span {
  padding: 4px 8px;
  color: var(--fire-700);
  background: var(--fire-100);
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ash-900);
  font-size: 1.03rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-info p {
  display: -webkit-box;
  min-height: 3.05em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--ash-500);
  font-size: 0.92rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ash-400);
  font-size: 0.78rem;
}

.movie-card-featured .movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(20, 17, 15, 0.86), rgba(90, 82, 78, 0.62)),
    linear-gradient(135deg, var(--fire-600), var(--ember-600));
}

.page-hero.small {
  padding: 70px 0;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
}

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

.category-card {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-thumb-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  background: var(--ash-200);
}

.category-thumb-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.category-content {
  padding: 24px;
}

.category-content h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-content p {
  margin: 0 0 18px;
  color: var(--ash-600);
}

.category-content span {
  color: var(--fire-600);
  font-weight: 800;
}

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

.ranking-row a {
  display: grid;
  grid-template-columns: 54px 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--ash-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.ranking-no {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--fire-600), var(--ember-600));
  border-radius: 14px;
  font-weight: 900;
}

.ranking-row img {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-main strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ash-900);
  font-size: 1.08rem;
}

.ranking-main em,
.ranking-meta {
  display: block;
  color: var(--ash-500);
  font-size: 0.9rem;
  font-style: normal;
}

.search-panel {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.96);
}

.filter-row {
  margin-top: 18px;
}

.hidden-card {
  display: none !important;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 24px 0 0;
  color: var(--ash-500);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--fire-600);
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.95fr);
  gap: 32px;
  padding: 26px 0 64px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: var(--black);
  border-radius: 22px;
  box-shadow: var(--shadow-2xl);
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: var(--white);
  background: rgba(240, 93, 0, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
  font-size: 1.8rem;
}

.player-overlay strong {
  max-width: 90%;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.player-overlay em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.detail-meta-row {
  margin: 24px 0 16px;
}

.detail-meta-row span {
  padding: 8px 12px;
  color: var(--ash-700);
  background: var(--ash-100);
}

.detail-primary h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.lead {
  margin: 0 0 24px;
  color: var(--ash-700);
  font-size: 1.1rem;
}

.detail-card,
.side-panel {
  margin-bottom: 22px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.detail-card h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: var(--ash-900);
  font-size: 1.25rem;
}

.detail-card p {
  margin: 0;
  color: var(--ash-700);
  line-height: 1.9;
  white-space: pre-line;
}

.review-card {
  background: var(--forest-50);
  border-left: 4px solid var(--forest-600);
}

.tag-cloud span {
  padding: 7px 11px;
  color: var(--ash-700);
  background: var(--ash-100);
}

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

.side-panel {
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-md);
}

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

.side-list a {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.side-list img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.side-list strong {
  display: -webkit-box;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--ash-900);
  font-size: 0.95rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-list em {
  color: var(--ash-500);
  font-size: 0.78rem;
  font-style: normal;
}

.site-footer {
  color: var(--ash-100);
  background: var(--ash-900);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1rem;
}

.site-footer p,
.site-footer a,
.site-footer li {
  color: var(--ash-300);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 14px 0 0;
}

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

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

.site-footer a:hover {
  color: var(--fire-100);
}

.footer-bottom {
  padding: 18px 16px;
  color: var(--ash-400);
  border-top: 1px solid var(--ash-700);
  text-align: center;
  font-size: 0.88rem;
}

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

  .hero-content {
    grid-template-columns: 1fr 330px;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--ash-200);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
  }

  .site-nav.open {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 72vh;
    gap: 30px;
    padding: 56px 0 140px;
  }

  .hero-poster {
    display: none;
  }

  .hero-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-dots {
    justify-content: center;
  }

  .movie-grid.three,
  .movie-grid.four,
  .movie-grid.five,
  .category-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    gap: 24px;
  }

  .detail-side {
    grid-column: 1 / -1;
  }

  .side-panel {
    position: static;
  }
}

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

  .brand-text strong {
    font-size: 1.1rem;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 78vh;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.2rem;
  }

  .hero-copy h2 {
    font-size: 1.45rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

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

  .hero-search button,
  .search-panel button {
    min-height: 44px;
  }

  .ribbon-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .section,
  .page-hero.small {
    padding: 48px 0;
  }

  .section-head,
  .section-head.with-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid.three,
  .movie-grid.four,
  .movie-grid.five,
  .category-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .ranking-row a {
    grid-template-columns: 44px 92px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 92px;
  }

  .ranking-meta {
    display: none;
  }

  .side-list a {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .side-list img {
    width: 96px;
  }
}
