* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #292524;
  background: #fafaf9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #b45309, #d97706, #c2410c);
  box-shadow: 0 16px 40px rgba(120, 53, 15, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #b45309;
  background: #fffbeb;
  box-shadow: 0 8px 24px rgba(255, 251, 235, 0.28);
  transition: transform 0.3s ease;
}

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

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #fef3c7;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fde68a;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #1c1917;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(251, 191, 36, 0.22), transparent 34%),
    linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.38) 56%, rgba(28, 25, 23, 0.14));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding-bottom: 76px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 24px;
  color: #e7e5e4;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.mini-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.26);
}

.primary-button:hover {
  background: #b45309;
  transform: translateY(-2px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.full-width {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.06);
}

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

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

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

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

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

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

.section-white {
  background: #ffffff;
}

.section-muted {
  background: #f5f5f4;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.heading-icon {
  display: inline-grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  color: #292524;
  font-size: clamp(26px, 3.2vw, 36px);
}

.section-heading p {
  margin: 6px 0 0;
  color: #78716c;
  line-height: 1.6;
}

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

.compact-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(68, 64, 60, 0.12);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.movie-card-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 45px rgba(68, 64, 60, 0.18);
}

.movie-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1917;
}

.featured-grid .movie-cover {
  aspect-ratio: 16 / 10;
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.68), transparent 58%);
  transition: opacity 0.25s ease;
}

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

.movie-cover figcaption,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  border-radius: 8px;
  padding: 5px 8px;
  color: #ffffff;
  background: #d97706;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: #0f766e;
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  color: #292524;
  font-size: 17px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: #d97706;
}

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #57534e;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: #78716c;
  font-size: 13px;
  font-weight: 700;
}

.mini-tags span {
  color: #0f766e;
  background: #ccfbf1;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 20px;
  color: #ffffff;
  background: #1c1917;
  box-shadow: 0 18px 42px rgba(68, 64, 60, 0.16);
}

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

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.9), rgba(28, 25, 23, 0.18));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 18px;
}

.category-tile span {
  margin-top: 118px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin-top: 8px;
  color: #e7e5e4;
  font-size: 14px;
  line-height: 1.55;
}

.index-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

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

.horizontal-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-item:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 30px rgba(68, 64, 60, 0.12);
}

.horizontal-item img {
  width: 112px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
}

.horizontal-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #292524;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.horizontal-item em {
  display: block;
  margin-top: 6px;
  color: #78716c;
  font-size: 12px;
  font-style: normal;
}

.section-link {
  margin-top: 20px;
  color: #b45309;
  background: #fef3c7;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: 210px;
  gap: 20px;
}

.spotlight-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #1c1917;
  box-shadow: 0 18px 42px rgba(68, 64, 60, 0.16);
}

.spotlight-card.large {
  grid-row: span 2;
}

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

.spotlight-card:hover img {
  transform: scale(1.07);
}

.spotlight-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.88), rgba(28, 25, 23, 0.08));
}

.spotlight-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  color: #ffffff;
}

.spotlight-copy strong,
.spotlight-copy em {
  display: block;
}

.spotlight-copy strong {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.25;
}

.spotlight-copy em {
  color: #e7e5e4;
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
}

.page-hero {
  color: #ffffff;
  padding: 58px 0;
}

.amber-hero {
  background: linear-gradient(90deg, #b45309, #d97706, #ea580c);
}

.teal-hero {
  background: linear-gradient(90deg, #0f766e, #0d9488, #0891b2);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fef3c7;
}

.category-panels {
  display: grid;
  gap: 22px;
}

.category-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(68, 64, 60, 0.1);
}

.category-panel-image {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #1c1917;
}

.category-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-panel h2 {
  margin: 0 0 10px;
  color: #292524;
  font-size: 26px;
}

.category-panel p {
  margin: 0 0 16px;
  color: #57534e;
  line-height: 1.7;
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-preview-links a {
  border-radius: 999px;
  padding: 7px 12px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 32px;
  padding: 18px;
  border: 1px solid #e7e5e4;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(68, 64, 60, 0.08);
}

.search-box {
  display: grid;
  gap: 8px;
  color: #44403c;
  font-weight: 800;
}

.search-box input,
.filter-selects select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d6d3d1;
  border-radius: 12px;
  padding: 0 14px;
  color: #292524;
  background: #fafaf9;
  outline: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-selects select:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.13);
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.empty-state {
  margin: 24px 0;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: #78716c;
  background: #f5f5f4;
}

.detail-main {
  background: #fafaf9;
}

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

.detail-hero .breadcrumbs {
  color: #78716c;
}

.detail-hero .breadcrumbs a:hover {
  color: #d97706;
}

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

.player-card,
.detail-card,
.poster-panel,
.related-panel {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(68, 64, 60, 0.1);
}

.player-card {
  margin-bottom: 24px;
  background: #0c0a09;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0a09;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(217, 119, 6, 0.22), rgba(12, 10, 9, 0.56));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 18px 44px rgba(217, 119, 6, 0.42);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  background: #b45309;
  transform: scale(1.04);
}

.play-button span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #d97706;
  background: #ffffff;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffffff;
  text-align: center;
  background: rgba(127, 29, 29, 0.88);
}

.detail-card {
  margin-bottom: 24px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 12px;
  color: #292524;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.18;
}

.detail-lead {
  margin: 0 0 20px;
  color: #57534e;
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  border-radius: 12px;
  padding: 8px 12px;
  color: #44403c;
  background: #f5f5f4;
  font-weight: 800;
}

.prose-card h2,
.related-panel h2 {
  margin: 0 0 16px;
  color: #292524;
  font-size: 24px;
}

.prose-card p {
  margin: 0;
  color: #44403c;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 24px;
}

.poster-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  margin-bottom: 16px;
  border-radius: 14px;
  object-fit: cover;
  background: #1c1917;
}

.related-panel {
  padding: 20px;
}

.compact-related .horizontal-item {
  grid-template-columns: 96px 1fr;
  padding: 8px;
}

.compact-related .horizontal-item img {
  width: 96px;
  height: 58px;
}

.site-footer {
  padding: 36px 0;
  color: #fef3c7;
  background: #292524;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  max-width: 680px;
  margin: 0;
  color: #d6d3d1;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

.footer-links a:hover {
  color: #ffffff;
}

[hidden] {
  display: none !important;
}

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

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

  .spotlight-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border-radius: 18px;
    padding: 12px;
    background: #b45309;
    box-shadow: 0 18px 40px rgba(68, 64, 60, 0.24);
  }

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

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

  .nav-link:hover,
  .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
  }

  .hero {
    height: 66vh;
    min-height: 520px;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .index-split,
  .detail-layout,
  .category-panel,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .brand-subtitle {
    display: none;
  }

  .brand-title {
    font-size: 18px;
  }

  .hero {
    min-height: 500px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .section {
    padding: 50px 0;
  }

  .movie-grid,
  .compact-grid,
  .catalog-grid,
  .ranking-grid,
  .category-grid,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .spotlight-grid {
    grid-auto-rows: 240px;
  }

  .filter-selects {
    flex-direction: column;
  }

  .horizontal-item {
    grid-template-columns: 92px 1fr;
  }

  .horizontal-item img {
    width: 92px;
    height: 58px;
  }
}
