:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c32;
  --panel: #172033;
  --panel-strong: #1e293b;
  --muted: #94a3b8;
  --text: #f8fafc;
  --line: rgba(148, 163, 184, 0.18);
  --orange: #f97316;
  --orange-deep: #ea580c;
  --red: #dc2626;
  --gold: #facc15;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.15), transparent 28rem), var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.header-inner,
.header-pills,
.footer-inner,
.page-container,
.hero-content {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.header-inner {
  height: 4.2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
  transition: transform 0.25s ease;
}

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

.brand-text {
  font-size: 1.2rem;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.main-nav a,
.nav-pill,
.mobile-menu a,
.mobile-pill {
  color: #cbd5e1;
  border-radius: 0.7rem;
  transition: 0.2s ease;
}

.main-nav a {
  padding: 0.58rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.main-nav a:hover,
.nav-pill:hover,
.mobile-menu a:hover,
.mobile-pill:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
}

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

.header-search input,
.mobile-search input,
.search-hero input {
  color: #fff;
  background: rgba(51, 65, 85, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: none;
  border-radius: 0.8rem;
  transition: 0.2s ease;
}

.header-search input {
  width: 14.5rem;
  padding: 0.62rem 0.8rem;
}

.header-search input:focus,
.mobile-search input:focus,
.search-hero input:focus {
  border-color: rgba(249, 115, 22, 0.78);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button,
.secondary-button {
  cursor: pointer;
  border: none;
  border-radius: 0.8rem;
  font-weight: 800;
  transition: 0.22s ease;
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.22);
}

.header-search button {
  padding: 0.62rem 0.9rem;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.header-pills {
  display: flex;
  gap: 0.55rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  overflow-x: auto;
}

.nav-pill {
  flex: 0 0 auto;
  padding: 0.35rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 750;
  background: rgba(51, 65, 85, 0.72);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 2.45rem;
  height: 2.45rem;
  border: none;
  border-radius: 0.8rem;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.9);
}

.mobile-menu {
  display: none;
  padding: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0.8rem;
  font-weight: 700;
}

.mobile-search {
  margin-bottom: 0.8rem;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 0.72rem 0.8rem;
}

.mobile-search button {
  padding: 0.72rem 0.95rem;
}

.mobile-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.mobile-pill {
  padding: 0.45rem 0.7rem !important;
  background: rgba(51, 65, 85, 0.8);
  font-size: 0.78rem;
}

.hero {
  position: relative;
  height: 35rem;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.14));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 42rem;
  padding-top: 2rem;
}

.hero-badge,
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.78rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 0.86rem;
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 1.4rem;
  color: #d1d5db;
  font-size: 1.06rem;
  line-height: 1.78;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.82rem 1.25rem;
}

.secondary-button {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.secondary-button:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 2.85rem;
  height: 2.85rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  transition: 0.2s ease;
}

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

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 1.8rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 2.2rem;
  background: var(--orange);
}

.page-container {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.page-title {
  margin-bottom: 2rem;
}

.page-title h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.page-title p {
  max-width: 52rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.content-section {
  margin-bottom: 4rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-more,
.category-link {
  color: var(--orange);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.84);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

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

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.055);
  filter: saturate(1.08);
}

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.76));
}

.rank-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border-radius: 0.65rem;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
}

.card-content {
  padding: 1rem;
}

.card-content h3 {
  margin: 0.45rem 0 0.45rem;
  color: #fff;
  font-size: 1.03rem;
  line-height: 1.35;
}

.card-content h3 a:hover {
  color: #fdba74;
}

.card-content p {
  min-height: 3.2rem;
  margin: 0 0 0.85rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.55;
}

.card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.card-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  font-size: 0.74rem;
  font-weight: 750;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.rating {
  color: var(--gold);
  font-weight: 850;
}

.movie-card.card-large {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.movie-card.card-large .poster-wrap {
  aspect-ratio: auto;
  min-height: 14rem;
}

.movie-card.card-horizontal {
  display: grid;
  grid-template-columns: 11rem 1fr;
}

.movie-card.card-horizontal .poster-wrap {
  aspect-ratio: auto;
  min-height: 13.5rem;
}

.feature-panel {
  padding: 2rem;
  border: 1px solid rgba(249, 115, 22, 0.22);
  border-radius: 1.4rem;
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.26), rgba(127, 29, 29, 0.2));
}

.scroller {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
  display: none;
}

.scroller .movie-card {
  flex: 0 0 16rem;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.2rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  transition: 0.24s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.2);
  filter: blur(18px);
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.42);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 0.7rem;
}

.category-tile p {
  position: relative;
  margin: 0 0 1rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.category-tile strong {
  position: relative;
  color: #fdba74;
}

.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 1rem;
  margin-bottom: 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.84);
}

.search-hero input {
  width: 100%;
  padding: 0.9rem 1rem;
}

.search-hero button {
  padding: 0.9rem 1.4rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 0.48rem 0.8rem;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.84);
  transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.56);
  background: rgba(249, 115, 22, 0.2);
}

.detail-hero {
  padding: 3rem 0;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 28rem), linear-gradient(180deg, #111827, var(--bg));
}

.detail-layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-info p {
  color: #d1d5db;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #fdba74;
}

.player-section {
  margin-top: 2rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: none;
  color: #fff;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(0, 0, 0, 0.72));
  transition: 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
  font-size: 2rem;
  padding-left: 0.18rem;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.article-panel {
  padding: 1.6rem;
  margin-top: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.2rem;
  background: rgba(30, 41, 59, 0.78);
}

.article-panel h2 {
  margin: 0 0 0.8rem;
}

.article-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.9;
}

.no-results {
  display: none;
  padding: 2rem;
  text-align: center;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.78);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer-brand {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-inner p {
  max-width: 44rem;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 1.4rem 0;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fdba74;
}

.copyright {
  font-size: 0.88rem;
}

@media (max-width: 1040px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .header-inner {
    height: 3.8rem;
  }

  .hero {
    height: 32rem;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .movie-card.card-large,
  .movie-card.card-horizontal,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .movie-card.card-large .poster-wrap,
  .movie-card.card-horizontal .poster-wrap {
    aspect-ratio: 2 / 3;
    min-height: 0;
  }

  .detail-cover {
    max-width: 18rem;
  }
}

@media (max-width: 540px) {
  .hero {
    height: 30rem;
  }

  .hero-copy {
    padding-right: 0;
  }

  .hero p {
    font-size: 0.96rem;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .page-container {
    padding-top: 2rem;
  }

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

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

  .card-content p {
    min-height: 0;
  }
}
