html {
  scroll-behavior: smooth;
}

.site-body {
  min-height: 100vh;
  margin: 0;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.22), transparent 28rem),
    radial-gradient(circle at 80% 12%, rgba(99, 102, 241, 0.18), transparent 30rem),
    #020617;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1rem;
  color: #06121e;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.26);
}

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

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-link,
.mobile-link {
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 0.55rem 0.9rem;
  font-size: 0.94rem;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link-active {
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.14);
}

.mobile-menu-button {
  display: inline-flex;
  flex-direction: column;
  gap: 0.32rem;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-menu-button span {
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

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

.mobile-link {
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-carousel {
  position: relative;
  height: min(74vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) brightness(0.62);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 3rem;
}

.hero-copy {
  max-width: 48rem;
}

.hero-kicker,
.page-hero span,
.section-heading span,
.panel-heading span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.12);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 48rem;
  color: #f8fafc;
  font-size: clamp(2.7rem, 6vw, 6.2rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.08em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
  max-width: 42rem;
  margin-top: 1.4rem;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.9;
}

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

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

.hero-tags span,
.detail-tags span,
.detail-meta span {
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.primary-button {
  color: #04111d;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  box-shadow: 0 20px 45px rgba(34, 211, 238, 0.28);
}

.secondary-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  display: block;
  width: min(24vw, 320px);
  aspect-ratio: 3 / 4;
  justify-self: center;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid rgba(226, 232, 240, 0.18);
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.55);
}

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

.hero-poster span {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(10px);
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: none;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(226, 232, 240, 0.14);
  font-size: 2rem;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 1.2rem;
}

.hero-next {
  right: 1.2rem;
}

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

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #22d3ee;
}

.hero-search-panel {
  position: relative;
  z-index: 10;
  margin-top: -3rem;
}

.hero-search,
.search-box,
.local-search {
  display: flex;
  gap: 0.8rem;
  border-radius: 1.5rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-box input,
.search-box select,
.local-search input {
  min-width: 0;
  flex: 1;
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.12);
  outline: none;
}

.hero-search button,
.search-box button {
  border-radius: 1rem;
  padding: 0 1.3rem;
  color: #03121e;
  background: #22d3ee;
  font-weight: 800;
}

.hero-category-strip,
.pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.hero-category-strip a,
.pill-link {
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.pill-link.is-current,
.hero-category-strip a:hover,
.pill-link:hover {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.35);
}

.content-section,
.detail-shell,
.search-page {
  padding-top: 4rem;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading h2,
.panel-heading h2,
.page-hero h1 {
  color: #f8fafc;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.section-heading a {
  color: #67e8f9;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.74));
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.32);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.75);
}

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

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
}

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.type-badge {
  left: 0.7rem;
  top: 0.7rem;
  color: #03121e;
  background: #67e8f9;
}

.year-badge {
  right: 0.7rem;
  bottom: 0.7rem;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  right: 0.7rem;
  top: 0.7rem;
  color: #fff7ed;
  background: rgba(239, 68, 68, 0.9);
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-title {
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

.movie-card-title a:hover {
  color: #67e8f9;
}

.movie-card-text {
  display: -webkit-box;
  min-height: 3.25rem;
  margin-top: 0.55rem;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-meta {
  margin-top: 0.75rem;
  color: #cbd5e1;
  font-size: 0.78rem;
}

.movie-card-meta span,
.movie-card-tags {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card-meta span {
  max-width: 100%;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  background: rgba(15, 23, 42, 0.75);
}

.movie-card-tags {
  margin-top: 0.65rem;
  color: #67e8f9;
  font-size: 0.78rem;
}

.section-split,
.ranking-layout,
.detail-grid,
.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.ranking-panel,
.side-list-card,
.side-poster-card,
.detail-info-card,
.player-card {
  border-radius: 1.6rem;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.ranking-panel,
.side-list-card,
.side-poster-card {
  padding: 1.2rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  padding: 0.55rem;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.42);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(3px);
  background: rgba(8, 145, 178, 0.16);
}

.rank-number {
  color: #67e8f9;
  font-weight: 900;
}

.rank-row img {
  width: 3.2rem;
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  object-fit: cover;
}

.rank-content {
  min-width: 0;
}

.rank-content strong,
.rank-content em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content strong {
  color: #f8fafc;
  font-size: 0.94rem;
}

.rank-content em {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.78rem;
  font-style: normal;
}

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

.category-card {
  position: relative;
  display: grid;
  min-height: 13rem;
  overflow: hidden;
  border-radius: 1.6rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.category-posters {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0.26;
}

.category-posters img {
  width: 38%;
  height: 100%;
  object-fit: cover;
  transform: skewX(-7deg) scale(1.08);
}

.category-info {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 1.4rem;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.category-info h2 {
  color: #f8fafc;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-info p {
  max-width: 38rem;
  margin-top: 0.5rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.category-info span {
  display: inline-flex;
  margin-top: 1rem;
  color: #67e8f9;
  font-weight: 800;
}

.page-hero {
  padding-top: 4rem;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.page-hero p {
  max-width: 50rem;
  margin-top: 1rem;
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.9;
}

.category-toolbar {
  padding-top: 1.5rem;
}

.category-toolbar {
  display: grid;
  gap: 1rem;
}

.local-search {
  padding: 0.45rem;
}

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

.detail-shell {
  padding-bottom: 0;
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

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

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

.player-card {
  overflow: hidden;
  padding: 0.65rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 1.25rem;
  background: #000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.36);
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 0.3rem;
  border-top: 0.8rem solid transparent;
  border-bottom: 0.8rem solid transparent;
  border-left: 1.25rem solid #03121e;
}

.detail-info-card {
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.detail-info-card h1 {
  color: #f8fafc;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-info-card h2 {
  margin-top: 1.8rem;
  color: #f8fafc;
  font-size: 1.45rem;
  font-weight: 900;
}

.detail-info-card p {
  margin-top: 0.9rem;
  color: #cbd5e1;
  line-height: 2;
}

.detail-one-line {
  color: #e0f2fe !important;
  font-size: 1.05rem;
}

.detail-meta,
.detail-tags {
  margin-top: 1rem;
}

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

.side-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 1.2rem;
  object-fit: cover;
}

.side-poster-card h2,
.side-list-card h2 {
  margin-top: 1rem;
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 900;
}

.side-poster-card p {
  margin-top: 0.65rem;
  color: #94a3b8;
  line-height: 1.75;
}

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

.search-page {
  display: grid;
  gap: 1.4rem;
}

.search-box {
  flex-wrap: wrap;
}

.search-box select {
  flex: 0 0 12rem;
}

.search-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cbd5e1;
}

.search-result-heading h2 {
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 900;
}

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.8);
}

.footer-grid {
  grid-template-columns: minmax(0, 1fr);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.site-footer p {
  max-width: 26rem;
  margin-top: 1rem;
  color: #94a3b8;
  line-height: 1.85;
}

.site-footer h2 {
  color: #f8fafc;
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(30, 41, 59, 0.88);
  padding: 1rem;
  color: #64748b;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (min-width: 640px) {
  .movie-grid,
  .wide-grid,
  .compact-grid,
  .category-movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 768px) {
  .hero-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 0.7fr 0.9fr;
  }
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }

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

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

  .wide-grid,
  .compact-grid,
  .category-movie-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

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

  .section-split {
    grid-template-columns: minmax(0, 1fr) 24rem;
    align-items: start;
  }

  .ranking-layout {
    grid-template-columns: 24rem minmax(0, 1fr);
    align-items: start;
  }

  .sticky-panel {
    position: sticky;
    top: 6rem;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 21rem;
    align-items: start;
  }
}

@media (max-width: 900px) {
  .hero-carousel {
    min-height: 680px;
    height: auto;
  }

  .hero-inner {
    position: relative;
    min-height: 680px;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-content: center;
    padding-top: 4rem;
    padding-bottom: 5rem;
  }

  .hero-poster {
    width: min(62vw, 250px);
    justify-self: start;
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 13vw, 4.4rem);
  }

  .hero-search,
  .search-box {
    flex-direction: column;
  }

  .hero-search button,
  .search-box button {
    min-height: 3rem;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .wide-grid,
  .compact-grid,
  .category-movie-grid {
    gap: 0.75rem;
  }

  .movie-card-body {
    padding: 0.85rem;
  }

  .movie-card-title {
    font-size: 0.95rem;
  }

  .movie-card-text {
    font-size: 0.82rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
