:root {
  --primary: #e2591b;
  --primary-soft: #fef7ed;
  --accent: #f59e0b;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --surface: #ffffff;
  --surface-soft: #fafaf9;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.12);
  --radius: 24px;
}

* {
  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(--ink);
  background: var(--surface-soft);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 26px rgba(226, 89, 27, 0.28);
}

.brand-name {
  font-size: 24px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  color: #57534e;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  padding: 11px 16px;
  min-width: 220px;
  outline: none;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(226, 89, 27, 0.12);
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.large-search button,
.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(226, 89, 27, 0.24);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: var(--ink);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
}

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

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

.hero-carousel {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.02);
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.14)), var(--hero-image), linear-gradient(135deg, #1c1917, #78350f);
  background-size: cover;
  background-position: center;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  background: linear-gradient(0deg, rgba(250, 250, 249, 1), rgba(250, 250, 249, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 24px;
  margin-left: max(24px, calc((100vw - 1280px) / 2));
  color: white;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-tags span:first-child,
.detail-meta span:first-child {
  background: var(--primary);
  color: white;
}

.hero-content h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 30px;
  font-size: 18px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 26px;
}

.hero-next {
  right: 26px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: white;
}

.quick-search-panel,
.content-section,
.detail-main,
.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search-panel {
  position: relative;
  z-index: 8;
  margin-top: -64px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-panel h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.quick-search-panel p {
  margin: 0;
  color: var(--muted);
}

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

.quick-search-panel input,
.large-search input {
  flex: 1;
}

.content-section {
  margin-top: 70px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  background: white;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(28, 25, 23, 0.14);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #431407, #f59e0b);
}

.poster-frame::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.35;
  opacity: 0;
}

.poster-frame.is-missing::after {
  opacity: 1;
}

.poster-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row span {
  color: #bc3e18;
  background: #fef7ed;
}

.highlight-section {
  padding-top: 38px;
  padding-bottom: 38px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fef7ed, #fff7ed);
  box-shadow: var(--shadow);
}

.horizontal-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 6px 18px;
  scroll-snap-type: x mandatory;
}

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

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 22px;
}

.movie-card.is-wide {
  grid-row: span 2;
}

.movie-card.is-wide .poster-frame {
  aspect-ratio: 16 / 10;
}

.ranking-block {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  align-items: stretch;
  padding-top: 44px;
  padding-bottom: 44px;
  border-radius: 32px;
  color: white;
  background: linear-gradient(135deg, #7c2d12, #f97316);
  box-shadow: var(--shadow);
}

.ranking-copy h2 {
  margin: 0 0 14px;
  font-size: 36px;
}

.ranking-copy p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.ranking-row span {
  font-weight: 900;
  color: #fed7aa;
}

.ranking-row em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 14px;
}

.page-hero {
  margin-top: 32px;
  padding-top: 56px;
  padding-bottom: 56px;
  border-radius: 34px;
  color: white;
  background: linear-gradient(135deg, #7c2d12, #f59e0b);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
}

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

.search-hero,
.category-hero,
.ranking-hero {
  display: grid;
  gap: 26px;
}

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

.category-card {
  min-height: 190px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 28px;
  padding: 24px;
  color: white;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18)), var(--category-image), linear-gradient(135deg, #431407, #f59e0b);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.7;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
  padding: 20px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
}

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

.empty-state,
.search-summary {
  margin: 0 0 24px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 28px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 30px;
  margin-top: 28px;
}

.detail-primary {
  display: grid;
  gap: 22px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 6px;
  font-size: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.player-card.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: white;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.detail-title-card,
.article-card,
.side-info-card,
.prose-card {
  border-radius: 28px;
  padding: 26px;
  background: white;
  box-shadow: 0 12px 36px rgba(28, 25, 23, 0.08);
}

.detail-title-card h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-title-card p,
.article-card p,
.prose-card p,
.prose-card li {
  color: #57534e;
  line-height: 1.9;
}

.article-card h2,
.side-info-card h2,
.prose-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
}

.side-poster {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.side-info-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.side-info-card dt {
  color: var(--muted);
}

.side-info-card dd {
  margin: 0;
  font-weight: 750;
}

.site-footer {
  margin-top: 82px;
  color: #d6d3d1;
  background: #1c1917;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

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

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

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

.large-search {
  max-width: 760px;
}

.prose-card {
  max-width: 980px;
}

.prose-card ul {
  padding-left: 20px;
}

[hidden] {
  display: none !important;
}

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

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

  .featured-grid,
  .ranking-block,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    grid-template-columns: 260px 1fr;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-name {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    margin-left: 0;
    padding: 0 22px;
  }

  .hero-control {
    display: none;
  }

  .quick-search-panel,
  .ranking-block,
  .footer-inner,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .quick-search-panel form,
  .large-search,
  .mobile-search {
    flex-direction: column;
  }

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

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

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

  .ranking-row em {
    grid-column: 2;
  }
}

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

  .horizontal-scroller {
    grid-auto-columns: 78%;
  }

  .page-hero,
  .content-section,
  .detail-main,
  .quick-search-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 34px;
  }
}
