:root {
  --night-950: #0a1929;
  --night-900: #102a43;
  --night-850: #173755;
  --night-800: #243b53;
  --night-700: #334e68;
  --night-300: #bcccdc;
  --night-200: #d9e2ec;
  --night-100: #f0f4f8;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --ring: rgba(245, 158, 11, 0.32);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-950);
  color: var(--night-100);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 16% 12%, rgba(245, 158, 11, 0.16), transparent 25rem),
    radial-gradient(circle at 90% 8%, rgba(72, 117, 165, 0.28), transparent 28rem),
    linear-gradient(180deg, #0a1929 0%, #102a43 45%, #0a1929 100%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-main {
  min-height: 70vh;
  padding-top: 72px;
}

.inner-page {
  padding-top: 84px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  background: rgba(10, 25, 41, 0.82);
  border-bottom: 1px solid rgba(188, 204, 220, 0.12);
  backdrop-filter: blur(18px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(10, 25, 41, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), #fbbf24);
  color: #0a1929;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

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

.nav-link,
.mobile-nav-link {
  color: var(--night-200);
  border-radius: 999px;
  padding: 9px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.16);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(188, 204, 220, 0.14);
  border-radius: 12px;
  background: rgba(16, 42, 67, 0.72);
  padding: 10px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--night-100);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 16px;
}

.hero-carousel {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: var(--night-950);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-slide > img.is-missing,
.poster-frame img.is-missing,
.ranking-thumb img.is-missing,
.detail-bg img.is-missing {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 25, 41, 0.96) 0%, rgba(10, 25, 41, 0.72) 42%, rgba(10, 25, 41, 0.18) 100%),
    linear-gradient(0deg, rgba(10, 25, 41, 1) 0%, rgba(10, 25, 41, 0.32) 55%, rgba(10, 25, 41, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(52px, 10vw, 118px);
}

.hero-copy {
  width: min(760px, 100%);
  animation: fadeIn 0.6s ease both;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  padding: 5px 10px;
  font-size: 0.84rem;
}

.eyebrow {
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 14px 0 14px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 38px rgba(0, 0, 0, 0.52);
}

.hero-copy p {
  max-width: 680px;
  color: var(--night-200);
  font-size: clamp(1rem, 2vw, 1.24rem);
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--night-300);
}

.hero-meta {
  margin-top: 18px;
}

.hero-actions,
.detail-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-500), #fbbf24);
  color: #0a1929;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.32);
}

.btn-secondary,
.btn-ghost {
  color: #fff;
  border-color: rgba(188, 204, 220, 0.16);
  background: rgba(16, 42, 67, 0.7);
}

.btn-secondary:hover,
.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 2.8rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.section-spacing {
  padding: clamp(46px, 7vw, 86px) 0;
}

.section-deep {
  background: linear-gradient(180deg, rgba(16, 42, 67, 0.78), rgba(10, 25, 41, 0.28));
}

.home-intro {
  background: linear-gradient(180deg, var(--night-950), rgba(16, 42, 67, 0.88));
}

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

.intro-grid {
  align-items: center;
  margin-bottom: 0;
}

.section-heading h2,
.intro-grid h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.intro-grid p,
.page-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--night-300);
}

.text-link {
  color: #fbbf24;
  font-weight: 700;
  white-space: nowrap;
}

.text-link:hover {
  color: #fff;
}

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

.category-tile,
.category-card,
.filter-panel,
.prose-card,
.card {
  border: 1px solid rgba(188, 204, 220, 0.12);
  background: rgba(16, 42, 67, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
}

.category-tile {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.category-tile::before,
.category-card::before,
.prose-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.65;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.2), transparent 16rem);
  pointer-events: none;
}

.category-tile span,
.category-card-title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
}

.category-tile small,
.category-card p {
  position: relative;
  z-index: 1;
  color: var(--night-300);
}

.category-tile:hover,
.card-hover:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: var(--shadow);
}

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

.card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent),
    linear-gradient(180deg, var(--night-800), var(--night-950));
}

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

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

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(10, 25, 41, 0.84);
  color: #fbbf24;
  padding: 4px 9px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 14px;
}

.meta-line {
  gap: 7px 10px;
  font-size: 0.82rem;
}

.card-body h3 {
  margin: 8px 0;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.28;
}

.card-body h3 a:hover,
.ranking-info h3 a:hover,
.category-mini-links a:hover {
  color: #fbbf24;
}

.card-body p {
  min-height: 3.1em;
  margin: 0 0 12px;
  color: var(--night-300);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  padding: 3px 8px;
  font-size: 0.74rem;
}

.page-hero {
  position: relative;
  padding: 70px 0 52px;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 22rem),
    linear-gradient(180deg, rgba(16, 42, 67, 0.92), rgba(10, 25, 41, 0.86));
  border-bottom: 1px solid rgba(188, 204, 220, 0.1);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--night-300);
  font-size: 0.92rem;
}

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

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

.category-card {
  position: relative;
  min-height: 258px;
  border-radius: var(--radius);
  padding: 24px;
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.category-card-title {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 1.46rem;
}

.category-mini-links {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 18px 0;
}

.category-mini-links a {
  color: var(--night-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 28px;
  border-radius: var(--radius);
  padding: 22px;
}

.filter-panel h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.filter-panel p {
  margin: 0;
  color: var(--night-300);
}

.filter-form {
  display: grid;
  grid-template-columns: 1.2fr 0.72fr 0.68fr auto;
  gap: 12px;
  align-items: end;
}

.filter-form label {
  display: grid;
  gap: 6px;
  color: var(--night-300);
  font-size: 0.88rem;
}

.filter-form input,
.filter-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(188, 204, 220, 0.16);
  border-radius: 12px;
  background: rgba(10, 25, 41, 0.62);
  color: #fff;
  padding: 0 12px;
  outline: none;
}

.filter-form input:focus,
.filter-form select:focus {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow: 0 0 0 4px var(--ring);
}

.movie-card.is-hidden,
.ranking-item.is-hidden {
  display: none;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 92px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(188, 204, 220, 0.12);
  border-radius: 18px;
  background: rgba(16, 42, 67, 0.68);
  padding: 12px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-weight: 900;
  font-size: 1.16rem;
}

.ranking-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: var(--night-800);
}

.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.12rem;
}

.ranking-info p {
  margin: 0 0 8px;
  color: var(--night-300);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0;
  background: var(--night-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 25, 41, 0.98), rgba(10, 25, 41, 0.72));
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr;
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.detail-poster {
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  margin-bottom: 16px;
}

.detail-one-line {
  max-width: 850px;
  margin: 0 0 18px;
  color: var(--night-200);
  font-size: 1.12rem;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(188, 204, 220, 0.14);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at center, rgba(10, 25, 41, 0.16), rgba(10, 25, 41, 0.74));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), #fbbf24);
  color: #0a1929;
  font-size: 2.1rem;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.38);
}

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

.prose-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 26px;
}

.prose-card h2,
.site-footer h2 {
  position: relative;
  margin: 0 0 12px;
  color: #fff;
}

.prose-card p {
  position: relative;
  margin: 0;
  color: var(--night-200);
  font-size: 1.02rem;
}

.site-footer {
  border-top: 1px solid rgba(188, 204, 220, 0.12);
  background: rgba(10, 25, 41, 0.96);
  color: var(--night-300);
  padding-top: 42px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  margin-top: 34px;
  border-top: 1px solid rgba(188, 204, 220, 0.1);
  padding: 18px 16px;
  text-align: center;
  color: var(--night-300);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .filter-panel,
  .filter-form {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .hero-carousel {
    min-height: 82vh;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-grid,
  .section-heading,
  .detail-hero-grid,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-heading {
    align-items: start;
  }

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

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

  .ranking-item {
    grid-template-columns: 50px 76px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 0.92rem;
  }

  .ranking-info p {
    display: none;
  }

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

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

  .header-inner {
    height: 64px;
  }

  .page-main,
  .inner-page {
    padding-top: 64px;
  }

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

  .filter-panel {
    padding: 16px;
  }

  .ranking-item {
    grid-template-columns: 42px 1fr;
  }

  .ranking-thumb {
    display: none;
  }

  .card-body p {
    min-height: auto;
  }
}
