:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-800: #9a3412;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-md: 0 12px 30px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.14);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: 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 {
  max-width: 100%;
  display: block;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  backdrop-filter: blur(14px);
}

.nav-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-800));
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.35);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-700);
  font-weight: 650;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-800);
  background: var(--amber-100);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--amber-100);
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--amber-900);
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-900), var(--orange-800) 55%, var(--amber-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(245, 158, 11, 0.45), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(120, 53, 15, 0.72) 48%, rgba(17, 24, 39, 0.46));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding-top: 66px;
  padding-bottom: 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--amber-100);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.eyebrow.dark {
  background: var(--amber-100);
  color: var(--amber-800);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 20px 0 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.16;
}

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

.hero-tags,
.hero-pills,
.movie-meta,
.tag-row,
.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.hero-pills span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.hero-pills span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--amber-50);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-800));
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.28);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(12px);
}

.btn.full {
  width: 100%;
}

.hero-poster,
.detail-poster,
.poster-frame,
.rank-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-800), var(--gray-900));
}

.hero-poster {
  min-height: 500px;
  border-radius: 34px;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.poster-frame img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.hero-poster:hover img,
.movie-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-fallback-title {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 22px;
  color: var(--white);
  text-align: center;
  font-weight: 900;
  line-height: 1.25;
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, 0.38), transparent 34%),
    linear-gradient(135deg, var(--amber-900), var(--gray-900));
}

.poster-fallback .poster-fallback-title,
.poster-frame.poster-fallback .poster-fallback-title {
  display: grid;
}

.hero-tools {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr auto;
  gap: 18px;
  align-items: center;
}

.hero-search,
.filter-box {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
}

.hero-search input,
.filter-box input,
.filter-box select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gray-900);
  padding: 0 14px;
  font: inherit;
}

.filter-box select {
  flex: 0 0 150px;
  border-left: 1px solid var(--gray-200);
}

.hero-search button {
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  background: var(--amber-700);
  cursor: pointer;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 70px 0;
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
}

.text-link {
  color: var(--amber-800);
  font-weight: 800;
}

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

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

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

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

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

.poster-link {
  display: block;
}

.poster-frame {
  display: block;
  aspect-ratio: 3 / 4;
}

.movie-card-large .poster-frame {
  aspect-ratio: 16 / 10;
}

.poster-play {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber-800);
}

.movie-line {
  margin: 10px 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--amber-800);
  background: var(--amber-100);
}

.soft-section {
  padding-left: 34px;
  padding-right: 34px;
  border-radius: 34px;
  background: linear-gradient(90deg, var(--orange-50), var(--amber-50));
}

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

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

.category-panel {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-panel h3,
.category-panel p {
  margin: 0;
}

.category-panel h3 {
  font-size: 22px;
}

.category-panel p {
  color: var(--gray-600);
}

.category-count {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-700);
  font-size: 12px;
  font-weight: 800;
}

.wide-list,
.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 70px 132px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-800));
}

.rank-cover {
  height: 82px;
  border-radius: 16px;
}

.rank-info h3,
.rank-info p {
  margin: 0;
}

.rank-info h3 {
  font-size: 19px;
}

.rank-info p {
  margin-top: 6px;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  justify-self: end;
  font-size: 24px;
  font-weight: 900;
  color: var(--amber-700);
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 75% 18%, rgba(245, 158, 11, 0.45), transparent 28%),
    linear-gradient(135deg, var(--amber-900), var(--orange-800) 58%, var(--gray-900));
}

.compact-hero {
  padding: 86px 0 56px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}

.filter-box {
  max-width: 760px;
  margin-top: 28px;
  border-radius: 22px;
}

.empty-state {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--gray-600);
  text-align: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.2);
  transform: scale(1.08);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.42), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(120, 53, 15, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 46px;
  padding-top: 70px;
  padding-bottom: 70px;
}

.detail-poster {
  min-height: 450px;
  border-radius: 30px;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--amber-100);
  font-size: 14px;
}

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

.detail-copy h1 {
  font-size: clamp(38px, 5.4vw, 70px);
}

.detail-meta-grid {
  margin-top: 26px;
}

.detail-meta-grid span {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--amber-50);
  font-weight: 750;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--amber-50);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 30%),
    var(--gray-900);
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background: rgba(17, 24, 39, 0.42);
  cursor: pointer;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-800));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
  font-size: 30px;
}

.player-start strong {
  font-size: 18px;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  color: var(--amber-100);
  text-align: center;
}

.player-shell.playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.content-card,
.side-card {
  padding: 26px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--gray-500);
}

.side-card dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 700;
}

.site-footer {
  margin-top: 40px;
  padding: 46px 0;
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: var(--white);
}

.site-footer p {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--gray-400);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

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

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

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

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

  .hero-poster,
  .detail-poster {
    min-height: 420px;
    max-width: 360px;
  }

  .hero-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-bar {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero-shell {
    min-height: 850px;
  }

  .hero-inner {
    min-height: 700px;
    gap: 24px;
    padding-bottom: 210px;
  }

  .hero-poster,
  .detail-poster {
    min-height: 340px;
    width: 100%;
    max-width: none;
    transform: none;
  }

  .hero-tools {
    bottom: 20px;
  }

  .hero-search,
  .filter-box {
    border-radius: 18px;
    flex-direction: column;
  }

  .filter-box select {
    flex: 1;
    border-left: 0;
    border-top: 1px solid var(--gray-200);
    padding: 10px 14px;
  }

  .movie-grid,
  .featured-grid,
  .all-grid,
  .category-grid,
  .category-grid-large {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 86px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 18px;
  }

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

  .soft-section {
    padding-left: 18px;
    padding-right: 18px;
  }
}
