:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #ffffff;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --yellow: #facc15;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-text strong,
.footer-logo {
  display: block;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

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

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

.nav-link {
  padding: 9px 14px;
  color: #cbd5e1;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.wide-search input,
.page-filter input,
.page-filter select {
  color: var(--white);
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(100, 116, 139, 0.55);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 260px;
  padding: 10px 12px;
}

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

.header-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  color: #06121c;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #38bdf8);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: rgba(51, 65, 85, 0.8);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
}

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

.mobile-panel.is-open {
  display: block;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.58);
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.2)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 48%, rgba(2, 6, 23, 0.64) 100%);
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: center;
  gap: 46px;
  padding: 54px 0 90px;
}

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

.hero-pill {
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  padding: 9px 14px;
  margin-bottom: 22px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  max-width: 680px;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  color: #dbeafe;
  background: rgba(51, 65, 85, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #04111b;
  background: linear-gradient(135deg, var(--cyan), #38bdf8);
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  color: var(--white);
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.btn-plain {
  color: var(--cyan);
  background: transparent;
  border: 1px solid rgba(34, 211, 238, 0.36);
}

.hero-poster {
  justify-self: center;
  width: min(360px, 88%);
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: relative;
  z-index: 4;
  margin-top: -92px;
  padding-bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

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

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  cursor: pointer;
}

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

.hero-thumbs {
  display: flex;
  max-width: 680px;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 54px 112px;
  gap: 10px;
  align-items: center;
  min-width: 180px;
  padding: 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.hero-thumb.is-active {
  color: var(--white);
  border-color: rgba(34, 211, 238, 0.55);
}

.hero-thumb img {
  width: 54px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
}

.home-search-panel,
.page-hero,
.detail-hero,
.player-section,
.content-card,
.category-preview,
.channel-card,
.hot-band .container,
.ranking-preview {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  padding: 28px;
}

.home-search-panel h2,
.section-heading h2,
.category-preview h3,
.content-card h2,
.player-section h2 {
  margin: 0;
  color: var(--white);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.home-search-panel p,
.category-preview p,
.page-hero p,
.content-card p,
.detail-one-line,
.site-footer p {
  color: var(--muted);
}

.wide-search,
.page-filter {
  display: flex;
  gap: 10px;
}

.wide-search input,
.page-filter input,
.page-filter select {
  min-height: 48px;
  padding: 0 14px;
}

.wide-search input,
.page-filter input {
  flex: 1;
  min-width: 0;
}

.page-section {
  margin-top: 54px;
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-heading h2::before {
  content: "";
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.section-more,
.category-preview-head a {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #00111d;
  background: rgba(34, 211, 238, 0.92);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.score,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #000;
  background: var(--yellow);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  right: auto;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 7px;
  color: var(--white);
  font-size: 16px;
  line-height: 1.35;
}

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

.meta-line {
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 12px;
}

.movie-info p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 13px;
}

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

.hot-band {
  padding: 24px 0;
}

.hot-band .container {
  padding: 28px;
}

.category-stack {
  display: grid;
  gap: 24px;
}

.category-preview {
  padding: 24px;
}

.category-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-preview h3 {
  font-size: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr auto 64px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.rank-num {
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
}

.rank-item img {
  width: 52px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  color: var(--white);
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.rank-score {
  color: var(--yellow);
  font-weight: 900;
  text-align: right;
}

.inner-page {
  padding: 34px 0 70px;
}

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

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

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  color: #475569;
  margin-right: 8px;
}

.page-hero {
  padding: 34px;
  margin-bottom: 30px;
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.category-hero {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: end;
}

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

.channel-card {
  overflow: hidden;
}

.channel-link {
  display: block;
  min-height: 100%;
}

.channel-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px;
}

.channel-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.channel-copy {
  padding: 10px 20px 22px;
}

.channel-copy h2 {
  margin: 0 0 8px;
  color: var(--white);
}

.channel-copy p {
  color: var(--muted);
  margin: 0 0 12px;
}

.channel-copy span {
  color: var(--cyan);
  font-weight: 800;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  padding: 28px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  font-size: 18px;
  max-width: 760px;
}

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

.detail-meta strong {
  color: #020617;
  background: var(--yellow);
  border-radius: 999px;
  padding: 6px 12px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  margin-top: 34px;
  padding: 24px;
}

.player-shell {
  position: relative;
  margin-top: 18px;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.video-player {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000;
  display: block;
}

.player-start {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  gap: 10px;
  width: 148px;
  height: 148px;
  border: 0;
  border-radius: 50%;
  color: #00111d;
  background: rgba(34, 211, 238, 0.92);
  transform: translate(-50%, -50%);
  cursor: pointer;
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.45);
}

.player-start span {
  font-size: 36px;
}

.player-start.is-hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.content-card {
  padding: 26px;
}

.content-card p {
  margin-bottom: 0;
  font-size: 16px;
}

.search-page .page-filter {
  margin-top: 22px;
  max-width: 800px;
}

.movie-card.is-hidden {
  display: none;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  padding: 18px;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-content,
  .home-search-panel,
  .category-hero,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    min-height: 560px;
    padding-top: 38px;
  }

  .hero-controls {
    display: block;
    margin-top: -80px;
  }

  .hero-thumbs {
    margin-top: 16px;
  }

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

  .home-search-panel,
  .hot-band .container,
  .page-hero,
  .detail-hero,
  .player-section,
  .content-card,
  .category-preview {
    border-radius: 18px;
    padding: 18px;
  }

  .wide-search,
  .page-filter,
  .mobile-search {
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 36px 48px 1fr 48px;
  }

  .rank-meta {
    display: none;
  }

  .player-start {
    width: 112px;
    height: 112px;
  }
}
