:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --brand: #f97316;
  --brand-strong: #ea580c;
  --brand-soft: #ffedd5;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.2);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

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

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--brand);
}

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

.header-search input,
.mobile-search input,
.filter-search input {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  width: 190px;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #94a3b8;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.mobile-search button,
.filter-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-search button:hover,
.primary-btn:hover,
.secondary-btn:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

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

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.92));
}

.hero-copy {
  position: absolute;
  left: 50%;
  bottom: 82px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(18px, 2.6vw, 24px);
}

.hero-meta,
.detail-meta,
.meta-row,
.hero-actions,
.section-heading,
.filter-chips,
.category-shortcuts,
.tag-row,
.breadcrumbs,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.hero-meta {
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.info-list dd,
.tag-row span,
.filter-chips button,
.category-shortcuts a {
  border-radius: 999px;
}

.hero-meta span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  backdrop-filter: blur(8px);
}

.hero-actions,
.player-actions {
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 6, 23, 0.72);
  transform: translateY(-50%) scale(1.05);
}

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

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

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

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

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

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

.main-shell {
  padding: 56px 0 76px;
}

.page-shell {
  padding: 42px 0 76px;
}

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

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(26px, 3.2vw, 38px);
}

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

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

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

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

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

.movie-card a {
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--dark-soft);
}

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

.movie-card a:hover .poster-wrap img,
.compact-card a:hover img,
.category-card:hover img {
  transform: scale(1.07);
}

.card-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-type {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: var(--brand);
}

.card-body {
  padding: 18px;
}

.meta-row {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card h3,
.compact-card h3 {
  margin: 0;
  transition: color 0.2s ease;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card a:hover h3,
.compact-card a:hover h3 {
  color: var(--brand-strong);
}

.movie-card p {
  display: -webkit-box;
  min-height: 45px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 28px;
}

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

.compact-card a {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.compact-card img {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.compact-card h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.compact-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 900;
}

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

.category-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark);
  color: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.13);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.45s ease;
}

.category-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 20px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.page-title {
  margin-bottom: 30px;
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.breadcrumbs {
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--brand-strong);
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-search {
  display: flex;
  gap: 10px;
}

.filter-search input {
  flex: 1;
  padding: 13px 14px;
  background: #f8fafc;
  color: var(--ink);
}

.filter-search button {
  padding: 0 18px;
}

.filter-chips,
.category-shortcuts {
  gap: 10px;
  margin-top: 16px;
}

.filter-chips button,
.category-shortcuts a {
  border: 0;
  padding: 8px 13px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover,
.category-shortcuts a:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.filter-count {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
}

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

.player-card,
.content-card,
.info-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.22);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.play-button {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: var(--brand-strong);
}

.play-button svg {
  width: 36px;
  height: 36px;
  margin-left: 4px;
  fill: currentColor;
}

.detail-title {
  padding: 26px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-meta {
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
}

.content-card {
  margin-top: 22px;
  padding: 26px;
}

.content-card h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-card p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 16px;
}

.info-card {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

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

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.related-section {
  margin-top: 58px;
}

.empty-state {
  padding: 58px 20px;
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.empty-state h2,
.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-brand {
  color: #fff;
  font-size: 20px;
}

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

.site-footer p {
  max-width: 360px;
  color: #94a3b8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

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

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

  .info-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 560px;
  }

  .hero-copy {
    bottom: 78px;
  }

  .hero-control {
    display: none;
  }

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

  .card-body {
    padding: 14px;
  }

  .movie-card h3 {
    min-height: 46px;
    font-size: 16px;
  }

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

  .filter-search {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 17px;
  }

  .nav-shell,
  .main-shell,
  .page-shell,
  .footer-grid,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

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

  .compact-card a {
    grid-template-columns: auto 72px minmax(0, 1fr);
  }

  .compact-card img {
    width: 72px;
    height: 72px;
  }

  .detail-title,
  .content-card,
  .info-card {
    padding: 20px;
  }
}
