:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.08);
  --shadow-md: 0 10px 22px rgba(28, 25, 23, 0.10);
  --shadow-lg: 0 18px 40px rgba(28, 25, 23, 0.16);
  --radius-lg: 14px;
  --radius-xl: 20px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--amber-50), var(--stone-100));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--amber-50);
  background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--amber-900));
  box-shadow: var(--shadow-md);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--amber-900);
  background: linear-gradient(135deg, var(--amber-300), var(--orange-500));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--amber-300);
  font-size: 12px;
  line-height: 1.2;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
}

.nav-menu a {
  color: var(--amber-50);
  transition: color 180ms ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--amber-300);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--amber-50);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

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

.hero-slide img.is-missing {
  opacity: 0;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(251, 191, 36, 0.22), transparent 36%),
    radial-gradient(circle at 20% 75%, rgba(234, 88, 12, 0.18), transparent 34%),
    linear-gradient(135deg, #21160d, #0f0d0c 55%, #2b1708);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 0 58px;
  color: var(--white);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-300);
  font-size: 14px;
  font-weight: 750;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.primary-button {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.30);
}

.primary-button:hover {
  transform: translateY(-1px);
  background: var(--amber-700);
  box-shadow: 0 16px 30px rgba(180, 83, 9, 0.34);
}

.secondary-button {
  color: var(--stone-800);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.secondary-button:hover {
  transform: translateY(-1px);
  color: var(--amber-800);
}

.ghost-button {
  color: var(--amber-50);
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  color: var(--amber-200);
  background: rgba(0, 0, 0, 0.56);
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 180ms ease, background 180ms ease;
}

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

.page-section {
  padding: 56px 0;
}

.page-section.compact {
  padding: 38px 0;
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-bar {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: var(--amber-600);
}

.section-title {
  margin: 0;
  color: var(--stone-800);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 850;
}

.section-note {
  margin: 7px 0 0;
  color: var(--stone-600);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

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

.poster-link,
.poster {
  display: block;
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(251, 191, 36, 0.34), transparent 35%),
    linear-gradient(135deg, var(--stone-800), var(--amber-900));
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease, opacity 180ms ease;
}

.poster img.is-missing {
  opacity: 0;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 55%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 34px;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 220ms ease, transform 220ms ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.card-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--amber-900);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 800;
}

.duration-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 700;
}

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

.movie-title {
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}

.movie-title a:hover {
  color: var(--amber-700);
}

.movie-desc {
  margin: 0;
  color: var(--stone-600);
  font-size: 13px;
  line-height: 1.55;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--stone-500);
  font-size: 12px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 184px;
}

.horizontal-card .poster {
  height: 100%;
  aspect-ratio: auto;
}

.horizontal-card .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
}

.highlight-panel {
  margin: 56px 0;
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
  box-shadow: var(--shadow-lg);
}

.dark-panel {
  margin: 56px 0;
  padding: 34px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: var(--stone-800);
  box-shadow: var(--shadow-lg);
}

.dark-panel .section-title,
.dark-panel .movie-title {
  color: var(--white);
}

.dark-panel .section-note,
.dark-panel .movie-desc,
.dark-panel .movie-meta {
  color: var(--stone-300);
}

.category-card {
  position: relative;
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 124px;
  height: 124px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 850;
}

.category-card p {
  position: relative;
  margin: 0;
  color: var(--stone-600);
  font-size: 14px;
}

.category-card .category-link {
  position: relative;
  display: inline-flex;
  margin-top: 18px;
  color: var(--amber-700);
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item a {
  display: grid;
  grid-template-columns: 54px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.rank-item a:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

.rank-index {
  color: var(--amber-700);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  width: 76px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-800), var(--amber-900));
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-cover img.is-missing {
  opacity: 0;
}

.rank-title {
  display: block;
  color: var(--stone-800);
  font-weight: 800;
}

.rank-meta {
  display: block;
  margin-top: 3px;
  color: var(--stone-500);
  font-size: 13px;
}

.rank-score {
  color: var(--amber-700);
  font-weight: 900;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 18px;
  color: var(--stone-600);
  font-size: 14px;
}

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

.page-hero {
  padding: 62px 0 36px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--stone-600);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin: 0 0 28px;
  padding: 16px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-input,
.filter-select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--stone-800);
  background: var(--stone-50);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

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

.empty-state[hidden] {
  display: none;
}

.empty-state {
  padding: 36px;
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--stone-600);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: stretch;
  padding: 30px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.22), transparent 34%),
    linear-gradient(135deg, var(--stone-900), #2d1708 68%, var(--amber-900));
  box-shadow: var(--shadow-lg);
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--stone-800), var(--amber-900));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.detail-poster img.is-missing {
  opacity: 0;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.detail-lead {
  margin: 0 0 22px;
  color: var(--stone-200);
  font-size: 19px;
  line-height: 1.65;
}

.meta-pills,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.meta-pills span,
.tag-list span,
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--stone-100);
  font-size: 13px;
  font-weight: 750;
}

.detail-hero .meta-pills span,
.detail-hero .tag-list span {
  color: var(--amber-50);
  background: rgba(255, 255, 255, 0.12);
}

.player-section,
.content-panel,
.related-section {
  margin-top: 34px;
}

.panel {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.panel h2 {
  margin: 0 0 16px;
  color: var(--stone-800);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 850;
}

.panel p {
  margin: 0 0 16px;
  color: var(--stone-700);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--black);
  box-shadow: var(--shadow-lg);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.26));
  transition: opacity 180ms ease, visibility 180ms ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-900);
  background: var(--amber-300);
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.player-box.is-loading .player-button {
  animation: pulse 900ms ease-in-out infinite alternate;
}

@keyframes pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.side-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.side-card h2,
.side-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.site-footer {
  margin-top: 64px;
  color: var(--stone-300);
  background: var(--stone-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 42px 0;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--amber-50);
  font-size: 16px;
}

.footer-grid p,
.footer-grid a {
  color: var(--stone-400);
  font-size: 14px;
}

.footer-grid a:hover {
  color: var(--amber-300);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--stone-700);
  color: var(--stone-500);
  text-align: center;
  font-size: 13px;
}

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

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

  .detail-hero,
  .two-column {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px;
    border-radius: 0 0 16px 16px;
    background: var(--amber-900);
    box-shadow: var(--shadow-lg);
  }

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

  .nav-menu a {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .nav-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    padding: 34px 0 54px;
  }

  .hero-nav {
    display: none;
  }

  .section-head {
    display: block;
  }

  .section-head .secondary-button,
  .section-head .ghost-button {
    margin-top: 16px;
  }

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

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

  .horizontal-card {
    grid-template-columns: 130px minmax(0, 1fr);
    min-height: 162px;
  }

  .rank-item a {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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

  .highlight-panel,
  .dark-panel,
  .detail-hero,
  .panel {
    padding: 22px;
  }

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

  .detail-poster img {
    min-height: 340px;
  }
}

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

  .brand-subtitle {
    font-size: 11px;
  }

  .hero {
    height: 500px;
  }

  .movie-grid {
    gap: 14px;
  }

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

  .movie-title {
    font-size: 15px;
  }

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

  .horizontal-card .poster {
    aspect-ratio: 16 / 9;
  }
}
