* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fff8e7;
  --amber-100: #ffefc2;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --yellow-400: #facc15;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-soft: 0 12px 32px rgba(17, 24, 39, 0.12);
  --shadow-strong: 0 24px 60px rgba(17, 24, 39, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-800);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 45%, #fefce8 100%);
}

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

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

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: #fff;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.24);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: 24px;
  transition: transform 0.25s ease;
}

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

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

.main-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a.active,
.mobile-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.header-search input,
.mobile-nav input {
  width: 230px;
  border: 0;
  outline: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--gray-800);
}

.header-search button,
.btn,
.filter-panel button,
.play-cta {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button {
  background: #fff;
  color: var(--amber-600);
  box-shadow: none;
}

.btn:hover,
.filter-panel button:hover,
.play-cta:hover,
.header-search button:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.36);
}

.btn.ghost {
  color: var(--amber-600);
  background: #fff;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  height: 610px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide,
.hero-bg,
.hero-mask {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

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

.hero-mask {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.50) 48%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 48px;
  color: #fff;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff7ed;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.72);
  backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(23px, 3vw, 34px);
}

.hero p {
  max-width: 650px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.section-heading,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.hero-actions {
  justify-content: flex-start;
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

.hero-poster-meta {
  padding: 18px;
}

.hero-poster-meta strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.hero-poster-meta span {
  color: rgba(255, 255, 255, 0.78);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-arrow:hover {
  transform: translateY(-50%) scale(1.06);
  background: rgba(255, 255, 255, 0.32);
}

.hero-arrow.prev {
  left: 20px;
  transform: translateY(-50%);
}

.hero-arrow.next {
  right: 20px;
  transform: translateY(-50%);
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 68px 0;
}

.section.tint {
  background: linear-gradient(90deg, #ffedd5, #fef3c7);
}

.section.white {
  background: rgba(255, 255, 255, 0.78);
}

.section h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(28px, 3vw, 38px);
}

.section-subtitle,
.page-hero p,
.category-desc,
.detail-lead {
  color: #64748b;
  line-height: 1.8;
}

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

.category-tile {
  min-height: 174px;
  padding: 24px;
  border: 2px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: var(--shadow-strong);
}

.category-tile .icon {
  display: block;
  margin-bottom: 14px;
  font-size: 42px;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  color: var(--gray-800);
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.movie-card .poster-wrap {
  height: 250px;
}

.movie-card.large .poster-wrap {
  height: 370px;
}

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

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

.corner-label,
.rank-badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.corner-label {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  color: #fff;
  background: rgba(245, 158, 11, 0.96);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.30);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 10px;
  color: var(--gray-800);
  font-size: 20px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.large h3 {
  font-size: 28px;
  -webkit-line-clamp: 2;
}

.movie-info p {
  margin: 0 0 14px;
  min-height: 48px;
  color: #64748b;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.large p {
  -webkit-line-clamp: 3;
  min-height: 78px;
}

.meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 14px;
  white-space: nowrap;
}

.meta-line span:first-child {
  color: #eab308;
  font-weight: 900;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

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

.stack-list {
  display: grid;
  gap: 18px;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0;
}

.movie-card.horizontal .poster-wrap {
  height: 160px;
}

.movie-card.horizontal .movie-info p {
  min-height: auto;
}

.ranking-box {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.ranking-row img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-index {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #fb923c);
}

.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.ranking-row p {
  margin: 0;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-score {
  color: #eab308;
  font-size: 18px;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 44px;
}

.page-hero-card {
  padding: 34px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(150px, 190px)) auto;
  gap: 12px;
  padding: 18px;
  margin: 22px 0 30px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  color: var(--gray-800);
  background: #fff;
}

.result-note {
  margin: 0 0 20px;
  color: #64748b;
}

.detail-hero {
  padding: 52px 0 28px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-strong);
}

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

.detail-title {
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.detail-title h1 {
  color: var(--gray-900);
  font-size: clamp(34px, 4vw, 58px);
}

.detail-lead {
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-weight: 800;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.player-section {
  padding: 34px 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-strong);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.60));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  font-size: 18px;
}

.detail-section {
  padding: 26px 0 54px;
}

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

.detail-card p {
  color: #475569;
  line-height: 1.9;
  font-size: 17px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.mini-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.10);
}

.mini-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.mini-card span {
  display: block;
  padding: 12px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-footer {
  padding: 52px 0;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937 52%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 34px;
}

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

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

.site-footer p,
.site-footer li {
  color: #94a3b8;
  line-height: 1.8;
}

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

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

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

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 24px;
  text-align: center;
  color: #64748b;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero-content,
  .detail-layout,
  .feature-layout {
    grid-template-columns: 1fr;
    padding-top: 54px;
    padding-bottom: 70px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

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

  .header-inner {
    height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

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

  .hero h2 {
    font-size: 24px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 46px 0;
  }

  .movie-grid,
  .category-grid,
  .related-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .movie-card.horizontal .poster-wrap {
    height: 150px;
  }

  .ranking-row {
    grid-template-columns: 46px 64px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 64px;
    height: 64px;
  }

  .ranking-score {
    display: none;
  }

  .detail-poster img {
    height: 440px;
  }
}
