:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-soft: #fed7aa;
  --red: #dc2626;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.site-logo span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--red));
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.25);
}

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

.site-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand);
  background: var(--surface-soft);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.top-search input,
.filter-input,
.filter-select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 16px;
  outline: none;
  color: var(--text);
  transition: 0.2s ease;
}

.top-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.top-search button,
.primary-btn,
.ghost-btn {
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.top-search button:hover,
.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--brand);
  background: var(--surface-soft);
  font-size: 22px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: clamp(430px, 64vw, 640px);
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 5s ease;
}

.hero-slide.active img {
  transform: scale(1.09);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 74px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

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

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.hero-kicker span,
.corner-badge,
.rank-badge,
.meta-pill,
.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-kicker span:first-child {
  padding: 6px 12px;
  background: var(--brand);
}

.hero-kicker span:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -1px;
}

.hero p {
  max-width: 660px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

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

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 64px;
}

.section-block {
  margin-bottom: 58px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.compact-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

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

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 36px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.30);
  transition: 0.25s ease;
}

.movie-card a:hover .play-mark {
  opacity: 1;
}

.corner-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  color: #fff;
  background: #eab308;
  box-shadow: 0 6px 12px rgba(234, 179, 8, 0.25);
}

.card-content {
  display: block;
  padding: 13px 14px 15px;
}

.card-content strong {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-content em {
  display: block;
  margin-top: 8px;
  color: var(--brand);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.card-content small {
  display: -webkit-box;
  height: 40px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #dc2626);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #f97316, #7c2d12);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #f59e0b, #be123c);
}

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

.category-card strong {
  font-size: 24px;
}

.category-card span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.86);
}

.rank-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.rank-list {
  display: grid;
  gap: 13px;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

.rank-row:hover {
  background: var(--surface-soft);
  transform: translateX(4px);
}

.list-rank {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.rank-row img {
  width: 96px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

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

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-select {
  border-radius: 14px;
  appearance: none;
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.detail-hero {
  background: #111827;
  color: #fff;
}

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

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

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

.detail-hero h1 {
  max-width: 960px;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

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

.meta-pill {
  padding: 6px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.player-box {
  overflow: hidden;
  border-radius: 24px;
  background: #030712;
  box-shadow: var(--shadow);
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #030712;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(234, 88, 12, 0.18), rgba(0, 0, 0, 0.48));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--brand);
  font-size: 36px;
  box-shadow: 0 18px 40px rgba(234, 88, 12, 0.35);
}

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

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

.detail-side,
.detail-text,
.related-box {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-side {
  padding: 18px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: #111827;
}

.detail-side dl {
  margin: 18px 0 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.detail-side dd {
  margin: 0;
  font-weight: 700;
}

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

.detail-tags span {
  padding: 5px 10px;
  color: var(--brand-dark);
  background: var(--surface-soft);
  font-size: 13px;
}

.detail-text {
  margin-top: 26px;
  padding: 28px;
}

.detail-text h2,
.related-box h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-text p {
  margin: 0 0 20px;
  color: #374151;
  font-size: 16px;
}

.related-box {
  margin-top: 26px;
  padding: 26px;
}

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

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.prev-next a {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.prev-next span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.prev-next strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span {
  padding: 5px 10px;
  color: var(--brand-dark);
  background: var(--surface-soft);
  font-size: 13px;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
}

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

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

.site-footer p {
  margin: 0 0 10px;
  color: #9ca3af;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

.footer-line {
  color: #fb923c !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  color: #9ca3af;
  text-align: center;
}

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

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

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .site-nav {
    order: 4;
    width: 100%;
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .site-nav.open {
    display: grid;
  }

  .site-nav a {
    text-align: center;
  }

  .top-search {
    order: 5;
    width: 100%;
    min-width: 0;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    bottom: 70px;
  }

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

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

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

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

  .detail-side img {
    max-width: 280px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .site-logo {
    font-size: 18px;
  }

  .site-logo span {
    width: 34px;
    height: 34px;
  }

  .hero {
    height: 520px;
  }

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

  .movie-grid,
  .movie-grid.medium,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 40px 82px minmax(0, 1fr);
  }

  .rank-row img {
    width: 82px;
    height: 54px;
  }

  .player-caption {
    align-items: flex-start;
    flex-direction: column;
  }
}
