:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-solid: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --orange: #fb923c;
  --radius: 22px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(8, 47, 73, 0.96), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.25);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--cyan);
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan);
}

.header-search,
.mobile-panel form,
.search-page-form,
.inline-filter,
.library-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-panel input,
.search-page-form input,
.inline-filter input,
.library-tools input,
.library-tools select {
  min-width: 0;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-panel input:focus,
.search-page-form input:focus,
.inline-filter input:focus,
.library-tools input:focus,
.library-tools select:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-panel button,
.search-page-form button {
  color: white;
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 12px 26px rgba(34, 211, 238, 0.16);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 999px;
}

.mobile-panel {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel-inner {
  display: grid;
  gap: 14px;
  padding: 18px 0 22px;
}

.hero-slider {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(620px, 78vh, 820px);
  border-bottom: 1px solid var(--line);
}

.hero-glow {
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  filter: blur(26px);
  border-radius: 999px;
  opacity: 0.26;
}

.hero-glow-one {
  top: 8%;
  left: 6%;
  background: var(--cyan);
}

.hero-glow-two {
  right: 8%;
  bottom: 8%;
  background: var(--blue);
}

.hero-slides {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: clamp(620px, 78vh, 820px);
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: clamp(30px, 7vw, 90px);
  align-items: center;
  padding: 74px 0 92px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0 -12vw;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 52%, rgba(2, 6, 23, 0.2) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.05);
  opacity: 0.48;
}

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

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.category-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-copy p,
.page-hero p,
.category-hero p,
.detail-copy p {
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  color: #e0f2fe;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 16px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.18);
}

.button-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.62));
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--cyan);
}

.section-block {
  margin-top: 72px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.035em;
}

.section-heading a {
  color: var(--cyan);
  font-weight: 800;
}

.compact-heading {
  align-items: start;
  margin-bottom: 18px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.88)),
    var(--tile-image) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.category-tile span,
.overview-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong,
.overview-card em {
  color: #cbd5e1;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(15, 23, 42, 0.92);
  transform: translateY(-5px);
}

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.18), transparent 42%),
    linear-gradient(135deg, #111827, #020617);
}

.poster-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.72));
}

.poster-year,
.poster-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.poster-year {
  top: 12px;
  right: 12px;
  min-width: 54px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  color: var(--cyan);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-card-body strong {
  overflow: hidden;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-body em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-line {
  color: #cbd5e1;
  font-size: 14px;
  min-height: 44px;
}

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

.tag-row span {
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: rgba(34, 211, 238, 0.08);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.is-compact .movie-card-line {
  display: none;
}

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

.rank-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.rank-panel.wide {
  min-width: 0;
}

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

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

.rank-item:hover {
  background: rgba(34, 211, 238, 0.1);
  transform: translateX(4px);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
  font-size: 18px;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-soft);
}

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

.rank-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-item b {
  color: #fed7aa;
  font-size: 13px;
}

.page-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 24%, rgba(34, 211, 238, 0.2), transparent 25rem),
    linear-gradient(135deg, rgba(8, 47, 73, 0.65), rgba(2, 6, 23, 0.96));
}

.page-hero p,
.category-hero p {
  max-width: 760px;
  color: #dbeafe;
}

.category-hero {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72)),
    var(--category-image) center / cover no-repeat;
}

.category-hero-inner {
  display: grid;
  gap: 14px;
}

.inline-filter {
  max-width: 460px;
  margin-top: 16px;
}

.inline-filter input {
  width: 100%;
}

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

.overview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.overview-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-4px);
}

.overview-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-soft);
}

.overview-card span {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.library-tools {
  position: sticky;
  top: 82px;
  z-index: 8;
  flex-wrap: wrap;
  padding: 14px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.library-tools input {
  flex: 1 1 300px;
}

.library-tools select {
  flex: 0 0 170px;
}

.search-page-form {
  max-width: 760px;
  margin-bottom: 22px;
}

.search-page-form input {
  flex: 1 1 auto;
}

.search-status {
  min-height: 28px;
  color: var(--muted);
  margin-bottom: 18px;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 55%, rgba(2, 6, 23, 0.4) 100%),
    var(--detail-image) center / cover no-repeat;
  filter: saturate(1.05);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

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

.detail-copy {
  max-width: 780px;
}

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

.detail-primary,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: black;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-card.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #06121d;
  font-size: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), #ffffff);
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.38);
}

.player-overlay strong {
  font-size: 18px;
}

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  color: #cbd5e1;
}

.lead-text {
  color: var(--cyan) !important;
  font-weight: 700;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.info-list div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.info-list dt {
  color: var(--muted);
  font-size: 12px;
}

.info-list dd {
  margin: 4px 0 0;
  color: white;
  font-weight: 700;
}

.side-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 16px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-brand {
  margin-bottom: 14px;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

  .feature-layout,
  .detail-main,
  .rank-columns {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

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

  .hero-slider,
  .hero-slides {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
    grid-template-columns: 1fr;
    padding: 56px 0 88px;
  }

  .hero-slide.is-active {
    display: grid;
  }

  .hero-poster {
    width: min(320px, 86vw);
    margin: 0 auto;
    transform: none;
  }

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

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

  .detail-poster {
    width: min(280px, 76vw);
  }

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

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand-copy small {
    display: none;
  }

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

  .hero-copy p,
  .page-hero p,
  .category-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .category-tile-grid,
  .movie-grid,
  .compact-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

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

  .library-tools select {
    flex: 1 1 100%;
  }

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

  .rank-item b {
    display: none;
  }
}
