html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #e2e8f0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.42));
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 19px;
  color: #fff;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 3px;
}

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

.desktop-nav a,
.mobile-panel nav a {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel nav a:hover,
.mobile-panel nav a.active {
  color: #38bdf8;
}

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

.header-search input,
.mobile-search input,
.filter-box input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-box input:focus {
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.95);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  overflow: hidden;
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
}

.search-panel.active {
  display: block;
}

.search-panel a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.search-panel a:last-child {
  border-bottom: 0;
}

.search-panel strong {
  display: block;
  color: #fff;
  font-size: 14px;
  margin-bottom: 4px;
}

.search-panel span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-button {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 14px 20px 20px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.mobile-search {
  position: relative;
}

.hero-wrap {
  padding-top: 76px;
  background: radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 34%), linear-gradient(135deg, #020617, #0f172a 48%, #020617);
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  border-radius: 0 0 34px 34px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55) 48%, rgba(2, 6, 23, 0.12)), linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 55%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(40px, 8vw, 92px);
  width: min(680px, calc(100% - 48px));
}

.eyebrow,
.section-title span,
.page-hero span,
.category-overview-head span {
  display: inline-flex;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 900;
  margin: 0 0 18px;
}

.hero-content p {
  max-width: 640px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  margin: 0 0 22px;
}

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

.hero-tags span,
.tag-row span,
.detail-badges span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  padding: 7px 12px;
  font-size: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.32);
}

.ghost-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.hero-dots {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: 42px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  border-radius: 999px;
  background: #38bdf8;
}

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

.section-wrap {
  padding: 72px 0;
}

.section-wrap.no-top {
  padding-top: 0;
}

.alt-section {
  position: relative;
}

.section-title,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title h2,
.page-hero h1,
.category-overview-head h2,
.detail-card h1,
.detail-side h2 {
  color: #fff;
  margin: 0;
}

.section-title h2 {
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 900;
}

.section-title a {
  color: #38bdf8;
  font-weight: 800;
}

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

.movie-grid-scroll {
  display: flex;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
}

.movie-grid-scroll .movie-card {
  min-width: 184px;
  scroll-snap-align: start;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.52);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.32);
}

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

.movie-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.movie-thumb-wide {
  width: 142px;
  min-height: 188px;
  flex: 0 0 142px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

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

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

.corner-badge,
.rank-num {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.rank-num {
  left: 10px;
  right: auto;
  min-width: 32px;
  color: #082f49;
  background: #38bdf8;
  font-style: normal;
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  color: #fff;
  margin: 8px 0 8px;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info p {
  color: #94a3b8;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  gap: 8px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
}

.movie-card-wide {
  display: flex;
  gap: 16px;
  padding: 14px;
  align-items: stretch;
}

.movie-card-wide .movie-info {
  padding: 4px 4px 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.movie-card-wide .movie-info h3 {
  -webkit-line-clamp: 2;
}

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

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

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

.channel-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #0f172a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.channel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.channel-card:hover img {
  transform: scale(1.08);
  opacity: 0.48;
}

.channel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.18));
}

.channel-card span,
.channel-card p {
  position: relative;
  z-index: 2;
}

.channel-card span {
  display: block;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-top: 80px;
}

.channel-card p {
  color: #cbd5e1;
  line-height: 1.7;
  font-size: 14px;
  margin: 10px 0 0;
}

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

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: end;
  padding: 54px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 32px;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.25), transparent 40%), linear-gradient(135deg, #0f172a, #020617);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.28);
}

.small-hero {
  min-height: 250px;
}

.category-hero {
  min-height: 280px;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 16px;
}

.page-hero p {
  max-width: 780px;
  color: #cbd5e1;
  line-height: 1.85;
  margin: 0;
  font-size: 17px;
}

.category-overview-list {
  padding: 56px 0;
  display: grid;
  gap: 34px;
}

.category-overview-card {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.78);
}

.category-overview-head p {
  max-width: 760px;
  color: #94a3b8;
  line-height: 1.75;
  margin: 10px 0 0;
}

.filter-title {
  align-items: center;
}

.filter-box {
  width: min(360px, 100%);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 22px;
}

.breadcrumb a:hover {
  color: #38bdf8;
}

.breadcrumb strong {
  color: #fff;
  font-weight: 700;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 22px 44px rgba(14, 165, 233, 0.34);
  font-size: 34px;
}

.detail-card,
.detail-side {
  margin-top: 24px;
  padding: 28px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.78);
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  margin-top: 18px;
}

.detail-lead {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin: 18px 0 22px;
}

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

.detail-meta-grid div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.7);
}

.detail-meta-grid small {
  display: block;
  color: #94a3b8;
  margin-bottom: 6px;
}

.detail-meta-grid strong {
  color: #fff;
}

.detail-tags {
  margin: 22px 0;
}

.text-block {
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.text-block + .text-block {
  margin-top: 24px;
}

.text-block h2 {
  color: #fff;
  font-size: 22px;
  margin: 0 0 12px;
}

.text-block p {
  color: #cbd5e1;
  line-height: 2;
  margin: 0;
}

.detail-side {
  position: sticky;
  top: 100px;
  margin-top: 0;
  height: max-content;
}

.detail-side h2 {
  font-size: 24px;
  margin-bottom: 18px;
}

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

.side-list .movie-card-wide {
  gap: 12px;
}

.side-list .movie-thumb-wide {
  width: 96px;
  min-height: 128px;
  flex-basis: 96px;
}

.side-list .tag-row {
  display: none;
}

.site-footer {
  margin-top: 80px;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  color: #94a3b8;
  max-width: 560px;
  line-height: 1.8;
  margin: 0;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 14px;
}

.site-footer a:not(.brand) {
  display: block;
  color: #94a3b8;
  margin: 9px 0;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #38bdf8;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 14px;
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-panel.active {
    display: block;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-wrap {
    padding-top: 66px;
  }

  .hero-carousel {
    width: 100%;
    min-height: 560px;
    border-radius: 0 0 28px 28px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.2));
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 74px;
    width: auto;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 28px;
  }

  .section-wrap {
    padding: 52px 0;
  }

  .section-title,
  .category-overview-head,
  .filter-title {
    align-items: start;
    flex-direction: column;
  }

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

  .rank-grid,
  .full-rank {
    grid-template-columns: 1fr;
  }

  .movie-grid-scroll .movie-card {
    min-width: 164px;
  }

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

  .page-main {
    padding-top: 92px;
    width: min(100% - 24px, 1180px);
  }

  .page-hero {
    padding: 28px;
    min-height: 230px;
    border-radius: 24px;
  }

  .category-overview-card,
  .detail-card,
  .detail-side {
    padding: 20px;
  }

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

  .movie-card-wide {
    padding: 10px;
  }

  .movie-thumb-wide {
    width: 105px;
    min-height: 140px;
    flex-basis: 105px;
  }

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