*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --stone-950: #0c0a09;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --shadow-soft: 0 22px 70px rgba(12, 10, 9, 0.14);
  --shadow-card: 0 14px 36px rgba(12, 10, 9, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--stone-50);
  color: var(--stone-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--stone-100);
  background: rgba(28, 25, 23, 0.96);
  border-bottom: 1px solid var(--stone-800);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 1280px);
  height: 64px;
  margin: 0 auto;
}

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

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--amber-500);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong,
.footer-logo strong {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text small,
.footer-logo span {
  color: var(--stone-400);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: var(--stone-200);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-500);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: #fff;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-button span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--stone-800);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(68, 64, 60, 0.28);
}

.hero {
  position: relative;
  height: min(90vh, 780px);
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: var(--stone-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 4.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.58), rgba(12, 10, 9, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 0 0 82px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.poster-badge,
.rank-number,
.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-style: normal;
}

.eyebrow {
  margin-bottom: 18px;
  padding: 6px 12px;
  color: var(--stone-950);
  background: var(--amber-500);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 64px);
}

.hero h2 {
  margin-bottom: 18px;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: var(--stone-300);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 30px;
}

.meta-pill {
  padding: 7px 12px;
  color: var(--stone-200);
  background: rgba(41, 37, 36, 0.72);
  border: 1px solid rgba(231, 229, 228, 0.12);
  backdrop-filter: blur(10px);
}

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

.btn,
.section-more,
.page-link,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.section-more:hover,
.page-link:hover,
.search-submit:hover {
  transform: translateY(-2px);
}

.btn-primary,
.search-submit {
  color: var(--stone-950);
  background: var(--amber-500);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover,
.search-submit:hover {
  background: var(--amber-600);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1280px) / 2));
  bottom: 82px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 44px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--amber-500);
}

.search-strip {
  position: relative;
  z-index: 4;
  width: min(100% - 32px, 1120px);
  margin: -38px auto 0;
  padding: 18px;
  border: 1px solid rgba(231, 229, 228, 0.84);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.search-form,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input,
.filter-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--stone-900);
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  outline: none;
}

.search-input:focus,
.filter-input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.section {
  padding: 72px 0 0;
}

.page-section {
  padding: 54px 0 72px;
}

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

.section-head h2,
.page-head h1,
.content-block h2,
.detail-title,
.player-title {
  margin: 0;
  color: var(--stone-900);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-head h2,
.content-block h2,
.player-title {
  font-size: clamp(26px, 3vw, 38px);
}

.page-head h1,
.detail-title {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

.section-head p,
.page-head p {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.section-more,
.page-link {
  color: var(--stone-900);
  background: var(--amber-100);
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(12, 10, 9, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: var(--shadow-card);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-950));
}

.poster-link img,
.wide-cover img,
.tile-images img,
.rank-cover img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.wide-cover img,
.tile-images img,
.rank-cover img {
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.movie-card:hover .wide-cover img,
.category-tile:hover .tile-images img,
.ranking-item:hover .rank-cover img {
  transform: scale(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 9px;
  overflow: hidden;
  color: var(--stone-950);
  background: var(--amber-500);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body,
.wide-body {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--stone-900);
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.card-title:hover,
.ranking-item:hover h2,
.category-tile:hover strong {
  color: var(--amber-600);
}

.card-body p,
.wide-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-500);
  font-size: 13px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.wide-cover {
  overflow: hidden;
  background: var(--stone-800);
}

.category-tile {
  display: grid;
  grid-template-columns: 185px 1fr;
  min-height: 190px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(12, 10, 9, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.tile-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--stone-900);
}

.tile-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 24px;
}

.tile-content strong {
  font-size: 25px;
  font-weight: 900;
  line-height: 1.1;
}

.tile-content em {
  color: var(--stone-600);
  font-style: normal;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 76px 104px 1fr;
  align-items: stretch;
  gap: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(12, 10, 9, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-number {
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  font-size: 24px;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--stone-900);
}

.rank-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.rank-body p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--stone-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--stone-800));
}

.page-hero .page-section {
  padding: 58px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.filter-card {
  margin-bottom: 28px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(12, 10, 9, 0.08);
}

.no-results {
  display: none;
  padding: 40px;
  color: var(--stone-600);
  text-align: center;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--stone-200);
}

.no-results.is-visible {
  display: block;
}

.detail-hero {
  background: var(--stone-950);
  color: #fff;
}

.player-section {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding: 34px 0 42px;
}

.player-title {
  margin: 22px 0 10px;
  color: #fff;
}

.player-lead {
  max-width: 860px;
  margin: 0;
  color: var(--stone-300);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--stone-800);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #000;
  border: 0;
  cursor: pointer;
}

.player-cover::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.2));
}

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

.play-pulse {
  position: relative;
  z-index: 2;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  color: var(--stone-950);
  background: var(--amber-500);
  border-radius: 999px;
  box-shadow: 0 0 0 18px rgba(245, 158, 11, 0.18);
}

.play-pulse svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
  fill: currentColor;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: var(--stone-900);
  box-shadow: var(--shadow-card);
}

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

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

.detail-title {
  margin-bottom: 16px;
}

.detail-meta {
  margin-bottom: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0;
}

.tag {
  padding: 6px 10px;
  color: var(--amber-800, #92400e);
  background: var(--amber-100);
  font-size: 13px;
  font-weight: 800;
}

.content-block {
  margin-top: 30px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--stone-200);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(12, 10, 9, 0.07);
}

.content-block h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-block p {
  margin: 0;
  color: var(--stone-700);
  white-space: pre-line;
}

.one-line {
  color: #92400e;
  font-size: 20px;
  font-style: italic;
}

.site-footer {
  margin-top: 80px;
  color: var(--stone-400);
  background: var(--stone-950);
  border-top: 1px solid var(--stone-900);
}

.footer-shell {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
}

.footer-group h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-group ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-group a:hover {
  color: var(--amber-500);
}

.footer-bottom {
  padding: 18px 16px;
  color: var(--stone-500);
  text-align: center;
  border-top: 1px solid var(--stone-900);
}

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

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

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

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

  .menu-button {
    display: flex;
  }

  .hero {
    min-height: 680px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 34px;
  }

  .search-form,
  .filter-bar,
  .section-head,
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .tile-images {
    min-height: 180px;
  }

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

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

@media (max-width: 640px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 660px;
  }

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

  .hero h1 {
    font-size: 32px;
  }

  .hero h2 {
    font-size: 44px;
  }

  .hero-actions,
  .inline-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .search-submit {
    width: 100%;
  }

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

  .movie-card-wide,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .rank-number {
    min-height: 48px;
  }

  .card-body,
  .wide-body {
    padding: 12px;
  }

  .player-section,
  .page-section,
  main,
  .section {
    width: min(100% - 24px, 1280px);
  }

  .player-wrap,
  .content-block,
  .filter-card {
    border-radius: 18px;
  }

  .play-pulse {
    width: 68px;
    height: 68px;
  }
}
