:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c32;
  --bg-card: rgba(30, 41, 59, 0.74);
  --bg-card-strong: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --cyan-strong: #06b6d4;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.14), transparent 28rem),
    radial-gradient(circle at 82% 3%, rgba(96, 165, 250, 0.13), transparent 26rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0b1120 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

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

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

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

.brand-copy strong,
.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  white-space: nowrap;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(51, 65, 85, 0.6);
}

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

.header-search input,
.mobile-nav input,
.filter-bar input,
.filter-bar select {
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.header-search button,
.mobile-nav button,
.hero-button,
.section-link,
.filter-button,
.watch-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-strong), #3b82f6);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button,
.mobile-nav button,
.filter-button {
  height: 42px;
  padding: 0 18px;
}

.header-search button:hover,
.mobile-nav button:hover,
.hero-button:hover,
.section-link:hover,
.filter-button:hover,
.watch-button:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: #cbd5e1;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid var(--border);
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.46);
}

.mobile-nav form {
  display: flex;
  gap: 10px;
}

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

.hero {
  position: relative;
  min-height: clamp(620px, 82vh, 880px);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-slider {
  position: relative;
  min-height: inherit;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.44) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: inherit;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  align-items: end;
  gap: 48px;
  padding: 116px 0 74px;
}

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

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 700px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.8;
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.18);
  font-size: 0.78rem;
}

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

.hero-button,
.section-link,
.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
}

.hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.46);
  transition: 0.2s ease;
}

.hero-ghost:hover {
  color: var(--cyan);
  background: rgba(255, 255, 255, 0.08);
}

.hero-side-card {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-side-card img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-side-card .side-body {
  padding: 22px;
}

.hero-side-card h2 {
  margin: 8px 0 8px;
  font-size: 1.45rem;
}

.hero-side-card p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.hero-dot {
  width: 36px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.32);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.56);
  cursor: pointer;
}

.section {
  padding: 72px 0;
}

.section.alt {
  width: 100%;
  background: rgba(15, 23, 42, 0.38);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-header h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.03em;
}

.section-header p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 220px);
  gap: 18px;
  overflow-x: auto;
  padding: 6px 0 18px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 22px 54px rgba(6, 182, 212, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.poster-link img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-badge,
.play-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.16);
  backdrop-filter: blur(8px);
}

.play-pill {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.35);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: #a8b4c7;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.16), transparent 12rem),
    linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  transition: 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.54);
  transition: 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(30, 41, 59, 0.76);
}

.rank-no {
  color: var(--cyan);
  font-size: 1.28rem;
  font-weight: 900;
  text-align: center;
}

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

.rank-copy {
  min-width: 0;
}

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

.rank-copy em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.rank-more {
  color: var(--cyan);
  font-weight: 700;
}

.page-hero {
  padding: 72px 0 42px;
}

.page-title {
  max-width: 820px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 160px auto;
  gap: 12px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.56);
}

.filter-empty {
  display: none;
  padding: 40px 20px;
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 28px;
  padding: 38px 0 72px;
}

.watch-panel,
.detail-card,
.related-panel {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.watch-panel {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.2), rgba(15, 23, 42, 0.72));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.watch-button {
  min-height: 62px;
  padding: 0 30px;
  font-size: 1.08rem;
}

.watch-button span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.watch-info {
  padding: 22px;
}

.watch-info h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.watch-info p,
.detail-card p {
  color: #cbd5e1;
  line-height: 1.86;
}

.detail-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--border);
}

.detail-cover img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail-card {
  padding: 24px;
}

.detail-card h2,
.related-panel h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.detail-meta span {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
}

.detail-meta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.related-panel {
  padding: 24px;
}

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

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  color: var(--muted);
}

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

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

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .hero-side-card {
    display: none;
  }

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

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

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

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

  .detail-side {
    grid-row: 1;
  }

  .detail-cover {
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1280px);
    height: 68px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .mobile-nav {
    width: min(100% - 24px, 1280px);
  }

  .page-main,
  .hero-content,
  .hero-controls,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 96px;
    padding-bottom: 76px;
  }

  .hero-actions,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-controls {
    align-items: flex-end;
  }

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

  .movie-rail {
    grid-auto-columns: minmax(168px, 190px);
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 44px 54px minmax(0, 1fr);
  }

  .rank-more {
    display: none;
  }

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