:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.68);
  --panel-strong: rgba(15, 23, 42, 0.9);
  --line: rgba(96, 165, 250, 0.22);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --gold: #facc15;
  --shadow: 0 22px 80px rgba(37, 99, 235, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 40rem),
    linear-gradient(135deg, #020617 0%, #0f1d47 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

main {
  min-height: 65vh;
}

.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: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 45px rgba(2, 6, 23, 0.35);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  font-size: 18px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

.brand-text strong,
.brand-text em {
  display: block;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #bfdbfe, #ecfeff, #bfdbfe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 3px;
  color: rgba(147, 197, 253, 0.78);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 9px 14px;
  color: #dbeafe;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.38);
}

.header-search {
  position: relative;
  margin-left: auto;
  width: min(360px, 32vw);
}

.header-search input,
.filter-input,
.filter-select {
  width: 100%;
  height: 42px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  transition: 0.22s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  display: none;
  max-height: 430px;
  overflow: auto;
  padding: 10px;
  background: rgba(2, 6, 23, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  color: var(--soft);
  transition: 0.2s ease;
}

.search-item:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #fff;
}

.search-item img {
  width: 56px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.9);
}

.search-item strong,
.search-item em {
  display: block;
}

.search-item em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
}

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

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.12) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.82) 42%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, transparent 44%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 680px;
  margin: 0 auto;
  padding: 96px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.65fr);
  gap: 52px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 22px;
  color: #bfdbfe;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #dbeafe, #ecfeff, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.24s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(34, 211, 238, 0.32);
}

.btn-ghost {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(37, 99, 235, 0.24);
}

.hero-panel {
  padding: 20px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.3));
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: rgba(15, 23, 42, 0.9);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(37, 99, 235, 0.76);
  border-radius: 999px;
  font-weight: 700;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.4);
  transition: 0.22s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px;
}

.section.compact {
  padding-top: 42px;
  padding-bottom: 42px;
}

.section-tint {
  background: rgba(15, 23, 42, 0.24);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-head span {
  height: 4px;
  flex: 1;
  min-width: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, transparent);
}

.section-more {
  color: #93c5fd;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.72));
  backdrop-filter: blur(12px);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.62);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  height: 320px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.94);
}

.movie-card-large .movie-cover {
  height: 420px;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 56%);
}

.movie-year,
.play-badge {
  position: absolute;
  z-index: 2;
}

.movie-year {
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(37, 99, 235, 0.84);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(37, 99, 235, 0.84);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: 0.25s ease;
}

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

.movie-info {
  padding: 20px;
}

.movie-info h2,
.movie-info h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.movie-info h2 a:hover,
.movie-info h3 a:hover {
  color: #93c5fd;
}

.movie-info p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.movie-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.52);
  transition: 0.22s ease;
}

.movie-row:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: var(--line);
}

.rank-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #020617;
  border-radius: 18px;
  background: linear-gradient(135deg, #facc15, #22d3ee);
  font-size: 20px;
  font-weight: 900;
}

.row-copy strong,
.row-copy em {
  display: block;
}

.row-copy strong {
  margin-bottom: 6px;
  color: #fff;
  font-size: 18px;
}

.row-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
}

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

.channel-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 45%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.72));
  transition: 0.25s ease;
}

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

.channel-card h2,
.channel-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

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

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px 28px;
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 30px;
}

.catalog-empty {
  display: none;
  padding: 38px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
}

.catalog-empty.is-visible {
  display: block;
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 24px 78px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #93c5fd;
  font-size: 14px;
}

.breadcrumb span {
  color: #64748b;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.75fr);
  gap: 30px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.68), rgba(15, 23, 42, 0.76));
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
}

.player-card {
  overflow: hidden;
}

.video-player {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.18));
  border: 0;
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.86);
  font-size: 34px;
  box-shadow: 0 0 58px rgba(37, 99, 235, 0.56);
}

.video-player.is-ready .player-start {
  display: none;
}

.player-error {
  display: none;
  padding: 14px 18px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.42);
}

.player-error.is-visible {
  display: block;
}

.detail-title {
  padding: 26px;
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.detail-title p {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

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

.detail-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.92;
}

.review-box {
  padding: 18px;
  border-left: 4px solid #38bdf8;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
}

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

.side-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-card img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  margin-bottom: 4px;
  color: #fff;
  line-height: 1.35;
}

.compact-card:hover strong {
  color: #93c5fd;
}

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(2, 6, 23, 0.92));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
}

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

.footer-brand p {
  max-width: 480px;
  margin: 18px 0 0;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 16px;
  font-size: 16px;
}

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

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

.copyright {
  margin: 0;
  padding: 18px 24px 28px;
  text-align: center;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-search {
    width: min(360px, 44vw);
  }

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

  .hero-panel {
    max-width: 420px;
  }

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

@media (max-width: 720px) {
  .header-inner {
    height: auto;
    min-height: 72px;
    padding: 14px;
    flex-wrap: wrap;
  }

  .brand-text em {
    display: none;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-inner {
    padding-top: 54px;
    gap: 28px;
  }

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

  .movie-grid,
  .movie-grid.large,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .movie-cover,
  .movie-card-large .movie-cover {
    height: 360px;
  }

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

  .movie-row {
    grid-template-columns: 54px 1fr;
  }

  .movie-row .btn {
    grid-column: 1 / -1;
  }

  .section,
  .page-hero,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }
}
