: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-600: #ea580c;
  --orange-700: #c2410c;
  --stone-900: #1c1917;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --shadow-md: 0 4px 14px rgba(120, 53, 15, 0.10);
  --shadow-xl: 0 20px 40px rgba(120, 53, 15, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--amber-50), #fff7ed 55%, #fefce8);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 26px;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.3s ease;
}

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

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--amber-100);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--amber-200);
}

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

.main-nav a {
  color: var(--amber-100);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--amber-300);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(110deg, var(--amber-900), #7c2d12 48%, #3f1d0b);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: pulsePattern 3.5s ease-in-out infinite;
}

@keyframes pulsePattern {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.24; }
}

.hero-inner {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 54px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber-300);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 0;
  line-height: 1.06;
  font-weight: 900;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(40px, 7vw, 72px);
  background: linear-gradient(90deg, var(--amber-100), var(--amber-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  max-width: 740px;
  margin: 24px 0;
  color: var(--amber-100);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.movie-card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-card-tags span,
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  padding: 13px 26px;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  box-shadow: var(--shadow-md);
}

.primary-button:hover {
  transform: scale(1.04);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-700));
  box-shadow: var(--shadow-xl);
}

.primary-button.light {
  color: var(--amber-900);
  background: var(--white);
}

.ghost-button {
  padding: 12px 24px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.03);
}

.hero-art {
  position: relative;
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3 / 4;
  transform: rotate(2deg);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.62));
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-art:hover img {
  transform: scale(1.08);
}

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  font-size: 26px;
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.30);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.stats-band {
  position: relative;
  margin-top: -36px;
  z-index: 4;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}

.stats-grid div {
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--amber-700);
}

.stats-grid span {
  color: var(--gray-600);
  font-weight: 700;
}

.search-panel,
.search-page-panel,
.filter-panel {
  margin-top: 48px;
  margin-bottom: 48px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 480px);
  align-items: center;
  gap: 24px;
}

.search-panel h2,
.search-page-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.search-panel p {
  margin: 0;
  color: var(--gray-600);
}

.quick-search,
.site-search-form {
  display: flex;
  gap: 10px;
}

.quick-search input,
.site-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  background: var(--white);
}

.quick-search input:focus,
.site-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.quick-search button,
.site-search-form button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
}

.content-section {
  padding: 72px 0;
}

.content-section-inner {
  padding: 48px 0 72px;
}

.bg-white {
  background: var(--white);
}

.bg-warm {
  background: linear-gradient(135deg, var(--amber-100), #fed7aa);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-link,
.text-button {
  color: var(--amber-700);
}

.section-link:hover,
.text-button:hover {
  color: var(--orange-700);
  transform: translateX(2px);
}

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

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

.featured-grid .movie-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

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

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--amber-300));
}

.movie-card-featured .movie-poster {
  aspect-ratio: 16 / 11;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
  transition: opacity 0.25s ease;
}

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

.movie-duration,
.movie-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
}

.movie-category {
  left: 10px;
  top: 10px;
  padding: 5px 10px;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 18px;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-700));
  box-shadow: var(--shadow-md);
}

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

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

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

.movie-card p {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
}

.movie-card-tags span,
.tag-list a {
  color: var(--amber-700);
  background: var(--amber-100);
}

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

.category-tile,
.category-overview-card,
.detail-card,
.side-card,
.player-card {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.category-tile {
  position: relative;
  min-height: 172px;
  padding: 24px;
  overflow: hidden;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
}

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

.category-count {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 10px;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.65;
}

.cta-section {
  padding: 76px 0;
  text-align: center;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-900), var(--orange-700), var(--amber-900));
}

.cta-section h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 44px);
}

.cta-section p {
  max-width: 760px;
  margin: 0 auto 26px;
  color: var(--amber-100);
  font-size: 18px;
}

.page-main {
  min-height: 60vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(110deg, var(--amber-900), var(--orange-700));
}

.compact-hero {
  padding: 64px 0;
}

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

.page-hero p {
  max-width: 780px;
  color: var(--amber-100);
  font-size: 18px;
  line-height: 1.75;
}

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

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

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

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-overview-head span {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--amber-700);
  font-weight: 800;
  background: var(--amber-100);
}

.category-overview-card ul {
  margin: 18px 0;
  padding-left: 18px;
  color: var(--gray-600);
  line-height: 1.9;
}

.category-overview-card li a:hover {
  color: var(--amber-700);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-weight: 700;
}

.filter-count {
  margin: 18px 0 0;
  color: var(--amber-700);
  font-weight: 800;
}

.search-page-panel {
  margin-top: 48px;
}

.site-search-form {
  max-width: 860px;
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  color: var(--gray-600);
}

.search-hints button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--amber-700);
  font-weight: 800;
  cursor: pointer;
  background: var(--amber-100);
}

.detail-hero {
  padding: 44px 0 58px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-size: cover;
  background-position: center;
  filter: blur(10px) saturate(1.2);
  transform: scale(1.06);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.94), rgba(124, 45, 18, 0.82));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-cover {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow-xl);
}

.detail-hero h1 {
  max-width: 900px;
  font-size: clamp(32px, 4.5vw, 54px);
}

.detail-hero p:not(.eyebrow) {
  max-width: 900px;
  color: var(--amber-100);
  font-size: 18px;
  line-height: 1.75;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.16);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 48px 0;
}

.player-card {
  padding: 14px;
  margin-bottom: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(0,0,0,0.18), rgba(0,0,0,0.55));
}

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

.play-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--amber-900);
  font-size: 28px;
  background: var(--amber-300);
  box-shadow: var(--shadow-xl);
}

.player-status {
  margin: 12px 4px 2px;
  color: var(--gray-600);
}

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

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--gray-800);
}

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

.side-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px 12px;
  color: var(--gray-700);
}

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

.side-card dd {
  margin: 0;
}

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

.site-footer {
  color: var(--amber-100);
  background: linear-gradient(135deg, var(--stone-900), var(--amber-900), var(--stone-900));
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--amber-300);
  font-size: 19px;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  color: var(--amber-100);
  line-height: 1.8;
}

.site-footer ul {
  list-style: none;
}

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

.footer-bottom {
  padding: 18px 0;
  color: var(--amber-300);
  border-top: 1px solid rgba(251, 191, 36, 0.22);
}

.is-hidden-by-filter {
  display: none !important;
}

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

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .mobile-menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: var(--amber-900);
    box-shadow: var(--shadow-xl);
  }

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

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

  .main-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }

  .hero-art {
    width: min(280px, 70vw);
    margin: 0 auto;
  }

  .hero-controls {
    bottom: 24px;
  }

  .stats-grid,
  .search-panel,
  .filter-grid,
  .footer-grid,
  .detail-title-row,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .featured-grid .movie-card-featured {
    grid-column: span 1;
    grid-row: span 1;
  }

  .detail-cover {
    width: 180px;
  }
}

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

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

  .brand-subtitle {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 720px;
  }

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

  .movie-grid,
  .ranking-grid,
  .category-grid,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .site-search-form {
    flex-direction: column;
  }

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