:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-50: #fff7ed;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --rose-500: #f43f5e;
  --blue-500: #3b82f6;
  --cyan-400: #22d3ee;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(146, 64, 14, 0.14);
  --shadow-card: 0 12px 28px rgba(31, 41, 55, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 247, 237, 0.94), rgba(255, 251, 235, 0.94));
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
  box-shadow: 0 8px 24px rgba(146, 64, 14, 0.12);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.28);
  transition: transform 0.28s ease;
}

.brand:hover .brand-mark {
  transform: rotate(10deg) scale(1.03);
}

.brand-name {
  font-size: 1.22rem;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  position: relative;
  width: 260px;
  flex: 0 0 auto;
}

.header-search input {
  width: 100%;
  border: 1px solid var(--amber-200);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 10px 44px 10px 18px;
  outline: none;
  color: var(--gray-800);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus {
  border-color: var(--amber-400);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25);
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--amber-500);
  color: var(--white);
  transform: translateY(-50%);
}

.mobile-menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--amber-100);
  color: var(--gray-800);
  width: 42px;
  height: 42px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--amber-200);
  background: var(--white);
  padding: 16px;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  padding: 10px 14px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--white);
  padding: 0 16px;
}

.mobile-nav {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 10px 4px;
  font-weight: 650;
  color: var(--gray-700);
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--amber-600);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 24%, rgba(251, 191, 36, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--amber-400);
  font-weight: 800;
  font-size: 1.05rem;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.75rem, 7vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.meta-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(245, 158, 11, 0.82);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.soft-button:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.soft-button {
  color: var(--amber-700);
  background: var(--amber-100);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  font-size: 2rem;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--amber-400);
}

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 72px;
}

.page-main.spacious {
  display: grid;
  gap: 56px;
}

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

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

.section-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.section-more {
  color: var(--amber-600);
  font-weight: 800;
}

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

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

.horizontal-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
  scroll-snap-align: start;
}

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-50));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.72));
  opacity: 0.88;
}

.poster-meta,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-meta {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: rgba(245, 158, 11, 0.92);
}

.card-body {
  padding: 15px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 750;
}

.card-body h3 {
  min-height: 2.9em;
  margin: 8px 0 8px;
  color: var(--gray-900);
  font-size: 1.04rem;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: var(--amber-600);
}

.card-body p {
  min-height: 4.6em;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  background: var(--amber-50);
  color: var(--amber-700);
  padding: 5px 9px;
  font-size: 0.76rem;
}

.panel {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  padding: 30px;
}

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

.category-card {
  min-height: 148px;
  padding: 24px;
  border: 1px solid rgba(217, 119, 6, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--white), var(--amber-50));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

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

.category-card strong {
  color: var(--amber-600);
}

.page-hero {
  border-radius: 0 0 36px 36px;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.25), transparent 34%),
    linear-gradient(135deg, rgba(31, 41, 55, 0.96), rgba(146, 64, 14, 0.85));
  color: var(--white);
  padding: 58px 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

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

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1.12;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(130px, 0.45fr));
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--amber-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-800);
  padding: 12px 14px;
  outline: none;
}

.filter-count {
  margin: -8px 0 22px;
  color: var(--gray-600);
  font-weight: 650;
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
  display: grid;
  gap: 34px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: 34px;
  align-items: stretch;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--amber-100);
  box-shadow: var(--shadow-soft);
}

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

.detail-info {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  padding: 34px;
}

.detail-info h1 {
  margin: 0 0 14px;
  color: var(--gray-900);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.15;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 750;
}

.detail-lead {
  margin: 0 0 22px;
  color: var(--gray-700);
  font-size: 1.08rem;
  line-height: 1.9;
}

.meta-tags span {
  background: var(--amber-50);
  color: var(--amber-700);
}

.player-section {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #070707;
  box-shadow: var(--shadow-soft);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.player-box video,
.player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.66));
  cursor: pointer;
}

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

.player-play {
  width: min(112px, 26vw);
  height: min(112px, 26vw);
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.38);
  font-size: 2.4rem;
  transition: transform 0.2s ease;
}

.player-play:hover {
  transform: scale(1.06);
}

.player-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  color: rgba(255, 255, 255, 0.82);
}

.text-section {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 30px;
}

.text-section h2 {
  margin: 0 0 16px;
  color: var(--gray-900);
}

.text-section p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.95;
  font-size: 1.02rem;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.08);
}

.ranking-number {
  color: var(--amber-600);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--amber-100);
}

.ranking-row h3 {
  margin: 0 0 6px;
}

.ranking-row p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.55;
}

.search-layout {
  display: grid;
  gap: 26px;
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--gray-600);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.empty-state.show {
  display: block;
}

.site-footer {
  background: linear-gradient(135deg, var(--amber-50), var(--orange-50));
  border-top: 1px solid var(--amber-200);
  padding: 46px 0 24px;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 32px;
}

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

.site-footer p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--gray-800);
}

.site-footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: var(--gray-600);
  font-size: 0.95rem;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--amber-200);
  color: var(--gray-500);
  text-align: center;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    min-height: 520px;
  }

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

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

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

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

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

@media (max-width: 720px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    width: min(100% - 32px, 1180px);
    align-items: flex-end;
    padding-bottom: 92px;
  }

  .hero-copy h1 {
    font-size: 2.7rem;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-main {
    padding: 38px 0 56px;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .panel,
  .detail-info,
  .text-section {
    padding: 22px;
  }

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

  .ranking-row {
    grid-template-columns: 48px 72px 1fr;
  }

  .ranking-row .soft-button {
    grid-column: 1 / -1;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-strip {
    grid-auto-columns: 82%;
  }

  .page-hero {
    padding: 42px 0;
  }

  .detail-main {
    width: min(100% - 24px, 1180px);
  }
}
