:root {
  --stellar-dark: #0a0e27;
  --stellar-deep: #141b3d;
  --stellar-mid: #1e2847;
  --stellar-light: #2a3857;
  --stellar-glow: #4a90e2;
  --stellar-sky: #38bdf8;
  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;
  --border-soft: rgba(148, 163, 184, 0.22);
  --shadow-glow: 0 18px 60px rgba(74, 144, 226, 0.28);
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 0%, rgba(74, 144, 226, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(56, 189, 248, 0.12), transparent 30rem),
    var(--stellar-dark);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--stellar-glow), var(--stellar-sky));
  box-shadow: var(--shadow-glow);
  font-size: 14px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(74, 144, 226, 0.18);
}

.global-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
  padding: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(20, 27, 61, 0.88);
}

.global-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.global-search input {
  padding: 8px 12px;
}

.global-search button,
.big-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--stellar-glow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.global-search button {
  padding: 8px 16px;
  white-space: nowrap;
}

.global-search button:hover,
.big-search button:hover,
.filter-bar button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  background: var(--stellar-sky);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(30, 40, 71, 0.8);
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--stellar-deep);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--stellar-dark) 0%, rgba(10, 14, 39, 0.78) 42%, rgba(10, 14, 39, 0.06) 100%),
    linear-gradient(to right, rgba(10, 14, 39, 0.86), transparent 58%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 76px;
  max-width: 760px;
  padding-right: 24px;
}

.hero-tags,
.detail-meta,
.breadcrumb,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(74, 144, 226, 0.26);
  border: 1px solid rgba(74, 144, 226, 0.4);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.section-more,
.category-strip-head a,
.category-card-body span,
.rank-watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
}

.primary-button {
  padding: 13px 26px;
  color: #ffffff;
  background: var(--stellar-glow);
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-button {
  padding: 12px 24px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  background: #ffffff;
}

.page-main {
  padding: 42px 0 72px;
}

.page-hero,
.search-card-large,
.detail-text-card,
.detail-side-card,
.player-panel,
.category-card,
.category-strip,
.filter-bar,
.search-status {
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 40, 71, 0.92), rgba(20, 27, 61, 0.84));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.page-hero {
  padding: 48px;
}

.compact-hero {
  padding-bottom: 36px;
}

.page-hero h1,
.search-card-large h2,
.section-header h2,
.detail-info h1,
.detail-text-card h2,
.detail-side-card h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p,
.search-card-large p,
.category-strip-head p,
.category-card-body p,
.detail-text-card p,
.detail-side-card dd,
.movie-desc {
  color: var(--text-muted);
  line-height: 1.75;
}

.breadcrumb {
  margin-top: 22px;
  color: var(--text-soft);
}

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

.content-section,
.category-grid-section,
.search-panel,
.player-section,
.detail-content-grid {
  margin-top: 42px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--stellar-sky);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-header h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-more,
.category-strip-head a,
.category-card-body span {
  padding: 10px 16px;
  color: #ffffff;
  border: 1px solid rgba(74, 144, 226, 0.5);
  background: rgba(74, 144, 226, 0.18);
}

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: rgba(30, 40, 71, 0.7);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 144, 226, 0.64);
  box-shadow: var(--shadow-glow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(10, 14, 39, 0.9);
}

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

.movie-card-link:hover .poster-wrap img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-body h3 {
  min-height: 2.8em;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-meta {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.movie-desc {
  margin: 0 0 12px;
  min-height: 4.9em;
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.hero-tag-row span {
  font-size: 13px;
}

.search-card-large {
  padding: 34px;
}

.big-search {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(10, 14, 39, 0.64);
}

.big-search input {
  min-height: 50px;
  padding: 0 14px;
}

.big-search button {
  padding: 0 26px;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 62px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(30, 40, 71, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-link:hover {
  transform: translateX(4px);
  border-color: rgba(74, 144, 226, 0.58);
}

.rank-number {
  color: var(--stellar-sky);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-link img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(10, 14, 39, 0.9);
}

.rank-main {
  min-width: 0;
}

.rank-main strong {
  display: block;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.rank-main em {
  display: block;
  color: var(--text-soft);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-watch {
  padding: 8px 13px;
  color: #ffffff;
  background: rgba(74, 144, 226, 0.25);
}

.category-preview {
  display: grid;
  gap: 22px;
}

.category-strip {
  padding: 24px;
}

.category-strip-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.category-strip-head h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

.category-card {
  overflow: hidden;
}

.category-card a {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 230px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 12px;
}

.category-covers img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(10, 14, 39, 0.9);
}

.category-card-body {
  padding: 28px 26px;
}

.category-card-body h2 {
  margin: 0 0 12px;
}

.category-card-body span {
  margin-top: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 150px auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(10, 14, 39, 0.68);
}

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

.search-status {
  margin-bottom: 18px;
  padding: 16px 18px;
  color: var(--text-muted);
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.detail-bg,
.detail-bg-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(8px) brightness(0.5);
  transform: scale(1.04);
}

.detail-bg-mask {
  background:
    linear-gradient(to top, var(--stellar-dark) 0%, rgba(10, 14, 39, 0.8) 50%, rgba(10, 14, 39, 0.54) 100%),
    radial-gradient(circle at 80% 20%, rgba(74, 144, 226, 0.28), transparent 34rem);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  min-height: 640px;
  padding: 82px 0 64px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background: rgba(10, 14, 39, 0.9);
  box-shadow: var(--shadow-glow);
}

.detail-info h1 {
  max-width: 920px;
  margin: 22px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.06;
}

.detail-one-line {
  max-width: 900px;
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  margin: 22px 0;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-panel {
  padding: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.22), rgba(0, 0, 0, 0.38));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--stellar-glow);
  box-shadow: var(--shadow-glow);
  font-size: 28px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 22px;
}

.detail-text-card,
.detail-side-card {
  padding: 28px;
}

.detail-text-card h2,
.detail-side-card h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

.detail-text-card p {
  margin: 0;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.detail-side-card dt {
  color: var(--text-soft);
}

.detail-side-card dd {
  margin: 0;
}

.side-tags {
  margin-top: 18px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border-soft);
  background: rgba(10, 14, 39, 0.92);
}

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 620px;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
}

.is-filter-hidden {
  display: none !important;
}

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

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

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

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 4;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
  }

  .global-search {
    width: 100%;
    order: 5;
    min-width: 0;
    margin-left: 0;
  }

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 72px;
    padding-right: 0;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
  }

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

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

  .category-card a,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    align-items: start;
    padding-top: 46px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, var(--container));
  }

  .page-hero,
  .search-card-large,
  .category-strip,
  .detail-text-card,
  .detail-side-card {
    padding: 22px;
    border-radius: 18px;
  }

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

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .movie-desc {
    display: none;
  }

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

  .big-search button {
    min-height: 46px;
  }

  .rank-link {
    grid-template-columns: 44px 56px minmax(0, 1fr);
  }

  .rank-watch {
    display: none;
  }

  .rank-link img {
    width: 56px;
    height: 76px;
  }

  .category-strip-head,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-tags span,
  .detail-meta span,
  .tag-row span {
    font-size: 11px;
  }
}
