:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.55);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-strong: #d97706;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.15), transparent 28rem),
    radial-gradient(circle at 78% 18%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  backdrop-filter: blur(16px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

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

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

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

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

.brand-text {
  display: grid;
  line-height: 1.15;
}

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

.brand-text small {
  margin-top: 3px;
  color: rgba(245, 158, 11, 0.86);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: #cbd5e1;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.88);
  color: #fff;
  padding: 11px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 3px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.98);
}

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

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

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

.hero-slides {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.36) 100%);
}

.hero-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 130px 0 76px;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.78;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.20);
}

.hero-tags span {
  padding: 7px 13px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 10px;
  font-size: 12px;
}

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

.btn-primary,
.btn-secondary,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
  padding: 0 22px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.btn-secondary {
  padding: 0 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.rank-link:hover .rank-action {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.24s ease, background 0.24s ease;
}

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

.quick-search {
  margin-top: -44px;
  position: relative;
  z-index: 10;
}

.quick-search form,
.filter-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search form {
  grid-template-columns: 1fr auto;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 15px;
  outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.70);
}

.quick-search button {
  min-height: 48px;
  border: 0;
}

.page-shell {
  padding: 110px 0 32px;
}

.page-title {
  margin: 0 0 34px;
}

.page-title h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.12;
}

.page-title p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
}

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

.section-head a {
  color: var(--amber);
  font-weight: 800;
}

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

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

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

.movie-card-link {
  display: grid;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.20);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 26px 55px rgba(0, 0, 0, 0.36);
}

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

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

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.70) 0%, transparent 58%);
}

.movie-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 999px;
  color: #111827;
  background: rgba(245, 158, 11, 0.96);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-year {
  position: absolute;
  z-index: 4;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.movie-info strong {
  font-size: 18px;
  line-height: 1.35;
}

.movie-info em,
.rank-content em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.movie-meta,
.rank-content small {
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
}

.compact .movie-info strong {
  font-size: 16px;
}

.feature-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

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

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.52);
}

.category-card strong {
  font-size: 22px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.65;
}

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

.filter-panel {
  grid-template-columns: 2fr repeat(3, 1fr);
  margin-bottom: 26px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  margin: 22px 0;
  color: var(--muted);
  text-align: center;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 64px 72px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.rank-link:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.50);
  background: rgba(30, 41, 59, 0.78);
}

.rank-number {
  color: var(--amber);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-link img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-content strong {
  font-size: 18px;
}

.rank-action {
  padding: 0 16px;
  color: #111827;
  background: #fbbf24;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--subtle);
}

.breadcrumbs a {
  color: var(--amber);
}

.player-card,
.detail-card,
.sidebar-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.24);
  cursor: pointer;
}

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

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.08));
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.player-button {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  display: none;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.82);
}

.player-message.is-visible {
  display: block;
}

.detail-card,
.sidebar-card {
  padding: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

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

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.text-block {
  margin-top: 22px;
}

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

.text-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
  font-size: 16px;
}

.sidebar-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: #0f172a;
  margin-bottom: 18px;
}

.sidebar-list {
  display: grid;
  gap: 11px;
  color: var(--muted);
}

.sidebar-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding-bottom: 10px;
}

.sidebar-list strong {
  color: #fff;
}

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

.site-footer {
  margin-top: 78px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.68);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.footer-brand p,
.footer-links a {
  color: var(--muted);
  line-height: 1.7;
}

.footer-links h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

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

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

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

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

  .sidebar-card {
    max-width: 420px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 640px;
    height: auto;
  }

  .hero-inner {
    padding-top: 120px;
  }

  .hero-control {
    display: none;
  }

  .quick-search form,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-link {
    grid-template-columns: 48px 58px 1fr;
  }

  .rank-link img {
    width: 58px;
    height: 78px;
  }

  .rank-action {
    display: none;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .hero-inner,
  .section-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-tags span {
    padding: 6px 10px;
  }

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

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

  .feature-panel,
  .detail-card,
  .sidebar-card {
    padding: 18px;
  }

  .rank-content em,
  .rank-content small {
    display: none;
  }
}
