:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.76);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --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 top left, rgba(245, 158, 11, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.35);
}

.brand-name {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #e2e8f0;
  font-weight: 650;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.mobile-nav-link:hover {
  color: #fbbf24;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: rgba(51, 65, 85, 0.8);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 700ms ease, transform 1100ms ease;
  pointer-events: none;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 44%, rgba(2, 6, 23, 0.4) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 820px;
  margin: 22px 0 20px;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  max-width: 720px;
  color: #d1d5db;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
}

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

.hero-tags span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 0.78rem;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.32);
}

.ghost-button {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(248, 250, 252, 0.16);
  backdrop-filter: blur(14px);
}

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

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.8rem;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.search-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 0;
  position: relative;
  z-index: 4;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.search-strip p {
  margin: 0;
  color: var(--muted-strong);
}

.section-stack {
  padding: 72px 0;
  display: grid;
  gap: 80px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-title span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

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

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

.movie-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.36);
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.movie-card.compact .movie-poster {
  aspect-ratio: 3 / 4;
}

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border-radius: 22px;
  padding: 22px;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}

.category-tile::before,
.category-overview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.88));
}

.category-tile span,
.category-tile strong,
.category-overview-content {
  position: relative;
  z-index: 1;
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong {
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.65;
}

.inner-page {
  padding: 54px 0 80px;
}

.page-hero {
  border-radius: 28px;
  padding: clamp(36px, 7vw, 76px);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.1rem;
  line-height: 1.8;
}

.category-overview-grid {
  margin-top: 34px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-overview-card {
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}

.category-overview-content h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.category-overview-content p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.7;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.category-links a {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(0, 0, 0, 0.4);
  font-size: 0.78rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  gap: 14px;
  margin: 28px 0 32px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--border);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.72);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.movie-card-wrapper.is-hidden {
  display: none;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 72px 86px 1fr;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--border);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rank-link:hover {
  transform: translateX(6px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(51, 65, 85, 0.75);
}

.rank-number {
  color: #fbbf24;
  font-size: 1.4rem;
  font-weight: 900;
}

.rank-link img {
  width: 86px;
  height: 80px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info {
  display: grid;
  gap: 8px;
}

.rank-info strong {
  font-size: 1.1rem;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  background-position: center;
  background-size: cover;
}

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

.detail-hero-content {
  position: relative;
  z-index: 1;
  padding: 38px 0 74px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
  font-size: 0.92rem;
  margin-bottom: 36px;
}

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

.detail-title-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

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

.detail-title-main h1 {
  margin: 16px 0;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-title-main p {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 1.12rem;
  line-height: 1.8;
}

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

.detail-content {
  display: grid;
  gap: 26px;
  margin-top: -58px;
  position: relative;
  z-index: 3;
  padding-bottom: 76px;
}

.player-section,
.detail-panel {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.player-section {
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.player-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  box-shadow: 0 22px 48px rgba(249, 115, 22, 0.42);
  cursor: pointer;
  font-size: 2rem;
}

.player-overlay strong {
  font-size: 1.35rem;
}

.player-overlay span {
  color: #fde68a;
  font-weight: 700;
}

.detail-panel {
  padding: clamp(22px, 4vw, 34px);
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 1.6rem;
}

.detail-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 1.02rem;
}

.meta-panel dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.meta-panel div {
  padding: 16px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.7);
}

.meta-panel dt {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.meta-panel dd {
  margin: 0;
  font-weight: 800;
}

.inline-title {
  margin-bottom: 18px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.9));
}

.footer-shell {
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-about p,
.site-footer a,
.footer-bottom {
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
  font-size: 0.9rem;
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

  .detail-title-grid {
    grid-template-columns: 190px 1fr;
  }

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

@media (max-width: 720px) {
  .nav-shell {
    height: 64px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-content {
    padding: 88px 0 110px;
  }

  .hero-actions,
  .search-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .search-strip {
    margin-top: -28px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .category-movie-grid,
  .footer-grid,
  .filter-panel,
  .detail-title-grid,
  .meta-panel dl {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(230px, 72vw);
  }

  .rank-link {
    grid-template-columns: 48px 72px 1fr;
    gap: 10px;
    padding: 10px;
  }

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