* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.16), transparent 26rem),
    linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  color: transparent;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
}

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

.nav-link {
  color: #cbd5e1;
  padding: 10px 15px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.72) 45%, rgba(2, 6, 23, 0.52)),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: clamp(32px, 6vw, 74px);
}

.hero-copy {
  max-width: 760px;
  animation: fadeInUp 0.7s ease both;
}

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 16px 0 0;
  color: #ffffff;
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 6.2vw, 5.8rem);
}

.hero-copy h2 {
  font-size: clamp(1.8rem, 4vw, 3.3rem);
}

.hero-copy p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.9;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

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

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.28);
}

.button.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.62);
}

.button.text {
  color: #fbbf24;
  padding-inline: 8px;
}

.hero-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-card div {
  padding: 18px;
}

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

.hero-card strong {
  color: #ffffff;
  font-size: 1.25rem;
}

.hero-card span {
  margin-top: 6px;
  color: #94a3b8;
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.64);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.page-main,
.detail-main {
  padding: 44px 0 72px;
}

.page-section {
  padding: 64px 0 0;
}

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

.section-heading.small {
  margin-bottom: 16px;
}

.section-heading h2,
.page-title-block h1,
.detail-info h1,
.detail-content h2 {
  color: #ffffff;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-heading p,
.page-title-block p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

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

.compact-grid,
.library-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.82);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-badge,
.poster-score {
  position: absolute;
  top: 12px;
  z-index: 1;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-badge {
  left: 12px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
}

.poster-score {
  right: 12px;
  color: #020617;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}

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

.movie-tags {
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.2em;
  color: #94a3b8;
  line-height: 1.6;
  margin: 10px 0 0;
  font-size: 0.92rem;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: #64748b;
  font-size: 0.82rem;
}

.movie-meta span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
}

.movie-card.horizontal .poster img {
  height: 100%;
  min-height: 198px;
}

.movie-list-row {
  display: grid;
  gap: 16px;
}

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

.category-tile,
.category-card {
  display: block;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(249, 115, 22, 0.05)),
    rgba(15, 23, 42, 0.82);
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile span,
.category-card-main span {
  display: block;
  color: #ffffff;
  font-size: 1.18rem;
  font-weight: 900;
}

.category-tile strong,
.category-card-main p {
  display: block;
  margin-top: 10px;
  color: #94a3b8;
  line-height: 1.65;
  font-weight: 500;
}

.category-mini-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
}

.category-mini-links a {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
}

.ranking-panel,
.ranking-block {
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  padding: 22px;
}

.ranking-block {
  margin-top: 26px;
}

.rank-list,
.ranking-grid {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.54);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(245, 158, 11, 0.12);
  transform: translateX(3px);
}

.rank-number {
  color: #fbbf24;
  font-size: 1.15rem;
  font-weight: 900;
}

.rank-cover img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
}

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

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

.rank-info strong {
  color: #ffffff;
  font-style: normal;
}

.rank-info em {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: normal;
}

.rank-score {
  color: #020617;
  background: #fbbf24;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
  font-size: 0.8rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 14px;
  outline: none;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.page-title-block {
  margin-bottom: 30px;
  padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.13), transparent),
    rgba(15, 23, 42, 0.74);
}

.page-title-block h1 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 5vw, 4rem);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  margin-bottom: 24px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 30px;
  background:
    radial-gradient(circle at 84% 0%, rgba(249, 115, 22, 0.16), transparent 26rem),
    rgba(15, 23, 42, 0.78);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  margin: 12px 0 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.08;
}

.detail-one-line {
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 1.12rem;
  line-height: 1.85;
}

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

.detail-meta span {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
}

.detail-info .button {
  margin-top: 24px;
}

.player-section,
.detail-content {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.video-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.22)),
    rgba(0, 0, 0, 0.18);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.32);
  cursor: pointer;
  font-size: 2rem;
}

.video-cover strong {
  color: #ffffff;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
}

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

.detail-content article {
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.5);
  padding: 22px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-content p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.92;
}

.site-footer {
  margin-top: 72px;
  padding: 48px 0 24px;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.site-footer h2 {
  margin: 0;
  color: #ffffff;
}

.site-footer p {
  max-width: 640px;
  margin: 12px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 34px;
  color: #64748b;
  font-size: 0.9rem;
}

.no-results {
  grid-column: 1 / -1;
  color: #fbbf24;
  padding: 28px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 18px;
  background: rgba(245, 158, 11, 0.09);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1060px) {
  .movie-grid,
  .compact-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .home-columns,
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

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

@media (max-width: 760px) {
  .mobile-menu-button {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .nav-link {
    text-align: center;
  }

  .hero-carousel {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    align-items: end;
    padding-top: 100px;
    padding-bottom: 92px;
  }

  .hero-control {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-control.prev {
    left: 24px;
  }

  .hero-control.next {
    right: 24px;
  }

  .hero-dots {
    bottom: 40px;
  }

  .section-heading,
  .footer-grid {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .movie-card.horizontal {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .movie-card.horizontal .poster img {
    min-height: 156px;
  }

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

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

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

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

@media (max-width: 480px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .movie-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .category-page-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 2.25rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 28px 50px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}
