:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --orange-700: #c2410c;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-400: #fb923c;
  --amber-300: #fcd34d;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 48%, #f8fafc 100%);
}

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

img,
video {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(18px);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
}

.header-inner,
.footer-inner,
.section-block,
.hero-panel,
.detail-hero-inner,
.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-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-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.30);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav a,
.footer-links a,
.quick-links a,
.filter-bar a {
  color: var(--slate-700);
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover,
.quick-links a:hover,
.filter-bar a:hover {
  color: var(--orange-700);
  background: #ffedd5;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--slate-900);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 50px;
  align-items: center;
  padding: 110px calc((100vw - min(1180px, calc(100vw - 32px))) / 2) 138px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-copy {
  max-width: 740px;
  color: #fff;
}

.eyebrow,
.section-title span,
.page-hero span,
.detail-copy .tag-row span:first-child {
  display: inline-flex;
  align-items: center;
  color: var(--orange-400);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 22px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.tag-row span {
  display: inline-flex;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
  box-shadow: 0 18px 35px rgba(234, 88, 12, 0.34);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.20);
}

.hero-poster {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 34px 70px rgba(2, 6, 23, 0.42);
  overflow: hidden;
}

.hero-poster span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 24px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  transform: translateX(-50%);
}

.hero-search {
  display: flex;
  min-height: 58px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
}

.hero-search input,
.filter-bar input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--slate-900);
  border-radius: 999px;
  padding: 0 20px;
  background: #fff;
}

.hero-search button {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 900;
  background: var(--orange-600);
}

.quick-links,
.hero-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quick-links a {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-dots {
  grid-column: 1 / -1;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.30);
}

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

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

.soft-block {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
  background: rgba(255, 247, 237, 0.72);
}

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

.section-title h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title a {
  color: var(--orange-700);
  font-weight: 900;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(249, 115, 22, 0.38);
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background-color: #111827;
  background-size: cover;
  background-position: center;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(234, 88, 12, 0.90);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.card-body strong,
.related-card strong {
  overflow: hidden;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body em,
.related-card em,
.rank-meta,
.rank-info em {
  color: var(--orange-700);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.card-body span:last-child {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.horizontal-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

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

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

.category-card,
.channel-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover,
.channel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.22);
}

.category-card strong,
.channel-card h2 {
  margin: 0;
  font-size: 26px;
}

.category-card span,
.channel-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

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

.channel-card {
  min-height: 300px;
  justify-content: space-between;
}

.channel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.channel-links a {
  max-width: 180px;
  overflow: hidden;
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.14);
}

.ranking-block {
  max-width: none;
  width: 100%;
  padding: 72px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, var(--slate-950), #431407);
}

.light-title h2,
.light-title a {
  color: #fff;
}

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

.rank-item,
.rank-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover,
.rank-row:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.rank-num {
  color: var(--amber-300);
  font-size: 22px;
  font-weight: 950;
}

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

.ranking-list .rank-row {
  grid-template-columns: 64px 84px minmax(0, 1fr) 76px;
  color: var(--slate-900);
  border-color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.92);
}

.ranking-list .rank-row:hover {
  background: #fff7ed;
}

.rank-cover {
  display: block;
  width: 70px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-info strong,
.rank-info span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info span {
  color: var(--slate-600);
}

.rank-score {
  color: var(--orange-700);
  font-size: 20px;
  font-weight: 950;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--slate-950), #7c2d12);
}

.page-hero {
  padding: 92px 0 70px;
}

.compact-hero p {
  max-width: 820px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
  min-height: 48px;
  background: #f8fafc;
}

.prominent-filter {
  position: sticky;
  top: 88px;
  z-index: 20;
}

.detail-hero {
  min-height: 540px;
  padding: 70px 0;
  background-size: cover;
  background-position: center;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 28px;
}

.crumbs a:hover {
  color: var(--orange-400);
}

.detail-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 34px 70px rgba(2, 6, 23, 0.38);
}

.detail-copy h1 {
  color: #fff;
  font-size: clamp(40px, 6vw, 72px);
}

.player-section {
  padding-bottom: 20px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 34px 74px rgba(15, 23, 42, 0.28);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.34), rgba(2, 6, 23, 0.68));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-frame.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  font-size: 34px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
  box-shadow: 0 24px 48px rgba(234, 88, 12, 0.42);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
  gap: 22px;
}

.content-card,
.info-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.info-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card p {
  color: var(--slate-700);
  line-height: 2;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.info-card dt {
  color: var(--slate-500);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 800;
}

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

.related-card {
  display: grid;
  gap: 9px;
}

.related-poster {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background-color: #111827;
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.related-card:hover .related-poster {
  transform: translateY(-4px);
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--slate-950);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0;
}

.footer-logo {
  color: #fff;
}

.footer-inner p {
  max-width: 520px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .hero-poster {
    display: none;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .quick-links {
    justify-content: flex-start;
  }

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-section,
  .hero-track {
    min-height: 720px;
  }

  .hero-slide {
    min-height: 720px;
    padding-bottom: 210px;
  }

  .hero-panel {
    bottom: 22px;
  }

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search input,
  .hero-search button {
    min-height: 48px;
  }

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

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

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ranking-list .rank-row {
    grid-template-columns: 48px 68px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 560px) {
  .section-block,
  .soft-block,
  .ranking-block {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .section-title,
  .filter-bar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 24px;
  }

  .movie-grid,
  .category-grid,
  .channel-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-list {
    grid-auto-columns: minmax(210px, 80%);
  }

  .rank-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2;
  }
}
