:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(34, 211, 238, 0.2);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --orange: #fb923c;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 0%, rgba(59, 130, 246, 0.12), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  box-shadow: 0 8px 40px rgba(8, 145, 178, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.12));
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}

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

.brand-copy strong {
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan));
  background-clip: text;
  color: transparent;
  font-size: 22px;
  font-weight: 800;
}

.brand-copy small {
  margin-top: 4px;
  color: rgba(34, 211, 238, 0.64);
  font-size: 12px;
}

.header-search {
  position: relative;
  flex: 1;
  max-width: 520px;
}

.header-search input,
.search-page-form input,
.filter-panel input {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--text);
  outline: none;
  padding: 12px 104px 12px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus {
  border-color: rgba(34, 211, 238, 0.78);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.header-search button,
.search-page-form button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  color: white;
  cursor: pointer;
  padding: 8px 18px;
  font-weight: 700;
}

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

.nav-link,
.mobile-nav-link,
.footer-links a,
.section-title-row a,
.breadcrumb a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active,
.footer-links a:hover,
.section-title-row a:hover,
.breadcrumb a:hover {
  color: var(--cyan);
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--cyan);
  font-size: 22px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 16px;
}

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

.mobile-nav-link {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.52);
}

.hero-carousel {
  position: relative;
  height: min(82vh, 760px);
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.22) 42%, rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
}

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

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
  max-width: 850px;
  margin: 0;
  background: linear-gradient(90deg, #ffffff, #cffafe, #ffffff);
  background-clip: text;
  color: transparent;
  font-weight: 900;
  line-height: 1.08;
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(42px, 8vw, 84px);
}

.hero-desc {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
  font-size: 13px;
  padding: 7px 12px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 38px rgba(8, 145, 178, 0.28);
  color: white;
  padding: 14px 28px;
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.68);
  color: var(--cyan);
  padding: 13px 24px;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(8, 145, 178, 0.22);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.58);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

.intro-strip h2,
.section-title-row h2,
.content-panel h2,
.recommend-panel h2,
.player-section h2,
.sticky-side h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 850;
}

.intro-strip p,
.page-hero p,
.detail-one-line,
.content-panel p {
  color: var(--soft);
  line-height: 1.8;
}

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

.section-title-row a {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.movie-card {
  display: block;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.36);
}

.poster-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.1) 48%, transparent);
  opacity: 0.85;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.card-badge,
.card-year,
.card-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.card-badge {
  top: 10px;
  left: 10px;
  background: rgba(6, 182, 212, 0.92);
}

.card-year {
  right: 10px;
  bottom: 10px;
  background: rgba(2, 6, 23, 0.82);
}

.card-play {
  left: 50%;
  top: 50%;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.78);
  background: rgba(6, 182, 212, 0.92);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  display: grid;
  gap: 7px;
  padding: 12px 2px 0;
}

.card-body strong {
  overflow: hidden;
  display: -webkit-box;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong,
.rank-item:hover strong {
  color: var(--cyan);
}

.card-meta,
.card-desc {
  overflow: hidden;
  display: -webkit-box;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
}

.card-meta {
  -webkit-line-clamp: 1;
}

.card-desc {
  line-height: 1.6;
  -webkit-line-clamp: 2;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

.movie-card-compact .card-desc {
  display: none;
}

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

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

.category-tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.55s ease, opacity 0.2s ease;
}

.category-tile:hover img {
  opacity: 0.58;
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.2));
}

.category-copy {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.category-copy strong {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 900;
}

.category-copy small {
  color: var(--soft);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-samples span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 8px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 36px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 132px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.52);
  color: var(--text);
  padding: 12px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.82);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.rank-copy em,
.rank-copy small {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.page-hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.94));
  padding: 72px 0;
}

.page-hero h1,
.detail-copy h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.filter-panel {
  max-width: 680px;
  margin-top: 26px;
}

.filter-panel input {
  padding-right: 18px;
}

.is-filtered-out {
  display: none;
}

.search-page-form {
  position: relative;
  max-width: 680px;
  margin-top: 26px;
}

.search-summary {
  margin-bottom: 22px;
  color: var(--cyan);
  font-size: 20px;
  font-weight: 850;
}

.detail-top {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.14), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.95));
  padding: 58px 0;
}

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

.detail-layout .breadcrumb {
  grid-column: 1 / -1;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 0;
  font-size: 18px;
}

.detail-meta,
.detail-tags {
  margin-top: 22px;
}

.detail-copy .primary-button {
  margin-top: 30px;
}

.player-section {
  padding: 56px 0 32px;
}

.player-section h2 {
  margin-bottom: 22px;
}

.player-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: black;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.72);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.06));
  color: white;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.94), rgba(37, 99, 235, 0.94));
  box-shadow: 0 20px 50px rgba(8, 145, 178, 0.34);
  font-size: 34px;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  padding: 32px 0 72px;
}

.content-panel,
.recommend-panel,
.sticky-side {
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-panel {
  padding: 30px;
}

.content-panel h2 + p {
  margin-top: 12px;
}

.content-panel h2:not(:first-child) {
  margin-top: 30px;
}

.content-panel p {
  white-space: pre-line;
}

.recommend-panel,
.sticky-side {
  padding: 22px;
  align-self: start;
}

.recommend-panel h2,
.sticky-side h2 {
  margin-bottom: 18px;
  font-size: 22px;
}

.rank-page-layout {
  align-items: start;
}

.rank-list-large .rank-item {
  grid-template-columns: 58px 150px minmax(0, 1fr);
}

.sticky-side {
  position: sticky;
  top: 96px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.footer-brand {
  color: var(--cyan);
  font-weight: 900;
}

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

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

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

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

  .sticky-side {
    position: static;
  }
}

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

  .header-search,
  .desktop-nav {
    display: none;
  }

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

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 94px;
  }

  .intro-strip,
  .section-title-row,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-item,
  .rank-list-large .rank-item {
    grid-template-columns: 44px 108px minmax(0, 1fr);
    gap: 12px;
  }

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

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

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

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

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

  .brand-copy small {
    font-size: 11px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 42px;
  }

  .hero-desc {
    font-size: 16px;
  }

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

  .category-grid,
  .category-grid-large,
  .side-card-grid {
    grid-template-columns: 1fr;
  }

  .rank-copy small {
    display: none;
  }

  .rank-item,
  .rank-list-large .rank-item {
    grid-template-columns: 40px 92px minmax(0, 1fr);
  }

  .page-hero,
  .detail-top {
    padding: 44px 0;
  }

  .content-panel,
  .recommend-panel,
  .sticky-side {
    border-radius: 22px;
    padding: 20px;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
