:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, .78);
  --panel-strong: rgba(15, 23, 42, .94);
  --line: rgba(148, 163, 184, .18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --orange: #fb923c;
  --shadow: 0 24px 70px rgba(2, 6, 23, .55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, .16), transparent 34rem),
    radial-gradient(circle at 88% 10%, rgba(59, 130, 246, .2), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .94));
  border-bottom: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 18px 46px rgba(2, 6, 23, .3);
  backdrop-filter: blur(18px);
}

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

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 34px rgba(34, 211, 238, .24);
  color: #fff;
}

.brand-text strong {
  display: block;
  font-size: 22px;
  letter-spacing: -.03em;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
}

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

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-weight: 650;
  transition: color .2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, .12);
  color: #fff;
  cursor: pointer;
}

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

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

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fff;
  background: rgba(148, 163, 184, .12);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--bg-soft);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .8s ease, transform 1.2s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 720px;
  position: relative;
  z-index: 2;
  padding: 90px 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(34, 211, 238, .18);
  border: 1px solid rgba(34, 211, 238, .34);
  font-weight: 800;
  letter-spacing: .03em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.06em;
  text-shadow: 0 18px 60px rgba(2, 6, 23, .6);
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 700px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(14, 116, 144, .24);
  border: 1px solid rgba(34, 211, 238, .22);
  font-size: 12px;
  font-weight: 700;
}

.hero-meta,
.detail-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
  color: #e2e8f0;
}

.hero-meta span,
.detail-meta-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid var(--line);
}

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

.btn-primary,
.btn-secondary,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary {
  min-height: 52px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, .22);
}

.btn-secondary {
  min-height: 52px;
  padding: 0 22px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, .74);
  border: 1px solid var(--line);
}

.btn-primary:hover,
.btn-secondary:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .52);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--cyan);
}

.home-search-wrap {
  position: relative;
  z-index: 8;
  margin-top: -42px;
}

.search-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  height: 54px;
  padding: 0 18px;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, .58);
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, .66);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .08);
}

.search-box button {
  min-width: 110px;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-row button {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  padding: 8px 14px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, .72);
  cursor: pointer;
}

.filter-row button.is-active,
.filter-row button:hover {
  color: #fff;
  background: rgba(34, 211, 238, .18);
  border-color: rgba(34, 211, 238, .4);
}

.section-block {
  padding: 72px 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(15, 23, 42, .28), rgba(2, 6, 23, .12));
}

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

.section-heading span {
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -.04em;
}

.section-heading a {
  color: #a5f3fc;
  font-weight: 800;
}

.compact-heading {
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.slim-grid {
  gap: 16px;
}

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 20px;
  background: rgba(15, 23, 42, .58);
  box-shadow: 0 16px 40px rgba(2, 6, 23, .22);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, .38);
  background: rgba(15, 23, 42, .84);
  box-shadow: 0 26px 64px rgba(34, 211, 238, .12);
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4.2;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, .35), transparent 44%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.movie-card-large .poster-frame {
  aspect-ratio: 16 / 9;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .2s ease;
}

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(2, 6, 23, .76) 100%);
  pointer-events: none;
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: rgba(2, 6, 23, .72);
  border: 1px solid rgba(255, 255, 255, .14);
}

.poster-year {
  left: 10px;
}

.rank-badge {
  right: 10px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.poster-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, .92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.86);
  transition: opacity .22s ease, transform .22s ease;
}

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

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.02em;
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, .18), transparent 40%),
    rgba(15, 23, 42, .72);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, .38);
  box-shadow: 0 24px 60px rgba(34, 211, 238, .1);
}

.category-symbol {
  color: var(--cyan);
  font-size: 30px;
}

.category-card strong {
  font-size: 22px;
}

.category-card small {
  color: #94a3b8;
  line-height: 1.65;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 34px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 88px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 18px;
  background: rgba(15, 23, 42, .62);
  transition: transform .2s ease, background .2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, .92);
}

.ranking-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  font-weight: 900;
}

.ranking-item img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: #1e293b;
}

.ranking-item h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.ranking-item p {
  margin: 0 0 5px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

.ranking-item span:last-child {
  color: #64748b;
  font-size: 12px;
}

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

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  padding: 82px 0 42px;
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, .2), transparent 34rem),
    linear-gradient(180deg, rgba(15, 23, 42, .75), rgba(2, 6, 23, .2));
}

.small-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #a5f3fc;
}

.no-results {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  text-align: center;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: rgba(15, 23, 42, .72);
}

.no-results.is-visible {
  display: block;
}

.detail-main {
  background: linear-gradient(180deg, rgba(15, 23, 42, .1), rgba(2, 6, 23, .4));
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 58px 0;
}

.detail-hero-inner .breadcrumb {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 26px;
  background: #1e293b;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 64px);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #0f172a;
  background: linear-gradient(180deg, rgba(2, 6, 23, .22), rgba(2, 6, 23, .68));
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 20px 54px rgba(34, 211, 238, .24);
  font-size: 34px;
}

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

.text-panel,
.info-card {
  margin-top: 22px;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 24px;
  background: rgba(15, 23, 42, .7);
}

.text-panel h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
}

.info-card dl {
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.info-card div:last-child {
  border-bottom: 0;
}

.info-card dt {
  color: #94a3b8;
}

.info-card dd {
  margin: 0;
  color: #fff;
  font-weight: 700;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a,
.detail-neighbor a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .18);
}

.detail-neighbor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, .14);
  background: rgba(2, 6, 23, .88);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 26px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, .1);
}

.is-hidden {
  display: none !important;
}

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

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

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

  .detail-sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding: 70px 0 96px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid-six,
  .movie-grid-four,
  .movie-grid-three,
  .category-grid,
  .wide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text small {
    display: none;
  }

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

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 48px;
  }

  .movie-grid-six,
  .movie-grid-four,
  .movie-grid-three,
  .category-grid,
  .wide-list,
  .detail-neighbor {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: auto 76px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 76px;
    height: 54px;
  }

  .section-block {
    padding: 48px 0;
  }
}
