:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 36rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.content-section,
.hero-content,
.detail-inner,
.page-hero {
  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;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #fde68a);
  color: #0f172a;
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.32);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #fbbf24, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link.active,
.mobile-link:hover {
  color: var(--accent);
}

.header-search,
.mobile-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.page-search input,
.filter-input {
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
  padding: 10px 16px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #0f172a;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  cursor: pointer;
}

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

.mobile-panel.open {
  display: block;
}

.mobile-search input {
  width: 100%;
  padding: 12px 16px;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 10px 4px;
  color: var(--muted);
}

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 50%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
}

.hero-labels,
.hero-tags,
.tag-row,
.detail-meta,
.card-meta,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-labels span,
.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span,
.filter-chips button {
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  color: var(--muted);
}

.hero-labels span {
  padding: 8px 14px;
  color: #0f172a;
  background: var(--accent);
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.52);
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span,
.filter-chips button {
  padding: 6px 11px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fde68a);
  box-shadow: 0 16px 32px rgba(251, 191, 36, 0.25);
}

.primary-btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-btn,
.section-more {
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--accent);
  background: rgba(15, 23, 42, 0.52);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-arrow.left {
  left: 24px;
}

.hero-arrow.right {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--accent);
}

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

.panel-section {
  width: min(1180px, calc(100% - 32px));
  margin-top: 20px;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.56));
  box-shadow: var(--shadow);
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-card h2,
.side-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

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

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

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.horizontal .poster-link,
.movie-card.rank-row .poster-link,
.movie-card.rank-row-full .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 55%);
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: var(--accent);
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.34);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fde68a);
  font-size: 16px;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: var(--accent);
}

.card-line {
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

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

.tag-row {
  gap: 6px;
}

.tag-row span {
  border-color: rgba(148, 163, 184, 0.16);
  color: var(--soft);
  padding: 3px 8px;
  font-size: 12px;
}

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

.ranking-panel,
.side-card,
.text-card,
.player-card,
.category-overview-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.compact-heading {
  margin-bottom: 18px;
}

.rank-list,
.rank-full-list {
  display: grid;
  gap: 14px;
}

.movie-card.rank-row,
.movie-card.rank-row-full {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0;
}

.movie-card.rank-row .card-line,
.movie-card.rank-row .tag-row,
.movie-card.rank-row-full .tag-row {
  display: none;
}

.movie-card.rank-row .card-body,
.movie-card.rank-row-full .card-body {
  padding: 14px;
}

.movie-card.rank-row-full {
  grid-template-columns: 180px minmax(0, 1fr);
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.15), transparent 12rem),
    rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.36);
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 800;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--soft);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 72px 0;
}

.slim-hero,
.category-hero {
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 740px;
  color: var(--muted);
  font-size: 18px;
}

.category-overview {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
  display: grid;
  gap: 28px;
}

.category-overview-card {
  padding: 28px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.filter-section {
  padding-top: 38px;
}

.filter-bar {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-input,
.page-search input {
  width: 100%;
  padding: 14px 18px;
}

.filter-chips button {
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #0f172a;
  background: var(--accent);
}

.detail-hero {
  min-height: 620px;
  display: flex;
  align-items: center;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.42)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.15));
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  padding: 80px 0;
}

.detail-poster {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  margin-bottom: 16px;
}

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

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

.detail-line {
  max-width: 820px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-tags {
  margin-bottom: 18px;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  padding: 16px;
}

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

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.08));
  cursor: pointer;
  z-index: 3;
}

.player-card.is-playing .video-cover {
  display: none;
}

.video-play {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fde68a);
  box-shadow: 0 20px 58px rgba(251, 191, 36, 0.38);
  font-size: 32px;
}

.text-card,
.side-card {
  padding: 28px;
}

.text-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.text-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.side-card {
  position: sticky;
  top: 96px;
}

.side-card dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.side-card dt {
  color: var(--soft);
  font-size: 13px;
}

.side-card dd {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 700;
}

.side-card a {
  color: var(--accent);
}

.page-search {
  max-width: 760px;
  margin-top: 24px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 32px;
  padding: 42px 0;
  color: var(--soft);
}

.footer-brand {
  color: var(--accent);
  font-size: 20px;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
  border-color: rgba(251, 191, 36, 0.38);
}

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

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

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

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

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

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

  .ranking-panel,
  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .brand-text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    padding-bottom: 54px;
  }

  .panel-section,
  .category-overview-card {
    padding: 24px;
    border-radius: 24px;
  }

  .section-heading,
  .category-overview-head,
  .footer-inner {
    display: block;
  }

  .section-more,
  .category-overview-head .primary-btn {
    margin-top: 14px;
  }

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

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

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

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

  .movie-card.rank-row,
  .movie-card.rank-row-full {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 20px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 38px;
  }

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