:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(30, 41, 59, 0.48);
  --panel-strong: rgba(15, 23, 42, 0.88);
  --line: rgba(51, 65, 85, 0.55);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --rose: #f43f5e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30rem),
    radial-gradient(circle at top right, rgba(244, 63, 94, 0.12), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid rgba(30, 41, 59, 0.72);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.content-section,
.detail-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  color: white;
  font-size: 17px;
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border-radius: 12px;
  transition: 0.22s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.13);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.65);
  color: white;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
}

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

.mobile-link {
  padding: 13px 16px;
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.68) 30%, transparent 75%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2));
  bottom: 84px;
  width: min(760px, calc(100% - 48px));
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  font-size: 14px;
  margin-bottom: 18px;
}

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

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-links a,
.detail-channel a,
.detail-channel em,
.tag-cloud span,
.ranking-tags span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
}

.hero-links a {
  padding: 8px 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.primary-button,
.ghost-button,
.ranking-action,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.22s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: white;
  background: var(--amber);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

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

.ghost-button {
  min-height: 46px;
  padding: 0 24px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2));
  bottom: 94px;
  display: flex;
  gap: 10px;
  z-index: 4;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: var(--amber);
}

.content-section {
  padding: 58px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: #fbbf24;
}

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

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

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

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

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 45%);
  opacity: 0.78;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-duration,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.58);
  color: white;
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.card-duration {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.card-body {
  padding: 12px 2px 0;
}

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

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-body p {
  min-height: 45px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta span {
  padding: 3px 7px;
  font-size: 12px;
}

.category-grid,
.category-list-grid {
  display: grid;
  gap: 20px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: 0.3s ease;
}

.category-tile:hover img {
  opacity: 0.68;
  transform: scale(1.05);
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  padding: 104px 22px 6px;
  font-size: 24px;
  font-weight: 800;
}

.category-tile em {
  padding: 0 22px 22px;
  font-style: normal;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.55;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

.rank-aside,
.side-rank,
.side-poster,
.filter-panel,
.category-card,
.detail-info,
.player-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.38);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.rank-aside {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-aside h2,
.side-rank h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.mini-rank {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.48);
}

.mini-rank:last-child {
  border-bottom: 0;
}

.mini-rank span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.mini-rank strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

.mini-rank em {
  font-style: normal;
  color: #fbbf24;
  font-size: 13px;
}

.page-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 30rem), #020617;
}

.page-hero.small-hero {
  min-height: 320px;
}

.channel-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.7) 45%, rgba(2, 6, 23, 0.25) 100%);
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 52px;
}

.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.04em;
}

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

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a:hover {
  color: #fbbf24;
}

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

.category-card {
  overflow: hidden;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 180px;
  overflow: hidden;
}

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

.category-info {
  padding: 22px;
}

.category-info h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-info p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin-bottom: 28px;
}

.search-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
}

.search-box span {
  color: #fbbf24;
  font-size: 20px;
}

.search-box input,
.filter-select {
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.search-box input {
  width: 100%;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-select {
  min-height: 48px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: rgba(15, 23, 42, 0.74);
}

.filter-select option {
  background: #0f172a;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 92px 62px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.36);
}

.ranking-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
}

.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-number {
  color: #fbbf24;
  font-size: 38px;
  font-weight: 900;
  text-align: center;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-info p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.ranking-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-tags span {
  padding: 5px 9px;
  font-size: 13px;
}

.ranking-action {
  padding: 11px 18px;
  color: white;
  background: rgba(245, 158, 11, 0.88);
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 34px 0 20px;
}

.player-card {
  padding: 10px;
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: black;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: black;
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(15, 23, 42, 0.18));
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  font-size: 34px;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 58px rgba(245, 158, 11, 0.35);
}

.detail-info {
  margin-top: 24px;
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.detail-meta,
.tag-cloud,
.detail-channel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

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

.detail-channel a,
.detail-channel em,
.tag-cloud span {
  padding: 7px 11px;
  font-size: 14px;
  font-style: normal;
}

.detail-channel a {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.detail-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-poster {
  padding: 18px;
}

.side-poster img {
  border-radius: 18px;
  margin-bottom: 16px;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-poster .primary-button {
  width: 100%;
}

.side-rank {
  padding: 20px;
}

.related-section {
  padding-top: 30px;
}

.site-footer {
  margin-top: 52px;
  border-top: 1px solid rgba(30, 41, 59, 0.72);
  background: rgba(2, 6, 23, 0.96);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 28px;
  align-items: center;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-copy {
  color: #64748b;
  font-size: 14px;
}

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

@media (max-width: 1120px) {
  .movie-grid,
  .featured-grid,
  .all-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .split-section,
  .detail-wrap,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-aside,
  .detail-side {
    position: static;
  }
}

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

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

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 30px;
  }

  .content-section {
    padding: 38px 0;
  }

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

  .movie-grid,
  .featured-grid,
  .all-grid,
  .compact-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .horizontal-row {
    grid-auto-columns: 210px;
  }

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

  .filter-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .ranking-action {
    grid-column: 1 / -1;
  }

  .ranking-number {
    font-size: 28px;
  }

  .ranking-info p {
    display: none;
  }

  .detail-info {
    padding: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .all-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
  }

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

  .card-body h3 {
    font-size: 14px;
  }

  .card-body p {
    display: none;
  }

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

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