:root {
  --night-950: #07111f;
  --night-900: #0a1929;
  --night-800: #10243a;
  --night-700: #1b334d;
  --night-500: #6b829d;
  --night-300: #b7c6d8;
  --ocean-600: #0ea5e9;
  --ocean-500: #38bdf8;
  --ocean-400: #7dd3fc;
  --moon-600: #a855f7;
  --gold: #f7c948;
  --white: #ffffff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.20), transparent 34rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 30rem),
    var(--night-900);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.92), rgba(7, 17, 31, 0.35), transparent);
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 17, 31, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ocean-500), var(--moon-600));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
  font-size: 18px;
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

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

.nav-link,
.mobile-link {
  color: var(--night-300);
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(56, 189, 248, 0.14);
}

.header-search {
  width: 320px;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 16px;
  background: rgba(16, 36, 58, 0.72);
  backdrop-filter: blur(14px);
}

.header-search input,
.filter-search input {
  flex: 1;
  width: 100%;
  border: 0;
  color: var(--white);
  background: transparent;
  outline: none;
}

.header-search input::placeholder,
.filter-search input::placeholder {
  color: rgba(183, 198, 216, 0.7);
}

.header-search button,
.filter-search button,
.primary-btn,
.secondary-btn,
.filter-chip {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.filter-search button,
.primary-btn {
  padding: 10px 18px;
  color: var(--white);
  font-weight: 800;
  background: linear-gradient(135deg, var(--ocean-600), var(--moon-600));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.28);
}

.header-search button:hover,
.filter-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(16, 36, 58, 0.88);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-panel {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 20px;
  background: rgba(7, 17, 31, 0.96);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: var(--night-950);
}

.hero-carousel {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.04);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.72) 45%, rgba(7, 17, 31, 0.18)),
    linear-gradient(0deg, var(--night-900), rgba(7, 17, 31, 0.12) 46%, rgba(7, 17, 31, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  min-height: 92vh;
  margin: 0 auto;
  padding: 150px 0 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  color: var(--ocean-400);
  background: rgba(14, 165, 233, 0.10);
  font-weight: 800;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-title h1 {
  margin: 20px 0 16px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero p {
  max-width: 680px;
  color: var(--night-300);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #d8eefc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.16);
  font-size: 12px;
  font-weight: 750;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.secondary-btn {
  padding: 10px 18px;
  color: var(--white);
  font-weight: 800;
  border: 1px solid rgba(183, 198, 216, 0.22);
  background: rgba(16, 36, 58, 0.72);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 42px;
  width: min(var(--max), calc(100% - 32px));
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 44px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: var(--ocean-500);
}

.main-content,
.page-hero,
.detail-layout,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.main-content {
  padding: 72px 0;
}

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

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-card p,
.detail-section p,
.review-box p {
  color: var(--night-300);
  line-height: 1.8;
}

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

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

.poster-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 24px;
  background: rgba(16, 36, 58, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.poster-link:hover {
  transform: translateY(-6px);
  border-color: rgba(125, 211, 252, 0.42);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.36);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(168, 85, 247, 0.24));
}

.poster-frame img,
.detail-poster img,
.mini-card img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link:hover img,
.mini-card:hover img {
  transform: scale(1.05);
}

.poster-frame img,
.mini-card img {
  transition: transform 0.3s ease;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.9), transparent);
}

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-weight: 850;
}

.play-pill {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.36);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff7a18, #f7c948);
  box-shadow: 0 8px 24px rgba(247, 201, 72, 0.28);
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  color: var(--white);
  font-size: 18px;
  line-height: 1.35;
}

.movie-meta,
.movie-desc,
.mini-card em {
  color: var(--night-300);
}

.movie-meta {
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.6;
}

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(168, 85, 247, 0.10)),
    rgba(16, 36, 58, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.40);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card span {
  color: var(--ocean-400);
  font-weight: 800;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 20px;
  background: rgba(16, 36, 58, 0.72);
}

.mini-card img {
  height: 94px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  margin-bottom: 8px;
  font-size: 16px;
}

.mini-card em {
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 130px 0 44px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 24px;
  background: rgba(16, 36, 58, 0.68);
}

.filter-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.52);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  padding: 9px 14px;
  color: var(--night-300);
  background: rgba(7, 17, 31, 0.52);
  border: 1px solid rgba(125, 211, 252, 0.14);
}

.filter-chip.is-active {
  color: var(--white);
  background: rgba(14, 165, 233, 0.28);
}

.empty-state {
  display: none;
  padding: 26px;
  border: 1px dashed rgba(125, 211, 252, 0.32);
  border-radius: 24px;
  color: var(--night-300);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-layout {
  padding: 118px 0 72px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 46px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(16, 36, 58, 0.72);
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.38);
}

.detail-title h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.detail-title p {
  max-width: 780px;
  color: var(--night-300);
  font-size: 18px;
  line-height: 1.85;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin: 34px 0 44px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 30px;
  background: #000;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.46);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(7, 17, 31, 0.74), rgba(14, 165, 233, 0.22));
}

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

.big-play {
  width: 96px;
  height: 96px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  font-size: 36px;
  background: linear-gradient(135deg, var(--ocean-600), var(--moon-600));
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.36);
}

.big-play:hover {
  transform: scale(1.06);
}

.player-message {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 18px;
  color: var(--night-300);
  text-align: center;
}

.detail-section {
  margin-bottom: 42px;
  padding: 26px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 26px;
  background: rgba(16, 36, 58, 0.66);
}

.detail-section h2 {
  margin-bottom: 14px;
}

.review-box {
  border-left: 4px solid var(--ocean-500);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 78px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 22px;
  background: rgba(16, 36, 58, 0.70);
}

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

.rank-row img {
  height: 104px;
  border-radius: 16px;
}

.rank-row strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.rank-row p {
  margin: 0;
  color: var(--night-300);
  line-height: 1.65;
}

.site-footer {
  padding: 46px 0 30px;
  border-top: 1px solid rgba(125, 211, 252, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 34px;
}

.site-footer h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: var(--night-300);
  line-height: 1.8;
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(125, 211, 252, 0.10);
  font-size: 13px;
}

[data-hidden="true"] {
  display: none !important;
}

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

  .header-search {
    width: 260px;
  }
}

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

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

  .hero-content {
    padding-top: 128px;
  }

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

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

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

  .rank-row {
    grid-template-columns: 48px 68px 1fr;
  }

  .rank-row .secondary-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 68px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero {
    min-height: 88vh;
  }

  .hero-content {
    min-height: 88vh;
    padding: 110px 0 96px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.04em;
  }

  .movie-grid,
  .category-grid,
  .mini-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .filter-search {
    display: grid;
  }

  .rank-row {
    grid-template-columns: 44px 64px 1fr;
    gap: 10px;
  }

  .rank-row p {
    display: none;
  }
}
