* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 20% 0%, rgba(51, 65, 85, 0.75), transparent 34rem),
    radial-gradient(circle at 80% 8%, rgba(15, 23, 42, 0.95), transparent 30rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  color: #020617;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.5);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link:hover,
.nav-link.active {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.9);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(71, 85, 105, 0.8);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  background: #f8fafc;
  border-radius: 999px;
  margin: 5px 0;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.category-strip {
  border-top: 1px solid rgba(30, 41, 59, 0.7);
  background: rgba(2, 6, 23, 0.46);
}

.strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 24px;
  scrollbar-width: none;
}

.strip-inner::-webkit-scrollbar {
  display: none;
}

.strip-inner a {
  white-space: nowrap;
  color: #94a3b8;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 999px;
  padding: 7px 12px;
  transition: all 0.2s ease;
}

.strip-inner a:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.65);
}

.hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  border: 1px solid rgba(71, 85, 105, 0.75);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.6);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 12%, rgba(148, 163, 184, 0.18), transparent 22rem),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.65), rgba(15, 23, 42, 0.15)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 60%);
}

.hero-content {
  position: relative;
  max-width: 780px;
  padding: 72px;
}

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

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.lead {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin: 22px 0;
}

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

.hero-tags span,
.tag-row span {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-box button {
  color: #020617;
  background: #f8fafc;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
}

.ghost-button {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(71, 85, 105, 0.75);
}

.primary-button:hover,
.ghost-button:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  right: 32px;
  bottom: 32px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  background: #f8fafc;
}

.hero-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

.hero-mini img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.75);
}

.hero-mini span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-panel,
.page-main,
.detail-main,
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-panel {
  margin-top: 24px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(71, 85, 105, 0.75);
  border-radius: 999px;
  outline: none;
  min-height: 46px;
  padding: 0 16px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-links a {
  color: #cbd5e1;
  border: 1px solid rgba(51, 65, 85, 0.7);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 999px;
  padding: 8px 12px;
}

.page-main {
  padding-top: 46px;
  padding-bottom: 68px;
}

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

.section-heading h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.section-link {
  color: #f8fafc;
  border: 1px solid rgba(71, 85, 105, 0.72);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.65);
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 26px 54px rgba(2, 6, 23, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.88);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: #020617;
  background: #f8fafc;
  border-radius: 999px;
  padding: 6px 11px;
  font-weight: 800;
  font-size: 12px;
  transform: translateY(16px);
  opacity: 0;
  transition: all 0.2s ease;
}

.movie-card:hover .poster-play {
  transform: translateY(0);
  opacity: 1;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.45);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  color: #94a3b8;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.meta-line {
  color: #cbd5e1 !important;
}

.card-body .tag-row {
  margin-top: 12px;
}

.card-body .tag-row span {
  font-size: 12px;
  padding: 5px 8px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

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

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

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

.category-card {
  position: relative;
  min-height: 230px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 28px;
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(2, 6, 23, 0.92));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(148, 163, 184, 0.65);
}

.category-card span {
  display: block;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.category-card strong {
  display: block;
  color: #cbd5e1;
  font-weight: 500;
  line-height: 1.7;
  max-width: 78%;
}

.category-posters {
  position: absolute;
  right: 14px;
  bottom: -20px;
  display: flex;
  gap: 8px;
  transform: rotate(-7deg);
}

.category-posters img {
  width: 68px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.page-hero {
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 0%, rgba(148, 163, 184, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(2, 6, 23, 0.9));
  padding: 54px;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.35);
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin: 24px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  margin: 28px 0 20px;
}

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

.detail-main {
  padding-bottom: 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 300px;
  gap: 24px;
  align-items: start;
}

.player-panel {
  grid-column: span 2;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 32px;
  background: #000;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #020617;
  background: radial-gradient(circle at center, rgba(248, 250, 252, 0.92), rgba(15, 23, 42, 0.18));
  border: 0;
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  background: #020617;
  border-radius: 50%;
  padding-left: 4px;
}

.detail-poster img {
  width: 100%;
  border-radius: 28px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.4);
  background: rgba(15, 23, 42, 0.8);
}

.detail-info {
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.65);
}

.detail-info h1 {
  font-size: clamp(32px, 5vw, 58px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.info-grid span {
  display: grid;
  gap: 6px;
  color: #e2e8f0;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 18px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.45);
}

.info-grid b {
  color: #94a3b8;
  font-size: 12px;
}

.detail-tags {
  margin-top: 20px;
}

.content-section {
  margin-top: 28px;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.content-section h2 {
  color: #f8fafc;
  margin: 0 0 16px;
  font-size: 28px;
}

.content-section p {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.9;
  margin: 0;
}

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

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(2, 6, 23, 0.8);
}

.footer-inner {
  padding-top: 36px;
  padding-bottom: 36px;
}

.footer-inner strong {
  color: #f8fafc;
  font-size: 20px;
}

.footer-inner p {
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.footer-links a {
  color: #cbd5e1;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 999px;
  padding: 8px 12px;
}

.copyright {
  font-size: 13px;
}

@media (max-width: 1120px) {
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .rank-list,
  .full-rank {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-button {
    display: block;
  }

  .header-inner {
    padding: 0 16px;
  }

  .hero,
  .search-panel,
  .page-main,
  .detail-main,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-stage {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 36px 24px 72px;
  }

  .hero-rail,
  .category-grid,
  .large-category-grid,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .rank-list,
  .full-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-bar,
  .search-box,
  .detail-layout,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .player-panel {
    grid-column: auto;
  }

  .page-hero {
    padding: 32px 24px;
    border-radius: 24px;
  }

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

@media (max-width: 520px) {
  .hero-rail,
  .category-grid,
  .large-category-grid,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .rank-list,
  .full-rank {
    grid-template-columns: 1fr;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .card-body h3 {
    font-size: 20px;
  }

  .poster-link {
    aspect-ratio: 16 / 10;
  }
}
