* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-light: #ffffff;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --light-text: #0f172a;
  --accent: #ef4444;
  --accent-2: #f97316;
  --line: rgba(148, 163, 184, 0.22);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 14px;
  box-shadow: 0 12px 34px rgba(239, 68, 68, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-links a {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #fca5a5;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
}

.nav-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(248, 113, 113, 0.8);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.nav-search button,
.hero-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-search button:hover,
.hero-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.32);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: white;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 20px;
}

.focus-stage {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #020617;
}

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

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

.focus-content {
  width: min(760px, calc(100% - 32px));
  margin-left: max(24px, calc((100vw - 1280px) / 2));
  padding: 110px 0 120px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
}

.focus-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 18px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.06;
  color: white;
  letter-spacing: -0.04em;
}

.focus-content p,
.page-hero p,
.detail-info p {
  max-width: 700px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 21px);
}

.focus-tags,
.tag-row,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-tags {
  margin-top: 22px;
}

.focus-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
}

.focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.focus-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.focus-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.focus-dot.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.quick-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
}

.quick-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 18px 0;
}

.quick-inner a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.quick-inner a:hover {
  color: white;
  border-color: rgba(248, 113, 113, 0.75);
}

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

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

.section-heading h2,
.detail-section h2,
.search-result-head h2 {
  margin: 4px 0 0;
  color: white;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
}

.section-heading a {
  color: #fca5a5;
  font-weight: 700;
}

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

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

.movie-card {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.5);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 35%, rgba(2, 6, 23, 0.82) 100%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span {
  padding: 4px 8px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}

.card-body h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: #fca5a5;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row span {
  padding: 4px 8px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.24);
}

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

.movie-card-compact .card-body p {
  display: none;
}

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

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

.channel-card {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 34%), rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.channel-card h2 {
  margin: 10px 0;
  font-size: 26px;
  color: white;
}

.channel-card p {
  margin: 0;
  color: #cbd5e1;
}

.channel-kicker {
  color: #fca5a5;
  font-weight: 800;
  font-size: 13px;
}

.channel-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.channel-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 13px;
}

.page-hero {
  min-height: 360px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.34), transparent 28%), linear-gradient(135deg, #020617, #111827 58%, #7f1d1d);
  border-bottom: 1px solid var(--line);
}

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

.compact-hero {
  min-height: 320px;
}

.channel-hero {
  min-height: 340px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 700;
}

.filter-panel select {
  appearance: none;
}

.detail-head {
  min-height: 620px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}

.detail-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 80px 0;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  background: #111827;
}

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

.breadcrumbs {
  display: flex;
  gap: 9px;
  color: #fca5a5;
  font-weight: 700;
}

.detail-meta {
  margin: 18px 0;
}

.detail-tags {
  margin-top: 20px;
}

.detail-section {
  padding-top: 44px;
  padding-bottom: 44px;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.26), rgba(2, 6, 23, 0.72));
}

.video-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.36);
  font-size: 30px;
}

.video-start strong {
  font-size: 18px;
}

.video-shell.is-playing .video-start {
  display: none;
}

.detail-text {
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.9;
  margin: 14px 0 30px;
}

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

.hero-search {
  display: flex;
  gap: 12px;
  max-width: 620px;
  margin-top: 28px;
}

.search-result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.search-result-head p,
.empty-state {
  color: #cbd5e1;
}

.empty-state {
  padding: 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #020617;
}

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

.footer-grid p {
  color: #94a3b8;
  margin: 14px 0 0;
}

.footer-grid h2 {
  color: white;
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  color: #cbd5e1;
  margin: 8px 0;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

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

  .ranking-strip,
  .related-grid,
  .channel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-search {
    min-width: 240px;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-search {
    order: 3;
    width: 100%;
    min-width: 0;
  }

  .focus-stage {
    min-height: 590px;
  }

  .focus-content {
    margin: 0 auto;
    padding: 92px 0 110px;
  }

  .movie-grid,
  .movie-grid-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .ranking-strip,
  .related-grid,
  .channel-grid,
  .wide-channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .search-result-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .detail-poster {
    width: min(320px, 100%);
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .movie-grid-home,
  .ranking-strip,
  .related-grid,
  .channel-grid,
  .wide-channels {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .nav-search {
    flex-direction: column;
  }

  .nav-search button,
  .hero-search button {
    width: 100%;
  }

  .focus-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn {
    text-align: center;
  }
}
