:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-soft: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--soft);
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

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

button,
input,
select {
  font: inherit;
}

.container,
.nav-wrap,
.footer-grid,
.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 18px rgba(15, 23, 42, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.45rem;
  color: #111827;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}

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

.nav-link {
  padding: 9px 15px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 650;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #92400e;
  background: #fef3c7;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #374151;
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 40%, rgba(245, 158, 11, 0.36), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 48px;
}

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

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 20px;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 1.2rem;
}

.hero-meta,
.hero-tags,
.detail-badges,
.footer-badges,
.detail-meta-list,
.meta-row,
.mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-badges span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

.hero-tags span,
.tag-list span,
.footer-badges span {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 650;
  color: #92400e;
  background: #fef3c7;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 24px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.34);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.42);
}

.primary-button.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.92rem;
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-search {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.hero-search label {
  display: block;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.hero-search div {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 14px 18px;
  color: #111827;
  outline: none;
}

.hero-search button {
  border: 0;
  padding: 0 20px;
  color: #fff;
  background: var(--amber);
  cursor: pointer;
}

.content-section {
  padding: 70px 0;
  background: #fff;
}

.content-section.soft {
  background: #f3f4f6;
}

.content-section.amber-soft {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.content-section.blue-rail {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.18;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fef3c7;
}

.section-more {
  color: #b45309;
  font-weight: 800;
}

.blue-rail .section-more,
.blue-rail .section-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

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

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

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

.compact-grid {
  margin-top: 24px;
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e5e7eb;
}

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

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

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

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

.play-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #fff;
  background: var(--amber);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: all 0.25s ease;
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.play-pill.light {
  color: var(--amber);
  background: rgba(255, 255, 255, 0.92);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.year-badge {
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
}

.movie-info {
  padding: 18px;
}

.category-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-row,
.mini-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-card-minimal {
  box-shadow: none;
  background: transparent;
}

.movie-card-minimal:hover {
  box-shadow: none;
}

.movie-card-minimal h3 {
  margin-top: 10px;
  font-size: 0.98rem;
}

.movie-card-horizontal .movie-card-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 145px;
}

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

.movie-card-horizontal .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.movie-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 0 18px;
  scrollbar-width: thin;
}

.rail-item {
  width: 280px;
  flex: 0 0 auto;
}

.blue-rail .movie-card-minimal h3,
.blue-rail .movie-card-minimal .mini-meta {
  color: #fff;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.34), transparent 32%),
    linear-gradient(135deg, #111827, #1f2937 52%, #0f172a);
}

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

.page-hero h1 {
  max-width: 820px;
  margin: 12px 0 14px;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.12;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #d1d5db;
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #f3f4f6;
  font-size: 0.95rem;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: end;
  gap: 20px;
  padding: 24px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.catalog-toolbar h2 {
  margin: 4px 0 0;
}

.toolbar-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px 160px 160px;
  gap: 12px;
}

.toolbar-controls input,
.toolbar-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: #111827;
  background: #f9fafb;
  outline: none;
}

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

.result-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.category-overview-list {
  display: grid;
  gap: 30px;
}

.category-overview-card {
  padding: 26px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

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

.category-overview-head h2 {
  margin: 6px 0;
  font-size: 1.8rem;
}

.category-overview-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.detail-header {
  padding: 34px 0 0;
  color: #fff;
  background:
    radial-gradient(circle at 12% 22%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: stretch;
  gap: 28px;
  padding-bottom: 38px;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  background: #000;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.video-cover-button {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.video-cover-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.38);
  font-size: 2.1rem;
  padding-left: 5px;
}

.video-cover-button.is-hidden {
  display: none;
}

.detail-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 34px;
}

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

.detail-article {
  padding: 32px;
}

.detail-article h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.detail-article .lead {
  color: #374151;
  font-size: 1.18rem;
  font-weight: 650;
}

.detail-article h2 {
  margin: 30px 0 12px;
  font-size: 1.4rem;
}

.detail-article p {
  color: #4b5563;
}

.detail-meta-list {
  padding: 16px 0;
  color: #4b5563;
}

.detail-meta-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f6;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 16px;
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 24px;
}

.side-panel h2 {
  margin: 0 0 16px;
}

.side-panel a {
  display: block;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 800;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 54px 0 34px;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--amber);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.back-top.is-visible {
  display: block;
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .hero-content,
  .detail-grid,
  .detail-content-grid,
  .footer-grid,
  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .hero-search {
    max-width: 560px;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

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

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

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-content {
    gap: 24px;
    padding: 46px 0;
  }

  .hero-search div {
    flex-direction: column;
    border-radius: 18px;
  }

  .hero-search button {
    min-height: 44px;
  }

  .two-col,
  .three-col,
  .four-col,
  .six-col {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .movie-card-link {
    grid-template-columns: 140px 1fr;
  }

  .toolbar-controls {
    grid-template-columns: 1fr;
  }

  .section-head,
  .category-overview-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-article {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

  .brand {
    font-size: 1.2rem;
  }

  .movie-card-horizontal .movie-card-link {
    display: block;
  }

  .movie-card-horizontal .poster-wrap {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
