:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.62);
  --panel-strong: #111827;
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft-text: #cbd5e1;
  --line: rgba(148, 163, 184, 0.2);
  --amber: #f59e0b;
  --orange: #ea580c;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
  color: #ffffff;
  font-size: 18px;
}

.brand-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  font-weight: 700;
  color: var(--soft-text);
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fbbf24;
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.top-search input {
  width: 180px;
}

.top-search button,
.mobile-search button,
.filter-panel select {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.7);
}

.mobile-nav.is-open {
  display: block;
}

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

.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-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1180px) / 2));
}

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

.hero-tags span,
.hero-tags a,
.detail-meta span,
.tag-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-tags span:first-child {
  background: var(--amber);
}

.hero-content h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 20px;
  color: var(--soft-text);
  font-size: 19px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 28px;
}

.primary-action,
.ghost-action,
.page-actions a,
.section-more,
.category-block-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.ghost-action,
.page-actions a,
.section-more,
.category-block-head a {
  color: #ffffff;
  border: 1px solid rgba(248, 250, 252, 0.16);
  background: rgba(15, 23, 42, 0.6);
}

.primary-action:hover,
.ghost-action:hover,
.page-actions a:hover,
.section-more:hover,
.category-block-head a:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 26px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 42px;
  background: var(--amber);
}

.content-section,
.page-shell,
.detail-content,
.player-section,
.related-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.soft-panel {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: rgba(30, 41, 59, 0.22);
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading.with-actions,
.category-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.category-block h2,
.ranking-page-panel h2,
.story-card h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
}

.section-heading p,
.category-block p,
.story-card p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

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

.compact-card .poster-box {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--amber);
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.movie-title,
.movie-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-title {
  min-height: 2.8em;
  -webkit-line-clamp: 2;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  transition: color 0.2s ease;
}

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

.movie-desc {
  min-height: 3.2em;
  margin: 10px 0 14px;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-meta span {
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--muted);
  font-size: 12px;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.movie-rail .movie-card {
  flex: 0 0 250px;
}

.rail-actions {
  display: flex;
  gap: 8px;
}

.rail-actions button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.9);
  font-size: 28px;
  cursor: pointer;
}

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

.category-tile,
.category-block,
.ranking-page-panel,
.story-card,
.filter-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-tile {
  display: grid;
  gap: 14px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

.category-name {
  font-size: 22px;
  font-weight: 900;
}

.category-intro {
  color: var(--muted);
  line-height: 1.7;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.4);
}

.ranking-number {
  color: #fbbf24;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 86px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

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

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

.ranking-copy em {
  color: var(--muted);
  font-style: normal;
}

.ranking-copy small,
.heat-value {
  color: #64748b;
}

.heat-value {
  font-weight: 800;
}

.page-shell {
  padding: 44px 0 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  padding: 58px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(30, 41, 59, 0.82)), rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 740px;
  font-size: 18px;
}

.eyebrow {
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.filter-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  padding: 16px;
}

.filter-panel input {
  flex: 1 1 auto;
  min-width: 180px;
  border-radius: 999px;
  padding: 13px 16px;
  background: rgba(15, 23, 42, 0.82);
}

.filter-panel select {
  min-width: 140px;
  background: rgba(15, 23, 42, 0.82);
}

.category-page-list {
  display: grid;
  gap: 24px;
}

.category-block {
  padding: 24px;
}

.detail-shell {
  padding-bottom: 30px;
}

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

.detail-hero-inner {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

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

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

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

.breadcrumb a {
  color: #fbbf24;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: var(--soft-text);
  font-size: 19px;
  line-height: 1.8;
}

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

.tag-row {
  margin-bottom: 26px;
}

.player-section {
  margin-top: -80px;
  position: relative;
  z-index: 4;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25));
  cursor: pointer;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.35);
  font-size: 30px;
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 42px);
}

.player-cover em {
  color: var(--soft-text);
  font-style: normal;
}

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

.story-card {
  padding: 28px;
}

.story-card p {
  color: var(--soft-text);
  font-size: 17px;
}

[data-card].is-hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

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

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 56px;
  }

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

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 100px 0 130px;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }

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

  .filter-panel {
    flex-wrap: wrap;
  }

  .filter-panel input,
  .filter-panel select {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  .mobile-nav,
  .content-section,
  .page-shell,
  .detail-content,
  .player-section,
  .related-section {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel {
    height: 680px;
  }

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

  .primary-action,
  .ghost-action,
  .page-actions a {
    width: 100%;
  }

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

  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-title {
    font-size: 15px;
  }

  .movie-desc {
    font-size: 13px;
  }

  .page-hero {
    padding: 34px 22px;
  }

  .ranking-item {
    grid-template-columns: 40px 70px minmax(0, 1fr);
  }

  .heat-value {
    display: none;
  }

  .section-heading.with-actions,
  .category-block-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
