:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --stone-950: #0c0a09;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --shadow-soft: 0 18px 45px rgba(28, 25, 23, 0.12);
  --shadow-strong: 0 28px 80px rgba(12, 10, 9, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--stone-100);
  color: var(--stone-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 9, 0.92);
  color: #fff;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  color: var(--stone-950);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 20px;
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: var(--stone-950);
  color: #fff;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-visual {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.04) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.95) 0%, rgba(12, 10, 9, 0.78) 42%, rgba(12, 10, 9, 0.34) 70%, rgba(12, 10, 9, 0.12) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.9), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 76vh;
  margin: 0 auto;
  padding: 90px 0 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-400);
  font-weight: 800;
  font-size: 14px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 820px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.dark-meta span {
  background: rgba(12, 10, 9, 0.08);
  color: var(--stone-700);
}

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

.primary-button,
.ghost-button,
.search-line button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-line button {
  background: var(--amber-500);
  color: var(--stone-950);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.primary-button:hover,
.search-line button:hover {
  transform: translateY(-2px);
  background: var(--amber-400);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.hero-dots button {
  width: 38px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

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

.hero-search {
  position: absolute;
  z-index: 6;
  right: max(16px, calc((100vw - 1200px) / 2));
  bottom: 34px;
  width: min(420px, calc(100% - 32px));
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.hero-search label,
.filter-panel label {
  display: block;
  margin: 0 0 10px;
  color: var(--amber-400);
  font-weight: 800;
}

.search-line,
.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

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

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.muted-section {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100vw - 1200px) / 2));
  background: #fff;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.section-link {
  flex: 0 0 auto;
  color: var(--amber-600);
  font-weight: 800;
}

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

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

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

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

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

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

.featured-grid .poster-frame,
.movie-card-wide .poster-frame {
  aspect-ratio: 16 / 9;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.type-badge {
  left: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 10px;
  background: rgba(12, 10, 9, 0.72);
  color: #fff;
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 38px;
  background: var(--amber-500);
  color: var(--stone-950);
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.movie-info strong {
  font-size: 18px;
  line-height: 1.35;
}

.movie-meta,
.movie-desc {
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--stone-100);
  color: var(--stone-700);
  font-size: 12px;
  font-style: normal;
}

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

.category-tile,
.category-card {
  position: relative;
  display: flex;
  min-height: 150px;
  padding: 24px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--stone-900), var(--stone-700));
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile span,
.category-copy strong {
  position: relative;
  z-index: 2;
  display: block;
  margin-bottom: 12px;
  color: var(--amber-400);
  font-weight: 900;
  font-size: 22px;
}

.category-tile strong,
.category-copy em {
  position: relative;
  z-index: 2;
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-style: normal;
  line-height: 1.7;
}

.category-card {
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

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

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
}

.movie-card-wide .movie-info {
  justify-content: center;
}

.page-hero {
  padding: 86px max(16px, calc((100vw - 1200px) / 2));
  background:
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.22), transparent 30%),
    linear-gradient(135deg, var(--stone-950), var(--stone-800));
  color: #fff;
}

.category-hero,
.search-hero,
.ranking-hero {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-row {
  grid-template-columns: 1fr 180px 180px;
}

.empty-state {
  display: none;
  margin: 40px 0 0;
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  color: var(--stone-600);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-600);
}

.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 36px;
  align-items: center;
  padding: 36px;
  border-radius: 32px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-950));
  box-shadow: var(--shadow-strong);
}

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

.detail-copy h1 {
  color: var(--stone-950);
}

.detail-copy p {
  color: var(--stone-700);
}

.detail-tags span {
  background: rgba(245, 158, 11, 0.12);
  color: var(--stone-800);
}

.player-section,
.detail-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-strong);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle, rgba(12, 10, 9, 0.38), rgba(12, 10, 9, 0.8));
  color: #fff;
  cursor: pointer;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--stone-950);
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.38);
}

.player-cover strong {
  font-size: 20px;
}

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

.detail-panel {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-panel p {
  margin: 0;
  color: var(--stone-700);
  line-height: 1.95;
}

.related-section {
  padding-top: 52px;
}

.site-footer {
  margin-top: 72px;
  padding: 54px 0 24px;
  background: var(--stone-950);
  color: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 430px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-links a:hover {
  color: var(--amber-400);
}

.footer-copy {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .featured-grid,
  .rank-list-large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-hero {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    background: rgba(12, 10, 9, 0.96);
    box-shadow: var(--shadow-strong);
  }

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

  .hero-content {
    min-height: 72vh;
    padding: 60px 0 190px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
    bottom: 58px;
    width: auto;
  }

  .hero-dots {
    bottom: 22px;
  }

  .search-line,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .rank-list-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-hero,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 20px;
  }

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

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

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-content p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .rank-list,
  .rank-list-large {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .muted-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .page-hero {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}
