:root {
  --bg: #f7fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --brand: #06b6d4;
  --brand-dark: #0284c7;
  --accent: #2563eb;
  --deep: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 48%, #ffffff 100%);
  line-height: 1.65;
}

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
}

.brand-name {
  font-size: 1.35rem;
  background: linear-gradient(135deg, #ffffff, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 12px;
  transition: 0.25s ease;
}

.nav-link {
  padding: 10px 14px;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero-slider {
  background: var(--deep);
  color: #ffffff;
}

.hero-stage {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.48fr);
  align-items: center;
  gap: 48px;
  padding: 96px max(32px, calc((100vw - 1180px) / 2)) 88px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 1.1s ease;
}

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

.hero-content {
  max-width: 760px;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span {
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  color: #22d3ee;
}

.hero-content h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 1.08rem;
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  height: min(52vh, 520px);
  object-fit: cover;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.secondary-btn {
  color: #075985;
  background: #e0f2fe;
}

.ghost-btn {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: #22d3ee;
}

.hero-thumbs {
  width: min(1180px, calc(100% - 32px));
  margin: -46px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 28px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(14px);
}

.hero-thumb img {
  width: 58px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  font-weight: 800;
  line-height: 1.35;
}

.intro-strip,
.search-panel,
.section-block,
.page-hero,
.detail-hero,
.player-section,
.detail-copy,
.category-overview-list {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.intro-strip h2,
.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-copy h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.intro-strip p,
.search-panel p,
.page-hero p,
.category-overview-content p,
.movie-card-body p,
.detail-one-line,
.detail-copy p,
.rank-info p {
  color: var(--muted);
}

.search-panel {
  margin-top: 34px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: end;
  gap: 26px;
  padding: 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.search-label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.movie-search {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  font-size: 1rem;
  background: #ffffff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.section-block {
  margin-top: 48px;
}

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

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.section-heading a {
  color: var(--brand-dark);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

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

.year-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 900;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.88);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: 0.25s ease;
}

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

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

.movie-title {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover,
.rank-title:hover,
.category-link-cloud a:hover {
  color: var(--brand-dark);
}

.movie-meta {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.86rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.36);
  border: 1px solid rgba(103, 232, 249, 0.28);
}

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

.category-tile,
.category-overview-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-tile {
  padding: 16px;
}

.category-posters,
.category-overview-posters {
  display: grid;
  gap: 8px;
}

.category-posters {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 16px;
}

.category-posters img,
.category-overview-posters img {
  width: 100%;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile h2 {
  margin: 0 0 8px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.ranking-list {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-num {
  font-size: 1.35rem;
  font-weight: 950;
  color: var(--brand-dark);
}

.rank-cover img {
  width: 82px;
  height: 104px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-title {
  font-size: 1.05rem;
  font-weight: 900;
}

.rank-info p {
  margin: 4px 0;
}

.rank-info span {
  color: #94a3b8;
  font-size: 0.88rem;
}

.rank-action {
  color: #ffffff;
  background: #0f172a;
}

.page-hero {
  margin-top: 34px;
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 42px;
  border-radius: 32px;
  color: #ffffff;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.simple-hero {
  background-image: radial-gradient(circle at top right, rgba(34, 211, 238, 0.42), transparent 36%), linear-gradient(135deg, #020617, #0f172a 48%, #1e3a8a);
}

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

.page-hero p {
  max-width: 780px;
  color: #dbeafe;
  font-size: 1.06rem;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 26px;
  padding: 20px;
}

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

.category-overview-content {
  align-self: center;
}

.category-overview-content h2 {
  margin: 0;
  font-size: 2rem;
}

.category-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 20px;
}

.category-link-cloud a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f172a;
  background: #f1f5f9;
  font-weight: 800;
  font-size: 0.88rem;
}

.detail-hero {
  margin-top: 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, #0f172a, #111827 58%, #0e7490);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.detail-cover {
  display: block;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.03;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 1.1rem;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e0f2fe;
  font-weight: 800;
}

.player-section {
  margin-top: 44px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.34);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.42));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 22px 44px rgba(6, 182, 212, 0.36);
  font-size: 2rem;
  padding-left: 6px;
}

.player-status {
  position: absolute;
  left: 20px;
  bottom: 14px;
  margin: 0;
  color: #fecaca;
  font-weight: 800;
}

.player-status:empty {
  display: none;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 34px;
}

.detail-copy article {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.site-footer {
  margin-top: 64px;
  padding: 48px 0 30px;
  color: #cbd5e1;
  background: #020617;
}

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

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  text-align: center;
}

.is-filtered-out {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-stage {
    min-height: 76vh;
  }

  .hero-slide {
    padding: 88px 22px 78px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

  .intro-strip,
  .search-panel,
  .section-heading,
  .detail-copy {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .rank-action {
    grid-column: 2 / 4;
  }

  .category-overview-card,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .mobile-nav,
  .intro-strip,
  .search-panel,
  .section-block,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-copy,
  .category-overview-list,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1180px);
  }

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

  .hero-control {
    display: none;
  }

  .page-hero,
  .detail-layout,
  .intro-strip,
  .search-panel,
  .detail-copy article {
    padding: 22px;
    border-radius: 22px;
  }

  .category-overview-posters {
    grid-template-columns: 1fr 1fr;
  }
}
