:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #0b1120;
  --panel: rgba(17, 24, 39, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(249, 115, 22, 0.36);
  --text: #f9fafb;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --orange: #f97316;
  --red: #dc2626;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.16), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(220, 38, 38, 0.16), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 70%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.28);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid white;
  transform: translateX(2px);
}

.brand-text,
.footer-brand {
  font-size: 20px;
  background: linear-gradient(90deg, #fb923c, #ef4444);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #d4d4d8;
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(249, 115, 22, 0.13);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.8);
  color: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.96);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide > img,
.page-hero > img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.94) 28%, rgba(2, 6, 23, 0.44) 70%, rgba(2, 6, 23, 0.75) 100%),
    linear-gradient(0deg, #030712 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 78vh;
  display: flex;
  align-items: center;
  padding: 84px 0 110px;
}

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0;
  color: #d4d4d8;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.detail-tags,
.card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(17, 24, 39, 0.58);
  color: #e5e7eb;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: 0.2s ease;
  cursor: pointer;
}

.primary-btn,
.home-search button {
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.28);
}

.primary-btn:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 44px rgba(249, 115, 22, 0.36);
}

.ghost-btn {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.ghost-btn:hover {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.42);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.7);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.quick-search {
  position: relative;
  z-index: 8;
  margin-top: -42px;
}

.search-strip {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip h2,
.search-strip p,
.section-head h2,
.category-card h2,
.ranking-panel h2,
.text-panel h2 {
  margin: 0;
}

.search-strip p {
  margin-top: 8px;
  color: var(--muted);
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.72);
  padding: 0 16px;
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.surface-block {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(3, 7, 18, 0.2));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head.compact {
  margin-bottom: 20px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-link {
  color: #fb923c;
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(249, 115, 22, 0.15);
}

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

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--red));
  opacity: 0;
  transition: 0.25s ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

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

.rating-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(3, 7, 18, 0.72);
  color: #fbbf24;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.movie-info {
  padding: 16px;
}

.movie-info h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h2 a:hover {
  color: #fb923c;
}

.movie-meta,
.movie-one-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-one-line {
  color: #d4d4d8;
}

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

.card-tags .tag-chip {
  padding: 5px 9px;
  font-size: 12px;
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.18);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: start;
}

.ranking-panel,
.category-card,
.text-panel,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.7);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.ranking-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.ranking-panel.large {
  position: static;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.4);
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.rank-row:hover {
  border-color: var(--line-strong);
  background: rgba(249, 115, 22, 0.1);
}

.rank-number {
  font-weight: 900;
  color: #fb923c;
}

.rank-row img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.rank-score {
  color: #fbbf24;
  font-weight: 900;
}

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

.category-card {
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-card > a {
  display: block;
  min-height: 190px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 42%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.86), rgba(3, 7, 18, 0.9));
}

.category-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  margin-bottom: 16px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.category-card ul {
  list-style: none;
  margin: 0;
  padding: 14px 22px 22px;
  display: grid;
  gap: 8px;
  color: #d4d4d8;
  font-size: 13px;
}

.category-card li a:hover {
  color: #fb923c;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background:
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.28), transparent 34%),
    radial-gradient(circle at 80% 30%, rgba(220, 38, 38, 0.22), transparent 35%),
    linear-gradient(135deg, #0f172a, #030712 70%);
}

.compact-hero .container,
.ranking-hero .hero-content {
  position: relative;
  z-index: 2;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0;
}

.compact-hero h1 {
  max-width: 820px;
}

.compact-hero p {
  max-width: 720px;
}

.page-actions {
  margin-top: 24px;
}

.filter-panel {
  padding: 18px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

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

.empty-state {
  display: none;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px;
}

.empty-state.visible {
  display: block;
}

.stacked-sections {
  display: grid;
  gap: 54px;
}

.category-preview {
  display: grid;
  gap: 18px;
}

.ranking-page-layout {
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  gap: 34px;
  align-items: start;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(2px) saturate(1.1);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.56)),
    linear-gradient(0deg, #030712, transparent 46%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
  padding: 74px 0;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.56);
}

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

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

.breadcrumbs a:hover {
  color: #fb923c;
}

.detail-copy h1 {
  max-width: 860px;
}

.detail-one-line {
  max-width: 820px;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle, rgba(249, 115, 22, 0.18), transparent 35%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.56), rgba(3, 7, 18, 0.2));
  color: white;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  font-size: 34px;
  padding-left: 6px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.text-panel {
  padding: 26px;
}

.text-panel p {
  margin: 16px 0 0;
  color: #d4d4d8;
  line-height: 1.9;
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 34px;
  padding: 46px 0 30px;
}

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

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #d4d4d8;
}

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

.footer-bottom {
  padding: 18px 0 28px;
  color: var(--muted-2);
  font-size: 13px;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: flex;
  }

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

  .hero,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 62px;
  }

  .hero-controls {
    bottom: 22px;
  }

  .hero-arrow {
    display: none;
  }

  .search-strip,
  .filter-panel,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 26px;
  }

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

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

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

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

  .home-search {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .small-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 32px 46px 1fr;
  }

  .rank-score {
    display: none;
  }

  .player-overlay span {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }
}
