:root {
  color-scheme: dark;
  --bg: #0a0e1a;
  --bg-soft: #131827;
  --panel: rgba(15, 23, 42, 0.68);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(12, 74, 110, 0.48);
  --primary: #0ea5e9;
  --primary-soft: #38bdf8;
  --primary-dark: #0284c7;
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --shadow: 0 24px 80px rgba(2, 132, 199, 0.20);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1280px, calc(100% - 2rem));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.18);
  color: var(--primary-soft);
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.32);
}

.brand-title {
  display: block;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted);
}

.brand.compact .brand-title {
  font-size: 1.14rem;
}

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

.nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-soft);
}

.search-form,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.52);
  border-radius: 999px;
  overflow: hidden;
}

.search-form input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 14px 10px 18px;
}

.search-form input::placeholder,
.mobile-search input::placeholder {
  color: #64748b;
}

.search-form button,
.mobile-search button {
  border: 0;
  color: #fff;
  background: var(--primary-dark);
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-form button:hover,
.mobile-search button:hover {
  background: #0369a1;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: white;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--muted-strong);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 16px 0 20px;
  border-top: 1px solid rgba(12, 74, 110, 0.34);
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  color: var(--muted-strong);
  border-radius: 12px;
}

.mobile-panel a:hover {
  background: rgba(15, 23, 42, 0.72);
  color: var(--primary-soft);
}

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

.mobile-search input {
  width: 100%;
}

.page-main {
  min-height: 100vh;
  padding-top: 96px;
}

.container {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

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

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0a0e1a 0%, rgba(10, 14, 26, 0.78) 40%, rgba(10, 14, 26, 0.32) 100%),
    linear-gradient(to right, rgba(10, 14, 26, 0.88), transparent 62%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  padding: 0 0 84px;
}

.hero-copy {
  width: min(820px, 92%);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 7vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span {
  color: var(--muted-strong);
}

.hero-meta .pill {
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.88);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 12px 40px rgba(2, 132, 199, 0.25);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-link {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: var(--shadow);
}

.secondary-link {
  background: rgba(15, 23, 42, 0.68);
  color: var(--muted-strong);
  border: 1px solid var(--border);
}

.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-2px);
}

.primary-link:hover {
  background: #0369a1;
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 14, 26, 0.52);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(10, 14, 26, 0.78);
  transform: translateY(-2px);
}

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

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.content-wrap {
  padding: 54px 0 34px;
}

.content-section {
  margin-bottom: 64px;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--primary-soft);
  background: rgba(14, 165, 233, 0.14);
}

.lead {
  max-width: 840px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
  margin: -10px 0 34px;
}

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

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

.movie-card {
  position: relative;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.30);
  border: 1px solid rgba(12, 74, 110, 0.32);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(2, 132, 199, 0.62);
  background: rgba(15, 23, 42, 0.56);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 132, 199, 0.22));
}

.poster-link img,
.featured-poster img,
.category-tile img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.featured-card:hover .featured-poster img,
.category-tile:hover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 750;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.75em;
  overflow: hidden;
  color: #fff;
  font-weight: 760;
  line-height: 1.38;
}

.movie-title:hover,
.featured-card h3 a:hover {
  color: var(--primary-soft);
}

.movie-meta,
.featured-meta {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 4.4em;
  margin: 0;
  color: #64748b;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.55;
}

.featured-stack {
  display: grid;
  gap: 24px;
}

.featured-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 22px;
  border: 1px solid rgba(12, 74, 110, 0.38);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.34);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 132, 199, 0.64);
}

.featured-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 132, 199, 0.22));
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-soft);
  font-weight: 750;
}

.featured-card h3 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
}

.featured-card p {
  color: var(--muted-strong);
  line-height: 1.78;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 8px 0 20px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(12, 74, 110, 0.38);
  font-size: 0.86rem;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(12, 74, 110, 0.38);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.52);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 26, 0.94), rgba(10, 14, 26, 0.22));
}

.category-name,
.category-intro {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
}

.category-name {
  bottom: 64px;
  font-size: 1.35rem;
  font-weight: 820;
}

.category-intro {
  bottom: 20px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.45;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 34px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 26px;
  color: var(--muted-strong);
}

.back-link:hover {
  color: var(--primary-soft);
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(12, 74, 110, 0.38);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.16)),
    rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

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

.player-button {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.94);
  box-shadow: 0 20px 60px rgba(2, 132, 199, 0.34);
  font-size: 2.2rem;
}

.detail-panel,
.side-panel,
.text-panel {
  border: 1px solid rgba(12, 74, 110, 0.38);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.34);
}

.detail-panel {
  padding: 28px;
  margin-top: 24px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--muted-strong);
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(12, 74, 110, 0.36);
}

.detail-panel h2,
.side-panel h2,
.text-panel h1,
.text-panel h2 {
  margin: 0 0 16px;
}

.detail-panel p,
.text-panel p {
  color: var(--muted-strong);
  line-height: 1.92;
}

.review {
  padding: 18px 20px;
  margin: 22px 0 0;
  border-left: 4px solid var(--primary-dark);
  background: rgba(2, 132, 199, 0.09);
  border-radius: 16px;
  color: var(--muted-strong);
  line-height: 1.84;
}

.side-panel {
  padding: 22px;
  position: sticky;
  top: 102px;
}

.related-list {
  display: grid;
  gap: 16px;
}

.related-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: rgba(15, 23, 42, 0.72);
}

.related-item img {
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(12, 74, 110, 0.34);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.32);
}

.rank-index {
  color: var(--primary-soft);
  font-size: 1.35rem;
  font-weight: 840;
  text-align: center;
}

.rank-item img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: #fbbf24;
  font-weight: 820;
}

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

.empty-state {
  padding: 54px;
  text-align: center;
  border: 1px solid rgba(12, 74, 110, 0.38);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.34);
  color: var(--muted-strong);
}

.text-panel {
  padding: 32px;
  margin-bottom: 28px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(12, 74, 110, 0.38);
  background: rgba(19, 24, 39, 0.68);
}

.footer-inner {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--primary-soft);
}

.footer-bottom {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: #64748b;
  border-top: 1px solid rgba(12, 74, 110, 0.28);
}

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

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

@media (max-width: 900px) {
  .site-header-inner {
    height: 66px;
  }

  .main-nav,
  .search-form {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .page-main {
    padding-top: 84px;
  }

  .hero {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 70px;
  }

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

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

  .featured-poster {
    max-width: 220px;
  }

  .side-panel {
    position: static;
  }

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

  .rank-item {
    grid-template-columns: 48px 66px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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

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

  .brand-title {
    font-size: 1.08rem;
  }

  .hero {
    min-height: 500px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.45rem;
  }

  .hero-control {
    display: none;
  }

  .content-wrap {
    padding-top: 38px;
  }

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

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

  .movie-desc {
    display: none;
  }

  .featured-card,
  .detail-panel,
  .side-panel,
  .text-panel {
    border-radius: 20px;
    padding: 18px;
  }

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

  .rank-item {
    grid-template-columns: 44px 58px minmax(0, 1fr);
    gap: 12px;
  }
}
