* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #f8fafc;
  background: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.logo-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 18px 40px rgba(250, 204, 21, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #facc15;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-drawer {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-drawer a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #e2e8f0;
}

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

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

.hero-section,
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

.hero-section {
  display: flex;
  align-items: center;
  padding: 110px 0 70px;
}

.star-field {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: radial-gradient(circle at 20% 30%, rgba(250, 204, 21, 0.65) 0 1px, transparent 2px), radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px), radial-gradient(circle at 45% 80%, rgba(59, 130, 246, 0.55) 0 1px, transparent 2px), radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.55) 0 1px, transparent 2px);
  background-size: 240px 240px, 340px 340px, 280px 280px, 420px 420px;
  animation: driftStars 24s linear infinite;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 42%, rgba(250, 204, 21, 0.18), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92));
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 54px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-copy h1,
.page-hero-copy h1,
.detail-copy h1 {
  margin: 14px 0 20px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.38);
}

.hero-copy p,
.page-hero-copy p,
.detail-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2.4vw, 23px);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #facc15;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-search {
  display: flex;
  width: min(620px, 100%);
  margin: 0 0 22px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0 18px;
  color: #ffffff;
  background: transparent;
}

.hero-search input::placeholder {
  color: #94a3b8;
}

.hero-search button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #eab308, #f97316);
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover,
.hero-search button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 54px rgba(249, 115, 22, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.btn-small {
  min-height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

.btn.full {
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s ease;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.42);
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.84) 100%);
}

.hero-slide-copy {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.hero-slide-copy h2 {
  margin: 10px 0;
  color: #ffffff;
  font-size: clamp(28px, 5vw, 46px);
}

.hero-slide-copy p {
  max-width: 520px;
  color: #e2e8f0;
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 28px;
  top: 28px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.is-active {
  width: 34px;
  background: #facc15;
}

.section-block {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0;
}

.compact-block {
  padding-top: 32px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.align-left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2,
.category-preview h2,
.detail-text-block h2 {
  margin: 10px 0 12px;
  color: #ffffff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
}

.section-heading p,
.category-preview p,
.detail-text-block p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(250, 204, 21, 0.38);
  box-shadow: 0 30px 80px rgba(250, 204, 21, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.82));
}

.heat-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(234, 179, 8, 0.92);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-body h2 {
  margin: 10px 0;
  color: #ffffff;
  font-size: 21px;
  line-height: 1.3;
}

.movie-card-body h2 a:hover {
  color: #facc15;
}

.movie-card-body p {
  margin: 0 0 14px;
  color: #94a3b8;
  line-height: 1.7;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.meta-line span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

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

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
  font-size: 12px;
}

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

.category-tile {
  min-height: 150px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.9));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, 0.4);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.rank-row:hover {
  color: #ffffff;
  background: rgba(250, 204, 21, 0.14);
}

.rank-index {
  color: #facc15;
  font-size: 20px;
  font-weight: 900;
}

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

.rank-meta {
  color: #94a3b8;
  font-size: 12px;
}

.page-main {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

.slim-hero {
  min-height: 420px;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.page-hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  outline: none;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
}

.category-preview-list {
  display: grid;
  gap: 30px;
}

.category-preview {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.84);
}

.category-preview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.ranking-grid {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
}

.ranking-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
}

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

.ranking-copy h2 {
  margin: 10px 0;
  color: #ffffff;
  font-size: clamp(22px, 4vw, 34px);
}

.ranking-copy p {
  margin: 0 0 14px;
  color: #94a3b8;
  line-height: 1.75;
}

.rank-line {
  display: flex;
  gap: 10px;
  color: #facc15;
  font-weight: 900;
}

.empty-state {
  display: none;
  margin: 22px 0;
  padding: 22px;
  border-radius: 18px;
  text-align: center;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
}

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

.detail-main {
  background: #0f172a;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 56px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

.detail-poster img {
  aspect-ratio: 4 / 5;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta-grid span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 12px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

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

.player-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #facc15, #f97316);
  font-size: 36px;
  box-shadow: 0 20px 60px rgba(250, 204, 21, 0.36);
}

.player-overlay strong {
  font-size: clamp(22px, 4vw, 38px);
}

.detail-content {
  padding-top: 36px;
}

.detail-text-block {
  margin-bottom: 42px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.86);
}

.related-grid {
  margin-top: 22px;
}

.site-footer {
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 50px 0 36px;
}

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

.site-footer p,
.site-footer li,
.footer-bottom {
  color: #94a3b8;
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

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

.site-footer a:hover {
  color: #facc15;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

@keyframes driftStars {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 240px 240px, -340px 340px, 280px -280px, -420px -420px;
  }
}

@media (max-width: 1100px) {
  .hero-inner,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 560px;
  }

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

  .ranking-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    height: 68px;
  }

  .hero-section {
    padding-top: 92px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search input {
    min-height: 46px;
  }

  .hero-carousel {
    min-height: 500px;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .ranking-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .catalog-grid,
  .movie-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-hero-copy h1,
  .detail-copy h1 {
    font-size: 42px;
  }

  .hero-carousel {
    min-height: 460px;
  }

  .category-preview-head {
    display: grid;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }
}
