:root {
  --night-950: #06111f;
  --night-900: #102a43;
  --night-850: #17324f;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-600: #486581;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line-soft: rgba(251, 191, 36, 0.18);
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(14, 165, 233, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--night-950), #091827 46%, var(--night-900));
}

body.is-locked {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.gradient-text {
  background: linear-gradient(90deg, var(--amber-300), var(--amber-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 17, 31, 0.86);
  border-bottom: 1px solid rgba(251, 191, 36, 0.12);
  backdrop-filter: blur(16px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 12px;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover {
  color: var(--amber-300);
  background: rgba(251, 191, 36, 0.08);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(16, 42, 67, 0.78);
}

.header-search input,
.mobile-search input,
.quick-search input,
.category-filter input,
.search-tools input {
  border: 0;
  outline: 0;
  color: var(--text-main);
  background: transparent;
}

.header-search input {
  width: 160px;
  padding-left: 10px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #111827;
  background: var(--amber-400);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(251, 191, 36, 0.22);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--amber-300);
  background: rgba(36, 59, 83, 0.9);
  cursor: pointer;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  padding: 14px 20px 20px;
  background: rgba(16, 42, 67, 0.98);
  border-top: 1px solid rgba(251, 191, 36, 0.12);
}

.mobile-search {
  margin-bottom: 8px;
}

.mobile-search input {
  width: 100%;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
  color: var(--text-main);
  background: rgba(51, 78, 104, 0.88);
  border-color: rgba(148, 163, 184, 0.18);
}

.btn-ghost {
  color: var(--amber-300);
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-image:
    linear-gradient(90deg, rgba(6, 17, 31, 0.94), rgba(6, 17, 31, 0.74), rgba(6, 17, 31, 0.98)),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-backdrop {
  background:
    radial-gradient(circle at 24% 30%, rgba(251, 191, 36, 0.22), transparent 22rem),
    linear-gradient(180deg, transparent, rgba(6, 17, 31, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 48px;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  padding: 80px 0 72px;
}

.hero-text {
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--amber-300);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-text h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-text h2 {
  margin: 0 0 18px;
  color: var(--amber-300);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.hero-text p,
.page-hero p,
.detail-one-line,
.content-card p,
.category-card p,
.footer-grid p {
  color: var(--text-soft);
  line-height: 1.85;
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 28px;
  background: rgba(16, 42, 67, 0.72);
  box-shadow: var(--shadow-card);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  color: #111827;
  font-weight: 800;
  border-radius: 999px;
  background: var(--amber-400);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-panel {
  display: grid;
  gap: 16px;
  margin-top: -38px;
  padding: 18px;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 26px;
  background: rgba(16, 42, 67, 0.9);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.quick-search,
.category-filter,
.search-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.quick-search input,
.category-filter input,
.search-tools input {
  flex: 1;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(6, 17, 31, 0.56);
}

.quick-links,
.filter-row,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a,
.filter-chip,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(251, 191, 36, 0.07);
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.is-active,
.quick-links a:hover,
.detail-tags a:hover {
  color: #111827;
  background: var(--amber-400);
}

.section-block {
  margin-top: 74px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2,
.category-overview-card h2 {
  margin: 0;
  line-height: 1.12;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.section-heading a {
  color: var(--amber-300);
  font-weight: 700;
}

.compact-heading {
  align-items: center;
  margin-bottom: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(36, 59, 83, 0.92), rgba(16, 42, 67, 0.92));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: var(--shadow-card);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b1724;
}

.movie-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-score,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #111827;
  font-weight: 900;
  background: var(--amber-400);
}

.movie-score {
  right: 12px;
}

.rank-badge {
  left: 12px;
}

.movie-body {
  padding: 16px;
}

.movie-meta,
.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.movie-meta span,
.detail-meta-list span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.movie-body h3 {
  margin: 12px 0 8px;
  color: var(--text-main);
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: var(--amber-300);
}

.movie-body p {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.82rem;
}

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

.ranking-panel,
.content-card,
.page-hero,
.category-overview-card {
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 26px;
  background: rgba(16, 42, 67, 0.76);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
  padding: 22px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(36, 59, 83, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: rgba(51, 78, 104, 0.88);
}

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

.rank-num {
  color: var(--amber-300);
  font-weight: 900;
  font-size: 1.2rem;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info {
  color: var(--amber-300);
  font-weight: 800;
}

.page-main {
  padding: 48px 0 86px;
}

.page-hero {
  padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.16), transparent 22rem),
    linear-gradient(135deg, rgba(36, 59, 83, 0.86), rgba(16, 42, 67, 0.86));
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
}

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

.category-card {
  min-height: 168px;
  padding: 22px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at 16% 8%, rgba(251, 191, 36, 0.16), transparent 10rem),
    rgba(16, 42, 67, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(36, 59, 83, 0.9);
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--amber-300);
  font-size: 1.18rem;
  font-weight: 900;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 20px;
}

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

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

.category-filter,
.search-tools {
  margin-top: 24px;
}

.category-content {
  margin-top: 48px;
}

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

.breadcrumb a {
  color: var(--amber-300);
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 18%, rgba(251, 191, 36, 0.14), transparent 18rem),
    rgba(16, 42, 67, 0.8);
  box-shadow: var(--shadow-card);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 840px;
  margin: 18px 0;
  font-size: 1.08rem;
}

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

.player-section {
  margin-top: 52px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow-card);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding-left: 6px;
  color: #111827;
  font-size: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.36);
}

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin-bottom: 14px;
  color: var(--amber-300);
}

.search-hero {
  margin-bottom: 40px;
}

.search-grid .movie-card[hidden],
.category-movie-grid .movie-card[hidden] {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(251, 191, 36, 0.12);
  background: rgba(6, 17, 31, 0.82);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 54px 0;
}

.footer-grid h2 {
  color: var(--amber-300);
  font-size: 1rem;
}

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

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

.footer-grid a:hover {
  color: var(--amber-300);
}

.footer-bottom {
  padding: 18px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

@media (max-width: 920px) {
  .hero-content,
  .split-layout,
  .detail-hero,
  .detail-content,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 82px 0 86px;
  }

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
    transform: none;
  }

  .sticky-panel {
    position: static;
  }

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

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

@media (max-width: 720px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .header-search {
    display: none;
  }

  .site-logo .gradient-text {
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-text h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .hero-actions,
  .quick-search,
  .category-filter,
  .search-tools,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .movie-body {
    padding: 12px;
  }

  .movie-body h3 {
    font-size: 1rem;
  }

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

  .rank-row img {
    width: 46px;
    height: 62px;
  }

  .detail-hero {
    padding: 16px;
  }

  .detail-poster {
    max-width: 280px;
    margin: 0 auto;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 1.8rem;
  }

  .footer-grid {
    padding: 40px 0;
  }
}

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

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

  .quick-panel,
  .page-hero,
  .content-card,
  .ranking-panel {
    border-radius: 20px;
  }
}
