:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --brand-soft: rgba(245, 158, 11, 0.16);
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #f97316);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.35);
  font-weight: 900;
}

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

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

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

.desktop-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(148, 163, 184, 0.14);
}

.header-search {
  display: flex;
  overflow: hidden;
  width: 268px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
}

.header-search input,
.mobile-nav input,
.inline-filter input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  flex: 1;
  padding: 10px 14px;
}

.header-search button,
.inline-filter button,
.mobile-nav button {
  border: 0;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  transition: 0.2s ease;
}

.header-search button {
  padding: 0 16px;
}

.header-search button:hover,
.inline-filter button:hover,
.mobile-nav button:hover,
.primary-button:hover {
  background: var(--brand-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 12px 14px;
}

.mobile-nav form {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-nav input {
  flex: 1;
  padding: 12px 14px;
}

.mobile-nav button {
  padding: 0 18px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 34%, rgba(2, 6, 23, 0.18) 70%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 45%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  margin: 72px auto 0;
  transform: translateX(calc((min(1180px, 100vw - 32px) - min(680px, 100vw - 32px)) / -2));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 660px;
  margin: 0 0 22px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 640px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.movie-card-meta,
.ranking-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.ranking-info div span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(15, 23, 42, 0.58);
}

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

.hero-tags {
  margin: 18px 0 30px;
}

.hero-tags span,
.detail-tags span,
.movie-card-tags span {
  border-radius: 999px;
  color: #fcd34d;
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 11px;
}

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

.primary-button,
.secondary-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-button {
  padding: 14px 26px;
  color: #111827;
  background: var(--brand);
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.24);
}

.secondary-button {
  padding: 13px 24px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(15, 23, 42, 0.6);
}

.secondary-button:hover {
  background: rgba(148, 163, 184, 0.16);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 110px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-prev,
.hero-next {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 28px;
  transition: 0.2s ease;
}

.hero-prev:hover,
.hero-next:hover {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.2);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.34);
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  border-radius: 999px;
  background: var(--brand);
}

.section {
  padding: 58px 0;
}

.section-overlap {
  position: relative;
  z-index: 5;
  margin-top: -70px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-copy h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head.small h2 {
  font-size: 28px;
}

.text-link {
  padding: 10px 15px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
}

.text-link:hover {
  background: rgba(245, 158, 11, 0.16);
}

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

.channel-card,
.category-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 45%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.channel-card {
  min-height: 150px;
  padding: 22px;
}

.category-tile {
  min-height: 190px;
  padding: 28px;
}

.channel-card:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.45);
}

.channel-card span,
.category-tile span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.channel-card strong,
.category-tile h2 {
  display: block;
  margin: 14px 0 10px;
  color: #fff;
  font-size: 22px;
  line-height: 1.2;
}

.channel-card em,
.category-tile p {
  color: var(--muted);
  font-style: normal;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  transition: 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(15, 23, 42, 0.9);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.poster-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.76) 100%);
}

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-year {
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: var(--brand);
  transform: translateY(8px);
  opacity: 0;
  transition: 0.25s ease;
}

.movie-card:hover .poster-play {
  transform: translateY(0);
  opacity: 1;
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: 0.2s ease;
}

.movie-card-title:hover {
  color: #fcd34d;
}

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

.movie-card-meta {
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 12px;
}

.movie-card-tags {
  margin-top: 12px;
}

.movie-card-tags span {
  padding: 4px 8px;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 30px 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.38);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: rgba(245, 158, 11, 0.11);
}

.rank-item span {
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em {
  color: var(--muted-2);
  font-style: normal;
  font-size: 12px;
}

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

.page-hero,
.detail-hero {
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.18), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(36px, 7vw, 66px);
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

.inline-filter {
  display: flex;
  overflow: hidden;
  max-width: 620px;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.inline-filter input {
  flex: 1;
  padding: 15px 18px;
}

.inline-filter button {
  padding: 0 22px;
}

.category-tile-grid {
  margin-top: 28px;
  padding-bottom: 58px;
}

.ranking-list-page {
  display: grid;
  gap: 14px;
  padding: 34px 0 70px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-num {
  color: var(--brand);
  font-size: 30px;
  font-weight: 1000;
  text-align: center;
}

.ranking-poster img {
  height: 126px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-info a {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

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

.ranking-watch {
  border-radius: 999px;
  padding: 10px 18px;
  color: #111827;
  background: var(--brand);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fcd34d;
}

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

.detail-poster img {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
}

.detail-one-line {
  max-width: 780px;
  margin: 20px 0;
  color: #cbd5e1;
  font-size: 20px;
}

.detail-tags {
  margin: 20px 0 28px;
}

.watch-section {
  padding-bottom: 32px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 22rem),
    rgba(2, 6, 23, 0.28);
  transition: 0.2s ease;
}

.player-mask span {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.35);
  font-size: 36px;
}

.player-card.is-playing .player-mask {
  opacity: 0;
  pointer-events: none;
}

.detail-copy {
  max-width: 980px;
}

.detail-copy h2 {
  margin-top: 0;
  color: #fff;
  font-size: 32px;
}

.detail-copy p {
  margin: 10px 0 28px;
  color: #cbd5e1;
  font-size: 18px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.98));
}

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

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
}

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

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: #fcd34d;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px 24px;
  color: var(--muted-2);
  text-align: center;
}

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

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

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

  .rank-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero {
    min-height: 660px;
  }

  .hero-content {
    width: min(100% - 32px, 680px);
    margin-top: 64px;
    transform: none;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.62) 0%, rgba(2, 6, 23, 0.86) 48%, #020617 100%);
  }

  .hero-controls {
    right: 16px;
    bottom: 42px;
    left: 16px;
    justify-content: space-between;
  }

  .section {
    padding: 40px 0;
  }

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

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

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

  .movie-card-title {
    min-height: 43px;
    font-size: 15px;
  }

  .movie-card-body p {
    font-size: 13px;
  }

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

  .page-hero,
  .detail-hero {
    border-radius: 24px;
  }

  .inline-filter {
    flex-direction: column;
  }

  .inline-filter button {
    padding: 12px 18px;
  }

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

  .ranking-watch {
    grid-column: 2 / -1;
    text-align: center;
  }

  .ranking-poster img {
    height: 104px;
  }

  .ranking-info a {
    font-size: 17px;
  }

  .ranking-info p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .compact-grid,
  .channel-grid,
  .category-tile-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .player-mask span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
