:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --white: #ffffff;
  --yellow-500: #eab308;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 22px 60px rgba(15, 23, 42, 0.2);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  color: var(--white);
  box-shadow: 0 8px 26px rgba(2, 6, 23, 0.28);
}

.top-nav {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-500), #60a5fa);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #dbeafe;
  font-size: 15px;
}

.nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #93c5fd;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  width: 44px;
  height: 42px;
}

.mobile-nav {
  padding: 14px 20px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--slate-900);
}

.mobile-link {
  display: block;
  padding: 11px 0;
  color: #dbeafe;
}

.mobile-link.is-active,
.mobile-link:hover {
  color: #93c5fd;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-950);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.card-tags,
.detail-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-cloud span {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.section-more,
.category-panel-head a,
.side-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  padding: 13px 26px;
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.32);
}

.primary-button:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
}

.ghost-button {
  padding: 12px 24px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.52);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 36px;
  background: var(--white);
}

.quick-channel {
  margin-top: -32px;
  position: relative;
  z-index: 3;
  padding: 0 20px;
}

.quick-channel-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-channel a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.quick-channel a:hover {
  color: var(--white);
  background: var(--blue-600);
  transform: translateY(-2px);
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 20px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--blue-600);
}

.section-more:hover {
  color: var(--blue-700);
  transform: translateX(2px);
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.movie-card a {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--slate-800);
}

.movie-card-large .card-poster {
  aspect-ratio: 16 / 9;
}

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.35);
  font-weight: 800;
}

.card-body {
  padding: 17px;
}

.card-meta,
.card-score,
.detail-stat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta span:first-child {
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--blue-600);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--gray-600);
  background: var(--gray-100);
  font-size: 12px;
}

.card-score {
  margin-top: 14px;
  justify-content: space-between;
}

.card-score span:first-child,
.detail-stat span:first-child {
  color: var(--yellow-500);
  font-weight: 800;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 360px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.movie-card-wide {
  scroll-snap-align: start;
}

.movie-card-wide a {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 190px;
}

.movie-card-wide .card-poster {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card-wide .card-body {
  display: flex;
  flex-direction: column;
}

.feature-strip {
  max-width: 1240px;
  margin-top: 12px;
  border-radius: 28px;
  background: linear-gradient(135deg, #f1f5f9, #eff6ff);
}

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

.category-panel,
.side-card,
.player-card,
.detail-content,
.category-card,
.filter-bar {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.category-panel {
  padding: 22px;
}

.category-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-panel-head h3 {
  margin: 0 0 7px;
  font-size: 24px;
}

.category-panel-head p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.65;
}

.category-panel-head a,
.side-card a {
  padding: 9px 14px;
  color: var(--blue-600);
  background: var(--blue-100);
  white-space: nowrap;
}

.category-panel-head a:hover,
.side-card a:hover {
  color: var(--white);
  background: var(--blue-600);
}

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

.ranking-block {
  margin-bottom: 40px;
}

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

.ranking-list .movie-card-wide a {
  grid-template-columns: 190px 1fr;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.45), transparent 34%), linear-gradient(120deg, var(--slate-900), var(--slate-800), var(--slate-900));
  padding: 64px 20px;
}

.compact-hero {
  padding: 54px 20px;
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #bfdbfe;
  font-size: 14px;
}

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

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

.category-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
  background: var(--slate-800);
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card-body p {
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-card-body span {
  color: var(--blue-600);
  font-weight: 800;
}

.filter-bar {
  max-width: 1180px;
  margin: -28px auto 0;
  position: relative;
  z-index: 3;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.empty-state {
  padding: 52px 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 18px;
}

.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px 0;
}

.detail-breadcrumb {
  color: var(--gray-500);
  margin-bottom: 20px;
}

.detail-breadcrumb a:hover {
  color: var(--blue-600);
}

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

.detail-main {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  background: var(--slate-950);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-start {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.56));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue-600);
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.34);
  font-size: 28px;
  transform: translateX(2px);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  margin-top: 22px;
  padding: 28px;
}

.detail-content .detail-tags span {
  color: var(--blue-700);
  background: var(--blue-100);
  font-weight: 700;
}

.detail-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-stat {
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.detail-content h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.detail-content p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.9;
}

.tag-cloud {
  margin-top: 28px;
}

.tag-cloud span {
  color: var(--gray-700);
  background: var(--gray-100);
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-poster {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--slate-800);
}

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

.side-card {
  padding: 22px;
  display: grid;
  gap: 12px;
  position: sticky;
  top: 88px;
}

.side-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-main p {
  max-width: 620px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 20px;
  text-align: center;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

  .detail-side {
    grid-template-columns: 260px 1fr;
  }

  .side-card {
    position: static;
  }
}

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

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

  .hero-carousel {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .large-grid,
  .category-showcase,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .horizontal-scroll {
    grid-auto-columns: 310px;
  }

  .movie-card-wide a,
  .ranking-list .movie-card-wide a {
    grid-template-columns: 130px 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    margin-left: 20px;
    margin-right: 20px;
  }

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

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

@media (max-width: 520px) {
  .top-nav {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 16px;
  }

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

  .movie-card-wide a,
  .ranking-list .movie-card-wide a {
    grid-template-columns: 112px 1fr;
    min-height: 170px;
  }

  .card-body {
    padding: 14px;
  }

  .card-tags {
    display: none;
  }

  .detail-content {
    padding: 22px;
  }
}
