:root {
  --bg: #070816;
  --panel: rgba(17, 24, 39, 0.84);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #f8fafc;
  --muted: #a7b1c2;
  --line: rgba(255, 255, 255, 0.12);
  --brand: #8b5cf6;
  --brand-2: #06b6d4;
  --gold: #fbbf24;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.36), transparent 32rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 30rem),
    linear-gradient(180deg, #070816 0%, #111827 48%, #070816 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.32);
}

.brand-text {
  font-size: 20px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.header-search {
  position: relative;
  width: 240px;
}

.header-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.search-panel {
  position: absolute;
  top: 50px;
  right: 0;
  width: min(420px, 88vw);
  max-height: 460px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

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

.search-panel a,
.search-empty {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.search-panel strong {
  color: var(--text);
}

.search-panel span {
  font-size: 13px;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

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

.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.mobile-category-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.hero-shell {
  position: relative;
  min-height: 640px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.01);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  filter: blur(16px) saturate(1.2);
  transform: scale(1.08);
}

.hero-backdrop::after,
.hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 22, 0.98) 0%, rgba(7, 8, 22, 0.76) 46%, rgba(7, 8, 22, 0.42) 100%),
    radial-gradient(circle at 28% 20%, rgba(139, 92, 246, 0.28), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-one-line {
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button {
  color: #07111f;
  background: linear-gradient(135deg, #fef3c7, #67e8f9);
  box-shadow: 0 18px 48px rgba(103, 232, 249, 0.24);
}

.ghost-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  z-index: 2;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.34), rgba(6, 182, 212, 0.18));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.hero-controls {
  position: absolute;
  left: 72px;
  bottom: 42px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.hero-dot {
  width: 9px !important;
  height: 9px !important;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.28) !important;
}

.hero-dot.active {
  width: 30px !important;
  border-radius: 999px !important;
  background: var(--text) !important;
}

.channel-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 0 4px;
}

.channel-bar a {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
}

.channel-bar span {
  color: var(--gold);
}

.section-block {
  margin-top: 64px;
}

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

.section-heading h2,
.category-panel h2,
.content-section h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #a5f3fc;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(165, 243, 252, 0.45);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(6, 182, 212, 0.22));
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #111827;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.8em;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.movie-card-compact p {
  min-height: 3.2em;
  -webkit-line-clamp: 2;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.rank-list,
.ranking-table {
  display: grid;
  gap: 8px;
}

.rank-row,
.ranking-table-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.rank-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #67e8f9);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info,
.ranking-table-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.category-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
}

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

.category-card {
  min-height: 180px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.category-poster-stack {
  position: relative;
  min-height: 148px;
}

.category-poster-stack img {
  position: absolute;
  width: 72px;
  height: 108px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(6, 182, 212, 0.22));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.category-poster-stack img:nth-child(1) {
  left: 0;
  top: 6px;
  z-index: 4;
}

.category-poster-stack img:nth-child(2) {
  left: 24px;
  top: 22px;
  z-index: 3;
}

.category-poster-stack img:nth-child(3) {
  left: 48px;
  top: 38px;
  z-index: 2;
}

.category-poster-stack img:nth-child(4) {
  left: 72px;
  top: 54px;
  z-index: 1;
}

.page-main,
.detail-main {
  padding: 42px 0 80px;
}

.page-hero {
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(32px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(255, 255, 255, 0.06));
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
}

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

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

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

.ranking-table {
  margin-top: 32px;
}

.ranking-table-row {
  grid-template-columns: 54px minmax(0, 1fr) 120px 90px 90px;
}

.ranking-table-row span {
  color: var(--gold);
  font-weight: 900;
}

.ranking-table-row b {
  color: #a5f3fc;
}

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

.breadcrumb a {
  color: #a5f3fc;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(6, 182, 212, 0.2));
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(38px, 7vw, 76px);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-grid span {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
}

.player-section {
  margin-top: 32px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07111f;
  background: linear-gradient(135deg, #fef3c7, #67e8f9);
  font-size: 34px;
  box-shadow: 0 20px 58px rgba(6, 182, 212, 0.24);
}

.play-overlay.hidden {
  display: none;
}

.content-section,
.neighbor-links {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.06);
}

.content-section p {
  margin: 16px 0 0;
  color: #dbeafe;
  line-height: 1.9;
  font-size: 17px;
}

.neighbor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.neighbor-links a {
  padding: 11px 14px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(255, 255, 255, 0.08);
}

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

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(7, 8, 22, 0.7);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1.2fr;
  gap: 28px;
  padding: 42px 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer a {
  display: block;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .category-movie-grid,
  .ranking-featured-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-slide,
  .detail-hero,
  .split-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

  .hero-shell {
    min-height: 620px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 24px 88px;
  }

  .hero-controls {
    left: 24px;
    bottom: 24px;
  }

  .movie-grid,
  .category-card-grid,
  .wide-grid,
  .category-movie-grid,
  .ranking-featured-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .category-poster-stack {
    min-height: 128px;
  }

  .ranking-table-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .ranking-table-row em,
  .ranking-table-row b {
    display: none;
  }

  .detail-meta-grid,
  .footer-grid,
  .footer-categories {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  main,
  .header-inner,
  .mobile-nav,
  .footer-grid {
    width: min(100% - 20px, 1180px);
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-title {
    font-size: 15px;
  }

  .movie-card p,
  .tag-row {
    display: none;
  }

  .detail-hero {
    padding: 16px;
  }
}
