:root {
  --bg: #080d19;
  --bg-soft: #101827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #a8b3c7;
  --blue: #60a5fa;
  --purple: #c084fc;
  --pink: #f472b6;
  --shadow: 0 28px 80px rgba(2, 8, 23, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(96, 165, 250, 0.25), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(192, 132, 252, 0.22), transparent 36rem),
    linear-gradient(180deg, #0f172a 0%, #080d19 48%, #050816 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.8), transparent 72%);
  z-index: -1;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(18px);
  background: rgba(8, 13, 25, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 14px 36px rgba(96, 165, 250, 0.35);
}

.brand-text {
  font-size: 1.12rem;
}

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

.nav-link,
.mobile-link {
  color: var(--muted);
  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: #ffffff;
  background: rgba(96, 165, 250, 0.15);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
}

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

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

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

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  margin: 28px 0 34px;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: var(--shadow);
  background: var(--panel-solid);
}

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 22, 0.96) 0%, rgba(8, 13, 25, 0.74) 44%, rgba(8, 13, 25, 0.12) 100%),
    linear-gradient(180deg, rgba(8, 13, 25, 0.18), rgba(8, 13, 25, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 92px 64px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dbeafe;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  max-width: 760px;
}

.hero-content p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #d6deee;
  line-height: 1.78;
  font-size: 1.08rem;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #9333ea);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.35);
}

.primary-btn.small {
  min-height: 40px;
  padding: 0 18px;
}

.ghost-btn,
.section-more {
  color: #e2e8f0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.32);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255,255,255,0.11);
}

.hero-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
}

.hero-dots {
  display: flex;
  gap: 7px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 99px;
  opacity: 0.55;
}

.hero-dot.active {
  width: 26px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  opacity: 1;
}

.intro-band,
.page-hero,
.search-panel,
.content-section,
.detail-layout,
.detail-hero {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.24);
  backdrop-filter: blur(16px);
}

.intro-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  margin-bottom: 22px;
}

.intro-band h2,
.section-heading h2,
.detail-article h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.intro-band p,
.section-heading p,
.page-hero p,
.detail-article p,
.side-card a,
.movie-card-body p,
.ranking-card p,
.category-card-body p {
  color: var(--muted);
  line-height: 1.72;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  margin: 24px 0;
}

.search-box {
  position: relative;
  flex: 1 1 360px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.movie-search {
  width: 100%;
  min-height: 46px;
  padding: 0 16px 0 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  outline: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.55);
}

.movie-search:focus {
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: #dbeafe;
  background: rgba(255,255,255,0.07);
}

.filter-pill.active,
.filter-pill:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.75), rgba(147, 51, 234, 0.75));
}

.content-section {
  padding: 28px;
  border-radius: 28px;
  margin: 24px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading.compact {
  align-items: flex-start;
}

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

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

.movie-card[hidden],
.ranking-card[hidden] {
  display: none;
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  background: rgba(255,255,255,0.06);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.52);
  box-shadow: 0 24px 60px rgba(2, 8, 23, 0.34);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

.movie-card-link:hover .poster-wrap img {
  transform: scale(1.07);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.movie-card-body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.movie-card-body p {
  margin: 0;
  font-size: 0.9rem;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bfdbfe;
  font-size: 0.78rem;
}

.tag-row {
  margin-top: auto;
}

.tag-row.large {
  margin-top: 16px;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 16px;
}

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

.category-tile,
.category-card-large a {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.16), rgba(192, 132, 252, 0.1));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile {
  padding: 22px;
  min-height: 128px;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 132, 252, 0.5);
}

.category-tile span,
.category-card-body h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 800;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

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

.category-poster-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-poster-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 20px;
}

.category-card-body span {
  display: inline-flex;
  margin-top: 8px;
  color: #dbeafe;
  font-weight: 700;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 24px;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 20px;
  background: rgba(2, 6, 23, 0.34);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(96, 165, 250, 0.14);
}

.rank-number,
.ranking-index {
  color: #dbeafe;
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  display: grid;
  gap: 4px;
}

.rank-text em {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 270px;
  padding: 44px;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.36), rgba(147, 51, 234, 0.24)),
    rgba(15, 23, 42, 0.72);
}

.page-hero.slim {
  min-height: 220px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.page-hero p {
  max-width: 680px;
  font-size: 1.05rem;
}

.category-hero {
  min-height: 240px;
}

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

.ranking-card a {
  display: grid;
  grid-template-columns: 72px 92px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  background: rgba(255,255,255,0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-card a:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.5);
}

.ranking-card img {
  width: 92px;
  height: 126px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-card h2,
.ranking-card p {
  margin: 0 0 8px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 18px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 24px;
  padding: 24px;
  border-radius: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #020617;
  border: 1px solid rgba(255,255,255,0.12);
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.18), rgba(2, 6, 23, 0.48));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #9333ea);
  box-shadow: 0 20px 60px rgba(96, 165, 250, 0.38);
  font-size: 2rem;
}

.detail-info {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: start;
}

.detail-poster {
  width: 132px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
}

.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.one-line {
  color: #dbeafe;
  line-height: 1.7;
}

.detail-meta {
  margin-top: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  margin: 24px 0;
}

.detail-article h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.detail-article h2 + p {
  margin-top: 0;
}

.detail-article p {
  font-size: 1.02rem;
}

.side-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(255,255,255,0.12);
}

.side-card a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
}

.side-card a:hover {
  color: #ffffff;
  background: rgba(96, 165, 250, 0.15);
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.42);
}

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

.footer-inner strong {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .two-column,
  .detail-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }
  .ranking-panel {
    position: static;
  }
}

@media (max-width: 840px) {
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .hero-carousel {
    min-height: 620px;
    border-radius: 26px;
  }
  .hero-content {
    padding: 74px 28px;
  }
  .search-panel,
  .intro-band,
  .section-heading,
  .footer-inner,
  .page-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ranking-card a {
    grid-template-columns: 52px 82px 1fr;
  }
}

@media (max-width: 620px) {
  main,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }
  .hero-carousel {
    min-height: 580px;
    margin-top: 18px;
  }
  .hero-content {
    padding: 58px 20px 92px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-controls {
    bottom: 18px;
  }
  .content-section,
  .intro-band,
  .search-panel,
  .detail-layout,
  .detail-hero {
    padding: 18px;
    border-radius: 22px;
  }
  .page-hero {
    padding: 28px;
    border-radius: 24px;
  }
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .movie-card-body {
    padding: 12px;
  }
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
  .category-poster-strip {
    height: 120px;
  }
  .detail-info {
    grid-template-columns: 92px 1fr;
  }
  .detail-poster {
    width: 92px;
    border-radius: 16px;
  }
  .ranking-card a {
    grid-template-columns: 1fr;
  }
  .ranking-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
