:root {
  --night-950: #0a1929;
  --night-900: #102a43;
  --night-850: #123453;
  --night-800: #1b3a57;
  --night-700: #274c70;
  --night-400: #829ab1;
  --night-300: #9fb3c8;
  --night-200: #d9e2ec;
  --ocean-700: #0f79cc;
  --ocean-600: #1a92e6;
  --ocean-500: #2eabff;
  --ocean-400: #53bbff;
  --ocean-300: #78caff;
  --moon-600: #7c3aed;
  --moon-500: #a855f7;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 24px;
  --radius-lg: 18px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--night-200);
  background: linear-gradient(180deg, var(--night-950) 0%, var(--night-900) 48%, var(--night-950) 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(16, 42, 67, 0.9), rgba(16, 42, 67, 0));
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled,
.site-header.menu-open {
  background: rgba(16, 42, 67, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-400), var(--ocean-700));
  box-shadow: 0 12px 32px rgba(46, 171, 255, 0.25);
}

.brand-text strong,
.footer-brand strong {
  display: block;
  color: var(--white);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  color: var(--night-300);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link,
.mobile-link {
  color: var(--night-200);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--ocean-300);
}

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

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
  border: 1px solid rgba(120, 202, 255, 0.14);
  outline: none;
  color: var(--white);
  background: rgba(10, 25, 41, 0.62);
  border-radius: 999px;
  padding: 10px 14px;
}

.header-search input {
  width: 220px;
}

.header-search button,
.mobile-search button,
.primary-btn,
.player-cover,
.hero-btn,
.section-more,
.search-panel button {
  border: 0;
  cursor: pointer;
  color: var(--white);
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--ocean-600), var(--ocean-700));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.player-cover:hover,
.hero-btn:hover,
.section-more:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(27, 58, 87, 0.7);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(120, 202, 255, 0.14);
  border-radius: 18px;
  background: rgba(16, 42, 67, 0.98);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 0 56px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
}

.hero-track {
  display: flex;
  transition: transform 0.55s ease;
}

.hero-slide {
  min-width: 100%;
  background-size: cover;
  background-position: center;
}

.hero-card {
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.1fr 0.75fr;
  align-items: center;
  gap: 42px;
  padding: 48px;
  border: 1px solid rgba(120, 202, 255, 0.15);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(16, 42, 67, 0.8), rgba(10, 25, 41, 0.6));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  color: var(--ocean-300);
  font-weight: 700;
  border: 1px solid rgba(120, 202, 255, 0.24);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(6, 71, 153, 0.25);
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 16px;
  color: var(--white);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  margin: 0;
  max-width: 720px;
  color: var(--night-200);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.meta-pills span,
.card-tags span,
.detail-tags span,
.type-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--ocean-300);
  background: rgba(6, 71, 153, 0.28);
  border: 1px solid rgba(120, 202, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

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

.secondary-btn {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(120, 202, 255, 0.22);
  padding: 10px 18px;
  background: rgba(27, 58, 87, 0.58);
}

.hero-poster {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  transform: perspective(1000px) rotateY(-5deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 25, 41, 0.85));
}

.slider-btn {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  cursor: pointer;
  background: rgba(16, 42, 67, 0.85);
  transform: translateY(-50%);
  z-index: 2;
}

.slider-btn.prev {
  left: 22px;
}

.slider-btn.next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: var(--ocean-400);
}

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

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-more {
  padding: 9px 15px;
  font-size: 14px;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(27, 58, 87, 0.45);
  border: 1px solid rgba(159, 179, 200, 0.1);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  background: rgba(27, 58, 87, 0.68);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.3);
}

.poster,
.poster-wide {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(10, 25, 41, 0.7);
}

.poster {
  aspect-ratio: 3 / 4;
}

.poster-wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(10, 25, 41, 0.78));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(26, 146, 230, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--white);
  background: rgba(16, 42, 67, 0.82);
}

.card-body {
  display: block;
  padding: 14px;
}

.card-body strong,
.list-body strong,
.rank-info strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--white);
  font-size: 16px;
  line-height: 1.35;
}

.meta-line,
.rank-info span {
  display: block;
  margin-top: 7px;
  color: var(--night-400);
  font-size: 12px;
}

.list-grid {
  display: grid;
  gap: 18px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  padding: 12px;
}

.list-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.list-body em,
.rank-info em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--night-300);
  font-style: normal;
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 28px;
  border: 1px solid rgba(120, 202, 255, 0.15);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top right, rgba(46, 171, 255, 0.22), transparent 38%), rgba(27, 58, 87, 0.42);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(120, 202, 255, 0.42);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 28px;
}

.category-card p {
  margin: 0 0 22px;
  color: var(--night-300);
  line-height: 1.75;
}

.category-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.category-thumbs img {
  width: 68px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-hero {
  padding: 128px 0 46px;
  background: radial-gradient(circle at 18% 24%, rgba(46, 171, 255, 0.22), transparent 34%), radial-gradient(circle at 82% 20%, rgba(124, 58, 237, 0.2), transparent 28%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--night-300);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--ocean-300);
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.45fr));
  gap: 12px;
  margin: 24px 0 34px;
  padding: 18px;
  border: 1px solid rgba(120, 202, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(16, 42, 67, 0.66);
}

.search-panel input,
.search-panel select {
  width: 100%;
  border-radius: 14px;
}

.filter-status {
  min-height: 24px;
  color: var(--night-300);
  margin-bottom: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 74px 1fr 64px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.rank-row img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-num {
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.rank-score {
  color: var(--ocean-300);
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.rank-list.compact .rank-row:nth-child(n+7) {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 360px;
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(120, 202, 255, 0.14);
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(10, 25, 41, 0.18), rgba(10, 25, 41, 0.76));
  font-size: 20px;
}

.player-cover.hidden {
  display: none;
}

.detail-card,
.detail-side,
.review-card {
  border: 1px solid rgba(120, 202, 255, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(27, 58, 87, 0.34);
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 18px;
}

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

.detail-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}

.detail-meta span {
  color: var(--night-300);
}

.text-block h2,
.review-card h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 24px;
}

.text-block p,
.review-card p,
.detail-side p {
  color: var(--night-200);
  line-height: 1.88;
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(159, 179, 200, 0.11);
  background: rgba(10, 25, 41, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 42px 0;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--night-300);
  line-height: 1.7;
}

.site-footer a:hover {
  color: var(--ocean-300);
}

.footer-bottom {
  padding: 18px;
  color: var(--night-400);
  text-align: center;
  border-top: 1px solid rgba(159, 179, 200, 0.08);
}

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

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

  .detail-side {
    max-width: 460px;
  }
}

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

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

  .mobile-nav.open {
    display: grid;
    gap: 14px;
  }

  .mobile-search {
    align-items: stretch;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px;
  }

  .hero-poster {
    max-width: 280px;
  }

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

  .category-grid,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .movie-card-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .nav-inner {
    height: 66px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

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

  .page-hero {
    padding-top: 98px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p {
    font-size: 15px;
  }

  .slider-btn {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .rank-score {
    display: none;
  }

  .detail-card,
  .detail-side,
  .review-card {
    padding: 18px;
  }
}
