:root {
  color-scheme: light;
  --autumn-50: #fff7ed;
  --autumn-100: #ffedd5;
  --autumn-200: #fed7aa;
  --autumn-300: #fdba74;
  --autumn-400: #fb923c;
  --autumn-500: #f97316;
  --autumn-600: #ea580c;
  --autumn-700: #c2410c;
  --autumn-800: #9a3412;
  --leaf-200: #fef08a;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f3d5b5;
  --paper: #ffffff;
  --shadow: 0 20px 45px rgba(154, 52, 18, 0.12);
  --shadow-strong: 0 26px 80px rgba(154, 52, 18, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--autumn-50), #ffffff 38%, var(--autumn-50));
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(194, 65, 12, 0.12);
  backdrop-filter: blur(14px);
}

.top-strip {
  padding: 0.5rem 1rem;
  text-align: center;
  color: #ffffff;
  background-image: linear-gradient(135deg, #f97316, #ea580c, #fb923c);
  font-size: 0.9rem;
}

.main-nav {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--autumn-600), var(--autumn-400));
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.28);
}

.brand-text strong {
  display: block;
  color: var(--autumn-700);
  font-size: 1.35rem;
  line-height: 1.1;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: center;
}

.nav-links a,
.mobile-categories a,
.footer-links a,
.footer-tags a {
  color: #4b5563;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-categories a:hover,
.footer-links a:hover,
.footer-tags a:hover {
  color: var(--autumn-700);
}

.nav-search {
  display: flex;
  align-items: center;
  border: 2px solid var(--autumn-200);
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 0.65rem 0.9rem;
  color: var(--text);
}

.nav-search button,
.primary-btn,
.secondary-btn,
.filter-btn,
.play-cta {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.nav-search button {
  height: 100%;
  padding: 0.65rem 1rem;
  color: #ffffff;
  background: var(--autumn-600);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--autumn-700);
  font-size: 1.8rem;
}

.mobile-categories {
  display: none;
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-categories a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--autumn-50);
}

.page-main {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  margin: 2rem auto 3rem;
  border-radius: 2rem;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow-strong);
}

.hero-kicker {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: end;
  padding: clamp(1.5rem, 5vw, 4.8rem);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  transform: scale(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72), rgba(194, 65, 12, 0.3));
}

.hero-copy,
.hero-poster-panel {
  position: relative;
  z-index: 1;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 1rem 0;
  font-size: clamp(2.3rem, 7vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.primary-btn,
.secondary-btn,
.play-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0 1.25rem;
}

.primary-btn,
.play-cta {
  color: #ffffff;
  background: linear-gradient(135deg, var(--autumn-600), var(--autumn-400));
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

.secondary-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-poster-panel {
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 1.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
}

.hero-poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 2.7;
  object-fit: cover;
}

.hero-poster-panel div {
  padding: 1rem;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: clamp(1.5rem, 5vw, 4.8rem);
  bottom: 1.5rem;
  display: flex;
  gap: 0.6rem;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  background: #ffffff;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin: 3rem 0 1.2rem;
}

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-heading p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--autumn-700);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(254, 215, 170, 0.82);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--autumn-300);
  box-shadow: 0 26px 50px rgba(154, 52, 18, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 2.85;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.94);
  font-weight: 800;
  font-size: 0.8rem;
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta {
  color: var(--autumn-600);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0.3rem 0;
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--autumn-700);
}

.movie-desc {
  min-height: 3.1em;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.movie-tags span,
.tag-link,
.info-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  color: var(--autumn-800);
  background: var(--autumn-100);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 178px;
  padding: 1.4rem;
  border-radius: 1.5rem;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--autumn-600), var(--autumn-400));
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #9a3412, #f97316);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #b45309, #facc15);
}

.category-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  margin-top: 1.1rem;
  font-weight: 800;
}

.page-hero {
  margin: 2rem 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 2rem;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(254, 240, 138, 0.55), transparent 30%), linear-gradient(135deg, var(--autumn-700), var(--autumn-500));
  box-shadow: var(--shadow-strong);
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 0.9rem;
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid var(--autumn-200);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--autumn-200);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  outline: 0;
  background: #ffffff;
}

.rank-list {
  display: grid;
  gap: 0.8rem;
}

.rank-row {
  display: grid;
  grid-template-columns: auto 88px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--autumn-200);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(154, 52, 18, 0.08);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--autumn-600);
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  aspect-ratio: 2 / 2.8;
  object-fit: cover;
  border-radius: 0.75rem;
}

.rank-row h3 {
  margin: 0 0 0.4rem;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--autumn-700);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1.5rem;
  align-items: start;
}

.player-card,
.detail-card,
.related-card {
  border: 1px solid rgba(254, 215, 170, 0.85);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #030712;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.player-cover .play-circle {
  position: absolute;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--autumn-600), var(--autumn-400));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  font-size: 2rem;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.detail-body {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-body h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.detail-summary {
  color: var(--muted);
  line-height: 1.9;
  font-size: 1rem;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
}

.detail-card {
  padding: 1.4rem;
}

.detail-card h2,
.related-card h2 {
  margin: 0 0 0.9rem;
}

.detail-card p {
  color: var(--muted);
  line-height: 1.9;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.related-card {
  margin-top: 1.5rem;
  padding: 1.2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.search-results-note {
  margin: 1rem 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 4rem;
  padding: 3rem 0;
  color: #4b5563;
  background: linear-gradient(180deg, var(--autumn-50), var(--autumn-100));
}

.footer-inner {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.3fr;
  gap: 2rem;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--autumn-700);
  font-size: 1.4rem;
  font-weight: 900;
}

.footer-links,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-content: start;
}

.footer-tags a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

[hidden] {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    flex-wrap: wrap;
    padding: 0.85rem 0;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

  .mobile-categories.is-open {
    display: flex;
  }

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

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

@media (max-width: 860px) {
  .hero-slide {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .hero-poster-panel {
    display: none;
  }

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

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

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

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

@media (max-width: 620px) {
  .page-main {
    width: min(100% - 1rem, 1220px);
  }

  .hero-carousel {
    min-height: 560px;
    border-radius: 1.2rem;
  }

  .movie-grid,
  .movie-grid.wide-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .movie-card-body {
    padding: 0.8rem;
  }

  .movie-desc {
    display: none;
  }

  .rank-row {
    grid-template-columns: auto 72px 1fr;
  }

  .rank-row .primary-btn {
    grid-column: 1 / -1;
  }
}
