:root {
  color-scheme: light;
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --orange: #f97316;
  --orange-dark: #c2410c;
  --blue: #2563eb;
  --radius: 1.25rem;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
}

.site-nav {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.4);
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.brand-copy small {
  margin-top: 0.1rem;
  color: #cbd5e1;
  font-size: 0.75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link,
.mobile-nav-link {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #e5e7eb;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.95);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.4rem;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 1rem;
}

.mobile-nav.open {
  display: grid;
  gap: 0.4rem;
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(249, 115, 22, 0.38), transparent 28%),
    linear-gradient(110deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.84) 42%, rgba(15, 23, 42, 0.45) 100%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 4rem;
  align-items: center;
  padding: 7rem 0 6rem;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-lead,
.page-hero p,
.detail-one-line {
  margin: 1.2rem 0 0;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.8;
}

.hero-tags,
.movie-card-footer,
.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-tags {
  margin-top: 1.4rem;
}

.tag-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-actions {
  margin-top: 2rem;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 0.85rem;
  padding: 0.85rem 1.35rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.35);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.ghost-btn.light {
  color: #ffffff;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 1.6rem;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
}

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

.hero-poster span {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: rgba(249, 115, 22, 0.95);
  font-weight: 800;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.8rem;
}

.hero-dots {
  display: flex;
  gap: 0.5rem;
}

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

.hero-dot.active {
  width: 34px;
  background: #f97316;
}

.feature-strip,
.content-section,
.category-preview,
.detail-content,
.player-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 2rem 0 0;
}

.feature-item {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.feature-item strong,
.feature-item span {
  display: block;
}

.feature-item strong {
  font-size: 1.25rem;
}

.feature-item span {
  margin-top: 0.3rem;
  color: var(--muted);
}

.content-section,
.category-preview,
.detail-content,
.player-section {
  padding: 4.5rem 0;
}

.soft-bg {
  width: 100%;
  max-width: none;
  padding-left: max(1rem, calc((100vw - 1180px) / 2));
  padding-right: max(1rem, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.dark-section {
  width: 100%;
  max-width: none;
  padding-left: max(1rem, calc((100vw - 1180px) / 2));
  padding-right: max(1rem, calc((100vw - 1180px) / 2));
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b 56%, #7c2d12);
}

.section-title {
  margin: 0 auto 2.2rem;
  text-align: center;
  max-width: 760px;
}

.section-title h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
}

.section-title p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.dark-section .section-title p {
  color: #cbd5e1;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.35rem;
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.mini-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.movie-card-cover {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.movie-card-shade,
.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 58%);
}

.movie-card-meta-top {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  right: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.movie-card-meta-top span,
.movie-card-footer span {
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-body h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.08rem;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0.7rem 0 1rem;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-footer {
  justify-content: space-between;
  gap: 0.45rem;
}

.movie-card-footer span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #f3f4f6;
  color: #4b5563;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 1.4rem;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.category-card-copy {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
}

.category-card-copy strong,
.category-card-copy small {
  display: block;
}

.category-card-copy strong {
  font-size: 1.45rem;
}

.category-card-copy small {
  margin-top: 0.45rem;
  color: #e5e7eb;
  line-height: 1.6;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.ranking-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.ranking-item {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  color: #ffffff;
  font-weight: 900;
}

.ranking-item img {
  width: 72px;
  height: 92px;
  border-radius: 0.7rem;
  object-fit: cover;
}

.ranking-copy strong,
.ranking-copy small {
  display: block;
}

.ranking-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.02rem;
}

.ranking-copy small {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.5;
}

.ranking-play {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: #ea580c;
  background: #ffedd5;
  font-weight: 800;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 6rem max(1rem, calc((100vw - 1180px) / 2));
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #334155 62%, #7c2d12);
}

.slim-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.category-hero,
.ranking-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
}

.category-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.24;
}

.page-hero > div {
  position: relative;
  max-width: 780px;
}

.search-panel {
  width: min(980px, calc(100% - 2rem));
  margin: -2rem auto 0;
  position: relative;
  z-index: 4;
}

.search-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 0.8rem 1rem;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-card input {
  width: 100%;
  border: 0;
  outline: none;
  color: #111827;
  font-size: 1rem;
}

.search-icon,
.search-count {
  color: var(--muted);
  font-weight: 700;
}

.category-preview {
  border-top: 1px solid var(--line);
}

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

.category-preview-head h2 {
  margin: 0;
  font-size: 2rem;
}

.category-preview-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.category-preview-head a {
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: #ea580c;
  background: #ffedd5;
  font-weight: 800;
  white-space: nowrap;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: blur(4px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78), rgba(124, 45, 18, 0.68));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 2.5rem;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: #fed7aa;
}

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

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1.4rem;
  object-fit: cover;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4);
}

.detail-copy h1 {
  margin-top: 0.4rem;
}

.detail-copy .primary-btn {
  margin-top: 2rem;
}

.player-section {
  padding-bottom: 1rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 1rem;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.72));
  cursor: pointer;
  text-align: center;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.play-circle {
  display: inline-flex;
  width: 82px;
  height: 82px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 22px 44px rgba(249, 115, 22, 0.35);
  font-size: 2rem;
}

.player-overlay strong {
  display: block;
  max-width: min(680px, calc(100% - 2rem));
  font-size: clamp(1.3rem, 3vw, 2.2rem);
}

.detail-content {
  padding-top: 2rem;
}

.detail-article {
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-article h2 {
  margin: 0 0 1rem;
  font-size: 1.7rem;
}

.detail-article h2:not(:first-child) {
  margin-top: 2rem;
}

.detail-article p {
  color: #374151;
  font-size: 1.06rem;
  line-height: 1.9;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.detail-meta-grid div {
  border-radius: 1rem;
  padding: 1rem;
  background: #f8fafc;
}

.detail-meta-grid span,
.detail-meta-grid strong {
  display: block;
}

.detail-meta-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-meta-grid strong {
  margin-top: 0.35rem;
}

.site-footer {
  padding: 3rem max(1rem, calc((100vw - 1180px) / 2));
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 1rem;
  color: #ffffff;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  line-height: 1.7;
}

.site-footer a {
  display: block;
  margin: 0.35rem 0;
}

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

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  color: #94a3b8;
  text-align: center;
}

.hidden-by-search {
  display: none !important;
}

@media (max-width: 920px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-poster,
  .detail-poster {
    max-width: 320px;
  }

  .feature-strip,
  .spotlight-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .brand-copy small {
    display: none;
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-inner {
    padding-top: 5rem;
  }

  .hero-poster {
    display: none;
  }

  .feature-strip,
  .spotlight-grid,
  .footer-grid,
  .category-preview-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ranking-item {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .ranking-play {
    display: none;
  }

  .movie-card-cover {
    height: 260px;
  }

  .content-section,
  .category-preview,
  .detail-content,
  .player-section {
    padding: 3rem 0;
  }
}
