html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #020617;
}

body,
input,
button {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.35));
}

.logo-mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  color: #facc15;
  transition: transform 0.3s ease;
}

.logo-mark.small {
  width: 1.5rem;
  height: 1.5rem;
}

.logo-mark .icon,
.search-icon .icon,
.hero-actions .icon,
.play-circle .icon {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-mark .icon path:first-child,
.play-circle .icon path {
  fill: currentColor;
  stroke: currentColor;
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: #facc15;
}

.nav-link::after {
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: #facc15;
  content: "";
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-link {
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #facc15;
}

.menu-button {
  border-radius: 0.75rem;
  padding: 0.5rem 0.7rem;
  color: #fff;
  transition: background 0.25s ease;
}

.menu-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.search-box .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  color: #d1d5db;
  transform: translateY(-50%);
}

.hero-bg {
  filter: brightness(0.32);
  transform: scale(1.04);
}

.hero-shade {
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.16), transparent 45%), linear-gradient(to bottom, transparent, rgba(2, 6, 23, 0.55), #020617);
}

.hero-copy {
  text-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.hero-eyebrow {
  display: inline-flex;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  color: #facc15;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
}

.hero-feature {
  margin: 0 auto 1.25rem;
  max-width: 48rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(14px);
}

.hero-feature span,
.hero-feature strong,
.hero-feature em {
  display: block;
}

.hero-feature span {
  color: #facc15;
  font-size: 0.8rem;
}

.hero-feature strong {
  margin: 0.15rem 0;
  color: #fff;
  font-size: 1.35rem;
}

.hero-feature em {
  color: #cbd5e1;
  font-style: normal;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.meta-pill,
.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(30, 41, 59, 0.9);
  color: #d1d5db;
  font-size: 0.8rem;
}

.tag-chip:hover {
  color: #facc15;
}

.hero-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-ghost:hover {
  border-color: rgba(250, 204, 21, 0.7);
  color: #facc15;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  color: #fff;
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 800;
}

.section-subtitle {
  margin-top: 0.5rem;
  max-width: 48rem;
  color: #94a3b8;
}

.movie-card,
.poster-card,
.category-card,
.timeline-card {
  will-change: transform;
}

.movie-card {
  display: block;
}

.poster-card {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0f172a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.poster-card:hover {
  transform: translateY(-0.4rem);
  box-shadow: 0 25px 60px rgba(250, 204, 21, 0.18);
}

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

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

.poster-badge {
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  border-radius: 0.5rem;
  padding: 0.3rem 0.55rem;
  background: #facc15;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 700;
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), transparent 62%);
}

.poster-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
}

.poster-copy h3 {
  margin-bottom: 0.25rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.35;
}

.poster-copy p {
  color: #cbd5e1;
  font-size: 0.8rem;
}

.category-card {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.5));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.category-card:hover {
  transform: translateY(-0.35rem);
  border-color: rgba(250, 204, 21, 0.55);
}

.category-card span {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
}

.category-card p {
  margin: 0.85rem 0;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.75;
}

.category-preview {
  display: grid;
  gap: 0.45rem;
}

.category-preview a {
  color: #facc15;
  font-size: 0.85rem;
}

.ranking-layout {
  display: grid;
  gap: 3rem;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
}

.rank-list-page {
  gap: 1rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 3rem 4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  transform: translateX(0.25rem);
  border-color: rgba(250, 204, 21, 0.45);
}

.rank-no {
  color: #facc15;
  font-size: 1.15rem;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 4rem;
  height: 5.25rem;
  border-radius: 0.65rem;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: #94a3b8;
  font-size: 0.85rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.4), transparent 35%), linear-gradient(135deg, #020617, #172554 48%, #020617);
}

.compact-hero {
  padding: 5rem 0 3.5rem;
}

.page-hero h1 {
  margin-top: 1rem;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
}

.page-hero p {
  margin-top: 1rem;
  max-width: 56rem;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

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

.filter-panel {
  margin-bottom: 2rem;
}

.filter-panel input,
.search-large input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  outline: none;
}

.filter-panel input:focus,
.search-large input:focus {
  border-color: rgba(250, 204, 21, 0.75);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
}

.search-large {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 48rem;
}

.search-large button {
  border-radius: 999px;
  padding: 0 1.5rem;
  background: #facc15;
  color: #111827;
  font-weight: 800;
}

.search-summary {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.detail-hero {
  position: relative;
  min-height: 28rem;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: brightness(0.35);
  transform: scale(1.04);
}

.detail-bg-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.25), #020617 92%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 5rem;
}

.detail-hero h1 {
  margin: 1rem 0;
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  font-weight: 900;
}

.detail-hero p {
  max-width: 58rem;
  color: #d1d5db;
  font-size: 1.1rem;
  line-height: 1.85;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1rem;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: inline-flex;
  width: 4.5rem;
  height: 4.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #facc15;
  color: #111827;
  box-shadow: 0 20px 60px rgba(250, 204, 21, 0.35);
}

.play-circle .icon {
  width: 2.2rem;
  height: 2.2rem;
  margin-left: 0.2rem;
}

.detail-content-wrap {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.detail-grid {
  display: grid;
  gap: 2rem;
}

.detail-poster img {
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.32);
}

.detail-main {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.82);
}

.detail-main h2 {
  margin-bottom: 1rem;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}

.detail-main h2:not(:first-child) {
  margin-top: 2rem;
}

.detail-main p {
  color: #cbd5e1;
  line-height: 1.95;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: #cbd5e1;
}

.info-list span {
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  background: rgba(30, 41, 59, 0.76);
}

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

@media (min-width: 1024px) {
  .ranking-layout {
    grid-template-columns: minmax(20rem, 0.75fr) minmax(0, 1.25fr);
  }

  .detail-grid {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .hero-actions,
  .search-large {
    flex-direction: column;
  }

  .hero-actions a,
  .search-large button {
    justify-content: center;
    width: 100%;
  }

  .rank-row {
    grid-template-columns: 2.5rem 3.5rem minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

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