:root {
  --stellar-dark: #0a0e27;
  --stellar-deep: #141b3d;
  --stellar-mid: #1e2847;
  --stellar-light: #2a3857;
  --stellar-glow: #4a90e2;
  --stellar-hot: #38bdf8;
  --text-main: #ffffff;
  --text-muted: #aeb8d2;
  --card-border: rgba(255, 255, 255, 0.10);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: radial-gradient(circle at top left, rgba(74, 144, 226, 0.22), transparent 26rem), var(--stellar-dark);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-icon {
  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-hot));
  box-shadow: 0 0 24px rgba(74, 144, 226, 0.65);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--stellar-hot);
}

.search-box,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--stellar-mid);
  border-radius: 12px;
  overflow: hidden;
}

.search-box input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.search-box input {
  width: 240px;
  padding: 10px 14px;
}

.search-box button,
.mobile-search button,
.hero-button,
.load-more,
.play-overlay button,
.filter-bar button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--stellar-glow), var(--stellar-hot));
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-box button {
  padding: 10px 16px;
}

.search-box button:hover,
.mobile-search button:hover,
.hero-button:hover,
.load-more:hover,
.play-overlay button:hover,
.filter-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(74, 144, 226, 0.36);
}

.menu-toggle {
  display: none;
  color: #fff;
  border: 0;
  background: var(--stellar-mid);
  border-radius: 10px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  padding: 0 24px 20px;
  background: rgba(10, 14, 39, 0.98);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mobile-search {
  margin-top: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

.mobile-search button {
  padding: 11px 16px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 39, 0.96) 0%, rgba(10, 14, 39, 0.64) 44%, rgba(10, 14, 39, 0.18) 100%), linear-gradient(0deg, var(--stellar-dark), transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 92px 24px 86px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 48px;
}

.hero-eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 12px;
  color: var(--stellar-hot);
  background: rgba(74, 144, 226, 0.18);
  border: 1px solid rgba(74, 144, 226, 0.36);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.page-title h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p,
.page-title p {
  max-width: 760px;
  color: #dbe7ff;
  line-height: 1.8;
  font-size: 17px;
}

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

.hero-button {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 13px 22px;
}

.hero-ghost {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  position: relative;
  z-index: 3;
  padding: 20px;
  border-radius: 22px;
  background: rgba(20, 27, 61, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
}

.hero-card strong {
  display: block;
  margin-top: 14px;
  font-size: 20px;
}

.hero-card span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--stellar-glow);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 64px;
}

.content-section {
  margin-top: 52px;
}

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

.section-heading h2,
.page-title h1,
.list-header h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading p,
.list-header p {
  color: var(--text-muted);
  margin: 6px 0 0;
}

.section-more {
  color: var(--stellar-hot);
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(42, 56, 87, 0.72), rgba(20, 27, 61, 0.86));
  border-radius: 18px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 144, 226, 0.55);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--stellar-mid);
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
  opacity: 0.9;
}

.play-mark,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-mark {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a00, #ff2f6d);
  color: #fff;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-title:hover {
  color: var(--stellar-hot);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.card-body p {
  height: 44px;
  overflow: hidden;
  margin: 0 0 10px;
  color: #c9d4ed;
  font-size: 13px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  color: #dceaff;
  background: rgba(74, 144, 226, 0.16);
  border: 1px solid rgba(74, 144, 226, 0.24);
  border-radius: 999px;
  font-size: 12px;
}

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

.category-card {
  padding: 22px;
  min-height: 170px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(74, 144, 226, 0.22), rgba(30, 40, 71, 0.92));
  border: 1px solid var(--card-border);
}

.category-card strong {
  display: block;
  font-size: 21px;
  margin-bottom: 10px;
}

.category-card p {
  color: #c9d4ed;
  line-height: 1.7;
  margin: 0 0 16px;
}

.category-card span {
  color: var(--stellar-hot);
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px 120px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  background: rgba(30, 40, 71, 0.84);
  margin: 22px 0 28px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  background: rgba(10, 14, 39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-bar button {
  border-radius: 12px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.load-more {
  padding: 13px 22px;
  border-radius: 999px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24));
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-overlay button {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  font-size: 30px;
}

.detail-panel,
.sidebar-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: rgba(20, 27, 61, 0.78);
}

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: -0.05em;
}

.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
}

.breadcrumb {
  margin-bottom: 18px;
  font-size: 14px;
}

.detail-panel p {
  color: #d7e0f5;
  line-height: 1.9;
  font-size: 16px;
}

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

.sidebar-cover {
  overflow: hidden;
  border-radius: 18px;
  background: var(--stellar-mid);
}

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

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

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.mini-card img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.mini-card strong,
.mini-card em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-card em {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: normal;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}

.pagination a,
.pagination span {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(30, 40, 71, 0.9);
  border: 1px solid var(--card-border);
}

.pagination .current {
  background: var(--stellar-glow);
  color: #fff;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #080b20;
  padding: 44px 24px 20px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 32px;
}

.site-footer p,
.footer-links a {
  color: var(--text-muted);
}

.footer-links.compact {
  gap: 10px 16px;
}

.copyright {
  max-width: 1280px;
  margin: 26px auto 0;
  color: #7885a8;
  font-size: 13px;
}

.empty-state {
  padding: 42px;
  border-radius: 22px;
  background: rgba(30, 40, 71, 0.8);
  color: var(--text-muted);
  text-align: center;
}

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-card {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner,
  main,
  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

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

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

  .section-heading,
  .page-title,
  .list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-body {
    padding: 12px;
  }

  .detail-panel,
  .sidebar-card {
    padding: 18px;
  }
}
