html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  background: linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 10%, rgba(250, 204, 21, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.18), transparent 30rem),
    radial-gradient(circle at 50% 85%, rgba(249, 115, 22, 0.12), transparent 30rem);
  z-index: -1;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #eab308, #f97316);
  box-shadow: 0 18px 36px rgba(234, 179, 8, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.site-nav a,
.mobile-menu a,
.site-footer a {
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
  color: #facc15;
}

.mobile-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 0.55rem;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  padding: 0.5rem 1.25rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-menu a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 0.8rem;
  color: #e5e7eb;
}

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

.hero-carousel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding-top: 5rem;
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  color: #fde68a;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  backdrop-filter: blur(12px);
  margin-bottom: 1.2rem;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 1.03;
  font-weight: 900;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 720px;
  margin: 1.4rem 0 0;
  color: #d1d5db;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags {
  margin-top: 1.5rem;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.meta-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.55rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-action {
  color: #ffffff;
  background: linear-gradient(135deg, #eab308, #f97316);
  box-shadow: 0 22px 48px rgba(249, 115, 22, 0.28);
}

.secondary-action {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.72rem;
  height: 0.72rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  width: 2.2rem;
  background: #facc15;
}

.site-section {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0;
}

.tinted-section {
  width: 100%;
  max-width: none;
  padding-left: max(1rem, calc((100% - 1280px) / 2));
  padding-right: max(1rem, calc((100% - 1280px) / 2));
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.5));
}

.section-heading {
  text-align: center;
  margin-bottom: 3.2rem;
}

.section-heading h2,
.page-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
}

.section-heading p,
.page-hero p {
  max-width: 740px;
  margin: 1rem auto 0;
  color: #9ca3af;
  font-size: 1.05rem;
  line-height: 1.8;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

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

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

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

.movie-card {
  position: relative;
  display: block;
  min-width: 0;
  color: #ffffff;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 1rem;
  overflow: hidden;
  background: #1f2937;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
}

.featured-grid .poster-wrap {
  aspect-ratio: 4 / 5;
  border-radius: 1.35rem;
}

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

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.92);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-info {
  display: block;
  padding-top: 0.8rem;
}

.movie-info strong {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.25s ease;
}

.featured-grid .movie-info strong {
  font-size: 1.25rem;
}

.movie-card:hover .movie-info strong {
  color: #facc15;
}

.movie-info em,
.movie-info small {
  display: block;
  margin-top: 0.35rem;
  color: #9ca3af;
  font-style: normal;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row {
  margin-top: 0.5rem;
}

.tag-row span {
  padding: 0.22rem 0.48rem;
  font-size: 0.72rem;
  background: rgba(30, 41, 59, 0.9);
}

.stats-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

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

.stat-card {
  padding: 1.6rem;
  border-radius: 1rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.stat-card strong {
  display: block;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 900;
}

.stat-card span {
  display: block;
  margin-top: 0.4rem;
  color: #9ca3af;
}

.category-stack {
  display: grid;
  gap: 4rem;
}

.category-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.category-title-row h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
}

.category-title-row h3::before {
  content: "";
  width: 0.45rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #facc15, #f97316);
}

.category-title-row a {
  color: #facc15;
  font-weight: 700;
}

.page-main {
  padding-top: 4.4rem;
}

.detail-main {
  padding-top: 5.8rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
}

.page-hero-content {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 2rem));
  padding: 4rem 0;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.category-card {
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.35rem;
  border-radius: 1.25rem;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card span {
  color: #facc15;
  font-weight: 900;
  font-size: 1.4rem;
}

.category-card strong {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
}

.filter-panel label {
  display: grid;
  gap: 0.4rem;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.85rem;
  background: rgba(2, 6, 23, 0.7);
  color: #ffffff;
  padding: 0 0.9rem;
  outline: none;
}

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

.empty-state {
  display: none;
  padding: 3rem 1rem;
  text-align: center;
  color: #cbd5e1;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.empty-state.is-visible {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 4rem 4.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(30, 41, 59, 0.8);
}

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

.rank-cover {
  display: block;
  width: 4.5rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #1f2937;
}

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

.rank-main strong,
.rank-main em,
.rank-main small {
  display: block;
}

.rank-main strong {
  color: #ffffff;
  font-weight: 900;
}

.rank-main em,
.rank-main small {
  margin-top: 0.25rem;
  color: #9ca3af;
  font-style: normal;
  font-size: 0.85rem;
}

.rank-play {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #eab308, #f97316);
  font-weight: 800;
}

.detail-wrap {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.6rem;
  color: #facc15;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 1.5rem;
}

.detail-primary {
  display: grid;
  gap: 1.5rem;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.main-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000000;
}

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

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

.player-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.82));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(4rem, 9vw, 6rem);
  height: clamp(4rem, 9vw, 6rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #eab308, #f97316);
  box-shadow: 0 24px 50px rgba(249, 115, 22, 0.42);
  font-size: 2rem;
}

.player-loading,
.player-message {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 0.85rem;
  backdrop-filter: blur(12px);
}

.player-message {
  color: #fecaca;
}

.detail-card {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-card h1 {
  margin: 1rem 0 0.75rem;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
}

.detail-card h2 {
  margin: 1.4rem 0 0.8rem;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-card p,
.genre-line {
  color: #d1d5db;
  line-height: 1.9;
}

.genre-line {
  margin: 0 0 1rem;
}

.detail-tags {
  margin: 1rem 0;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}

.side-card {
  padding: 1rem;
}

.poster-card img {
  width: 100%;
  border-radius: 1rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #1f2937;
}

.full-action {
  width: 100%;
  margin-top: 1rem;
}

.side-card h3 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 900;
}

.side-related {
  display: grid;
  gap: 0.9rem;
}

.side-related .movie-card {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.8rem;
  align-items: start;
}

.side-related .poster-wrap {
  border-radius: 0.7rem;
}

.side-related .tag-row {
  display: none;
}

.site-footer {
  background: linear-gradient(135deg, #020617, #0f172a);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 3.5rem 1rem 1.5rem;
}

.footer-grid {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

.site-footer p {
  max-width: 360px;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer a:not(.site-logo) {
  display: block;
  margin: 0.55rem 0;
  color: #9ca3af;
}

.footer-bottom {
  width: min(1280px, 100%);
  margin: 2.5rem auto 0;
  padding-top: 1.2rem;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.9rem;
}

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

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

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

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

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

  .poster-card {
    display: none;
  }
}

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

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

  .site-header-inner {
    padding: 0.75rem 1rem;
  }

  .hero-content {
    padding-top: 6rem;
  }

  .hero-content h1 {
    font-size: clamp(2.25rem, 14vw, 4.2rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .site-section {
    width: min(100% - 1rem, 1280px);
    padding: 3.5rem 0;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 2.4rem 3.5rem 1fr;
  }

  .rank-play {
    display: none;
  }

  .detail-wrap {
    width: min(100% - 1rem, 1280px);
  }

  .side-related .movie-card {
    grid-template-columns: 4rem 1fr;
  }
}

@media (max-width: 420px) {
  .movie-info strong {
    font-size: 0.92rem;
  }

  .movie-info em,
  .movie-info small {
    font-size: 0.78rem;
  }

  .tag-row span {
    display: none;
  }
}
