:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.62);
  --panel-deep: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #ea580c;
  --radius: 18px;
  --shadow: 0 24px 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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.97));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.34);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 1.42rem;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--muted-strong);
  font-weight: 650;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.top-search,
.mobile-search,
.search-main-form,
.filter-box {
  display: flex;
  align-items: center;
  background: rgba(51, 65, 85, 0.62);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.top-search {
  width: 310px;
}

.top-search input,
.mobile-search input,
.search-main-form input,
.filter-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 12px 16px;
}

.top-search input::placeholder,
.mobile-search input::placeholder,
.search-main-form input::placeholder,
.filter-box input::placeholder {
  color: #94a3b8;
}

.top-search button,
.mobile-search button,
.search-main-form button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  padding: 12px 18px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.8);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

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

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.36);
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
  display: grid;
  gap: 18px;
}

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

.hero-pills span,
.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 11px;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.12rem;
  max-width: 620px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #e2e8f0;
}

.hero-meta span + span::before {
  content: "•";
  margin-right: 12px;
  color: #64748b;
}

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

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

.primary-btn {
  color: #ffffff;
  padding: 12px 26px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 36px rgba(234, 88, 12, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 48px rgba(234, 88, 12, 0.38);
}

.ghost-btn {
  padding: 11px 22px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.ghost-btn:hover,
.section-more:hover,
.text-link:hover {
  color: #fbbf24;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

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

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

.soft-panel {
  background: rgba(30, 41, 59, 0.28);
}

.section-heading,
.rail-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.rail-heading h2,
.player-section h2,
.detail-article h2,
.detail-side h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.15;
}

.section-heading p,
.detail-article p,
.category-card-large p,
.footer-grid p,
.page-hero p {
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #1e293b;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

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

.movie-card.compact .movie-thumb {
  aspect-ratio: 16 / 10;
}

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

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.04) 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-thumb::after {
  opacity: 1;
}

.movie-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 10px;
  padding: 4px 9px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(8px);
}

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

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

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

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

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

.movie-card-body p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta span {
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 4px 8px;
  background: rgba(51, 65, 85, 0.92);
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.rail-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: #334155;
  cursor: pointer;
}

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

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

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

.category-preview-grid,
.category-large-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.category-preview-card,
.category-card-large,
.ranking-panel,
.detail-side,
.detail-article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.category-preview-card {
  padding: 20px;
}

.category-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.category-preview-head h3 {
  margin: 0;
  font-size: 1.3rem;
}

.category-preview-head a:last-child,
.text-link,
.section-more {
  color: #fbbf24;
  font-weight: 800;
}

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

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.rank-number {
  flex: 0 0 42px;
  color: #fbbf24;
  font-size: 1.18rem;
  font-weight: 900;
  text-align: center;
}

.rank-link {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  transition: background 0.2s ease;
}

.rank-link:hover {
  background: rgba(51, 65, 85, 0.82);
}

.rank-link img {
  flex: 0 0 64px;
  width: 64px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-link span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.rank-link strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-link em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-shell {
  min-height: 65vh;
}

.page-hero {
  padding: 84px 0;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.22), transparent 30rem), linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.78));
  border-bottom: 1px solid var(--line);
}

.compact-hero {
  padding: 64px 0;
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.05;
}

.eyebrow {
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

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

.filter-box {
  width: min(520px, 100%);
  margin-top: 24px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 22px;
  align-items: center;
}

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

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.category-card-large p {
  margin-bottom: 18px;
}

.ranking-page {
  display: grid;
  gap: 30px;
  padding: 48px 0;
}

.ranking-panel {
  padding: 24px;
}

.search-main-form {
  width: min(680px, 100%);
  margin-top: 26px;
}

.search-status {
  margin-bottom: 22px;
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  padding: 54px 0;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.77), rgba(2, 6, 23, 0.42));
  backdrop-filter: blur(5px);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

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

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.08;
}

.detail-copy p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 1.1rem;
}

.detail-meta {
  margin: 22px 0;
}

.detail-meta a:hover {
  color: #fbbf24;
}

.player-section {
  padding: 50px 0 20px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: #000000;
  cursor: pointer;
  overflow: hidden;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover-bg,
.player-cover-shade {
  position: absolute;
  inset: 0;
}

.player-cover-bg {
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(0.62);
  transform: scale(1.06);
}

.player-cover-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25));
}

.player-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 24px 48px rgba(234, 88, 12, 0.38);
  font-size: 2rem;
}

.player-title {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 20px;
  font-size: 1.1rem;
  font-weight: 900;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: 26px;
}

.detail-article h2 {
  font-size: 1.6rem;
  margin-top: 28px;
}

.detail-article h2:first-child {
  margin-top: 0;
}

.detail-article p {
  color: #cbd5e1;
  font-size: 1.03rem;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: #ffffff;
}

.detail-side a:hover {
  color: #fbbf24;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list a {
  border-radius: 999px;
  padding: 8px 13px;
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.82);
}

.tag-list a:hover {
  color: #fbbf24;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(90deg, #020617, #0f172a, #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

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

.footer-grid a,
.footer-grid p {
  color: var(--muted);
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
}

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

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

  .top-search {
    margin-left: auto;
  }

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

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

@media (max-width: 900px) {
  .header-inner {
    height: 66px;
  }

  .top-search {
    display: none;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

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

  .category-preview-grid,
  .category-large-grid,
  .split-layout,
  .detail-content-grid,
  .footer-grid,
  .ranking-list.two-column {
    grid-template-columns: 1fr;
  }

  .category-card-large,
  .detail-intro {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(280px, 100%);
  }

  .detail-hero {
    min-height: auto;
  }
}

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

  .brand-text {
    font-size: 1.18rem;
  }

  .hero-slider {
    height: 520px;
  }

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .movie-grid,
  .movie-grid.small-grid,
  .mini-grid {
    gap: 14px;
  }

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

  .movie-card-body p {
    display: none;
  }

  .rail-card {
    flex-basis: 220px;
  }

  .detail-copy h1 {
    font-size: 2rem;
  }

  .detail-article,
  .detail-side,
  .ranking-panel,
  .category-preview-card,
  .category-card-large {
    padding: 18px;
  }

  .rank-link img {
    width: 54px;
    height: 42px;
    flex-basis: 54px;
  }

  .rank-number {
    flex-basis: 32px;
  }
}
