:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-bright: #cbd5e1;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.16);
  --accent-strong: #fb923c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(30, 41, 59, 0.74), transparent 28rem),
    var(--bg);
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  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: 900;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  white-space: nowrap;
  color: var(--muted-bright);
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 9px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 2px;
}

.hero-carousel {
  position: relative;
  height: min(680px, calc(100vh - 72px));
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-slide::before,
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-slide::before {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 42%);
}

.hero-slide::after {
  background: radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.32), transparent 34rem);
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  padding-bottom: 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(249, 115, 22, 0.36);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(249, 115, 22, 0.12);
  font-size: 14px;
  font-weight: 800;
}

.hero-slide h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.hero-slide p {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted-bright);
  line-height: 1.8;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.detail-tags span {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.66);
  color: var(--muted-bright);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

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

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

.ghost-button,
.section-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.58);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 156px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.hero-controls button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
}

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

.hero-dots button {
  width: 10px;
  min-width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
}

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

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 6;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
}

.hero-thumb img {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
}

.hero-thumb span {
  min-width: 0;
  color: var(--muted-bright);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.section-heading h2,
.ranking-panel h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 16px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

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

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

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

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.8), transparent 52%);
}

.play-dot,
.rank-badge {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 2;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.35);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 42px;
  height: 34px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, var(--accent));
  font-size: 14px;
}

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

.movie-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card p {
  margin: 0 0 13px;
  min-height: 48px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

.compact-card h3 {
  font-size: 15px;
}

.compact-card p {
  display: none;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}

.category-card img,
.category-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-overlay {
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.36)),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.34), transparent 18rem);
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.category-card em {
  margin-top: 8px;
  color: var(--muted-bright);
  font-style: normal;
  line-height: 1.55;
  font-size: 13px;
}

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

.ranking-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  padding: 20px;
}

.sticky-panel {
  position: sticky;
  top: 92px;
}

.ranking-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ranking-panel-head a {
  color: var(--accent-strong);
  font-weight: 900;
  font-size: 14px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 40px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
  background: rgba(249, 115, 22, 0.11);
  border-color: rgba(249, 115, 22, 0.28);
}

.ranking-number {
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 900;
}

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

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.ranking-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.page-hero {
  position: relative;
  min-height: 370px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 24% 24%, rgba(249, 115, 22, 0.26), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero p,
.detail-copy p {
  max-width: 760px;
  color: var(--muted-bright);
  font-size: 18px;
  line-height: 1.8;
}

.category-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.category-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.94));
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 34px 0 64px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 28rem),
    var(--bg-soft);
}

.breadcrumb,
.detail-head {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

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

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

.detail-poster {
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.detail-copy p {
  margin: 18px 0 18px;
}

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

.player-card,
.story-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  font-size: 30px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.36);
}

.player-overlay strong {
  display: block;
  text-align: center;
  font-size: clamp(24px, 4vw, 44px);
  letter-spacing: -0.05em;
}

.player-overlay span {
  display: block;
  margin-top: 8px;
  text-align: center;
  color: var(--muted-bright);
}

.detail-text-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.story-card {
  padding: 26px;
}

.story-card p {
  color: var(--muted-bright);
  line-height: 1.95;
  font-size: 16px;
}

.detail-tags {
  grid-column: 1 / -1;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

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

[hidden] {
  display: none !important;
}

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

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

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

  .sticky-panel {
    position: static;
  }

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .mobile-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: 14px;
  }

  .hero-carousel {
    min-height: 690px;
  }

  .hero-slide-content {
    padding-bottom: 220px;
  }

  .hero-controls {
    bottom: 208px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    bottom: 18px;
  }

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }

  .filter-panel,
  .detail-head,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

  .filter-selects {
    grid-template-columns: 1fr 1fr;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .content-section {
    padding: 40px 0;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .ranking-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .filter-selects {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    display: none;
  }

  .tag-row {
    display: none;
  }

  .page-hero {
    min-height: 300px;
  }

  .big-play-button {
    width: 68px;
    height: 68px;
    font-size: 24px;
  }
}

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

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