* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #050711;
  --bg-soft: #0b1020;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #f43f5e;
  --primary-dark: #be123c;
  --gold: #fbbf24;
  --cyan: #38bdf8;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.18), transparent 32rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.13), transparent 30rem),
    linear-gradient(180deg, #060914 0%, #0b1020 42%, #050711 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 17, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 20px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #fb7185 45%, var(--cyan));
  box-shadow: 0 12px 34px rgba(244, 63, 94, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
}

.mobile-nav {
  display: none;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-nav.open {
  display: grid;
}

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

.hero-carousel {
  position: relative;
  margin-top: 24px;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 17, 0.95) 0%, rgba(5, 7, 17, 0.62) 42%, rgba(5, 7, 17, 0.15) 100%),
    linear-gradient(0deg, rgba(5, 7, 17, 0.88) 0%, transparent 55%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 6vw, 86px);
  bottom: clamp(34px, 8vw, 96px);
  width: min(720px, calc(100% - 48px));
}

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

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

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-actions,
.detail-info .primary-btn {
  margin-top: 24px;
}

.primary-btn,
.ghost-btn,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 16px 40px rgba(244, 63, 94, 0.32);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost-btn {
  margin-left: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.5);
  box-shadow: none;
}

.primary-btn:hover,
.ghost-btn:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  font-size: 12px;
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.quick-search,
.page-hero,
.content-section,
.rank-panel,
.detail-hero,
.player-section,
.detail-article,
.detail-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
}

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

.quick-search h2,
.section-title h2,
.rank-panel h2,
.player-section h2,
.detail-article h2,
.detail-side h2,
.index-list-section h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.quick-search p,
.section-title p,
.rank-panel p,
.card-body p,
.channel-card p,
.detail-article p,
.site-footer p {
  color: var(--muted);
}

.search-box {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--text);
  background: transparent;
}

.content-section {
  margin: 28px 0;
  padding: 28px;
}

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

.section-more {
  color: #fda4af;
  font-weight: 800;
}

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

.category-tile,
.channel-card a {
  display: block;
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.14), rgba(56, 189, 248, 0.08));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.channel-card a:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 63, 94, 0.46);
}

.category-tile strong,
.channel-card h2 {
  display: block;
  font-size: 20px;
  margin: 0 0 8px;
}

.category-tile span,
.channel-card span {
  color: var(--muted);
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

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

.rank-panel {
  padding: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.rank-row span {
  font-weight: 800;
}

.rank-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(56, 189, 248, 0.16));
}

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

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

.rating,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #111827;
  background: var(--gold);
  font-weight: 900;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  right: auto;
  color: #ffffff;
  background: var(--primary);
}

.card-body {
  padding: 16px;
}

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

.card-body p {
  margin: 8px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  color: #cbd5e1;
  font-size: 13px;
}

.page-main {
  padding-top: 28px;
}

.page-hero {
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(56, 189, 248, 0.1)),
    rgba(15, 23, 42, 0.8);
}

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

.live-search-box {
  max-width: 720px;
  margin-top: 24px;
}

.search-status {
  margin-bottom: 18px;
  color: #fda4af;
  font-weight: 900;
}

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.wide-card .poster-link {
  aspect-ratio: 2 / 3;
}

.all-link-grid {
  columns: 4 240px;
  column-gap: 24px;
}

.all-link-grid a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  break-inside: avoid;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #dbeafe;
}

.all-link-grid span {
  color: var(--muted);
  font-size: 13px;
}

.detail-main {
  max-width: 1180px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #fda4af;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

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

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.8);
  color: #dbeafe;
}

.player-section {
  margin: 28px 0;
  padding: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(244, 63, 94, 0.88);
  box-shadow: 0 18px 50px rgba(244, 63, 94, 0.42);
  cursor: pointer;
  font-size: 30px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-overlay:hover {
  transform: scale(1.08);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article p {
  font-size: 17px;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.detail-side dd {
  margin: 3px 0 0;
  color: #e2e8f0;
  font-weight: 800;
}

.index-list-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.index-list-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.35);
}

.index-list-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2 220px;
}

.index-list-section li {
  break-inside: avoid;
}

.index-list-section a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #dbeafe;
}

.index-list-section span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.site-footer {
  width: min(1320px, calc(100% - 32px));
  margin: 44px auto 0;
  padding: 34px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: #cbd5e1;
}

.copyright {
  color: var(--muted);
}

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

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

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

  .side-column {
    position: static;
  }

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

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

@media (max-width: 820px) {
  .hero-carousel {
    min-height: 540px;
    border-radius: 24px;
  }

  .quick-search,
  .detail-hero,
  .footer-grid,
  .index-list-wrap {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 18px;
  }

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

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

  .wide-card {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  main,
  .header-inner,
  .mobile-nav,
  .site-footer {
    width: min(100% - 22px, 1320px);
  }

  .hero-content {
    left: 18px;
    bottom: 70px;
    width: calc(100% - 36px);
  }

  .hero-summary,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .ghost-btn {
    margin-left: 0;
    margin-top: 10px;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .content-section,
  .quick-search,
  .page-hero,
  .player-section,
  .detail-article,
  .detail-side {
    padding: 18px;
  }

  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .ranking-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    font-size: 15px;
  }
}
