:root {
  --bg: #f8f9fe;
  --paper: rgba(255, 255, 255, 0.86);
  --paper-strong: #ffffff;
  --text: #1f2937;
  --muted: #718096;
  --line: rgba(102, 126, 234, 0.14);
  --primary: #667eea;
  --secondary: #764ba2;
  --accent: #f093fb;
  --blue: #4facfe;
  --cyan: #00f2fe;
  --shadow: 0 18px 55px rgba(31, 38, 135, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(240, 147, 251, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 5%, rgba(79, 172, 254, 0.18), transparent 34rem),
    linear-gradient(135deg, #f8f9fe 0%, #eef2ff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(22px);
  background: rgba(255, 255, 255, 0.72);
}

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

.header-shell {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary) 58%, var(--accent));
  box-shadow: 0 14px 36px rgba(102, 126, 234, 0.35);
}

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

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

.nav-link,
.mobile-panel a,
.footer-links a {
  color: #4a5568;
  font-weight: 700;
}

.nav-link {
  padding: 11px 16px;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.28);
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: rgba(102, 126, 234, 0.1);
}

.menu-button span {
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--primary);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel a {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(102, 126, 234, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  margin: 28px auto 34px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 32px;
  min-height: 560px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.26), transparent 18rem),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.18), transparent 20rem),
    linear-gradient(90deg, rgba(13, 18, 46, 0.78), rgba(13, 18, 46, 0.26));
  z-index: 2;
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.62fr);
  gap: 32px;
  align-items: center;
  padding: 70px clamp(24px, 5vw, 78px);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 3;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: saturate(1.15) contrast(1.08);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 4;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  font-size: 0.92rem;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.9;
}

.hero-actions,
.filter-bar,
.category-pills,
.tag-row,
.movie-meta,
.compact-meta,
.detail-tags,
.breadcrumb,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 16px 36px rgba(240, 147, 251, 0.28);
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(118, 75, 162, 0.34);
}

.button.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

.hero-card .hero-card-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.hero-card-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 5vw, 78px);
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  margin: 34px 0;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.05em;
}

.section-head p,
.page-intro {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.section-link {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 900;
}

.search-panel,
.glass-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.filter-bar {
  margin-bottom: 18px;
}

.search-input {
  flex: 1 1 260px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 999px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
}

.search-input:focus {
  border-color: rgba(102, 126, 234, 0.55);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.category-pills a,
.tag-row span,
.detail-tags span,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #5b4a8b;
  background: rgba(240, 147, 251, 0.14);
  font-size: 0.86rem;
  font-weight: 800;
}

.category-pills a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

.movie-card,
.category-card,
.compact-card,
.info-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: 0 16px 44px rgba(31, 38, 135, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.category-card:hover,
.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 54px rgba(31, 38, 135, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.16), rgba(240, 147, 251, 0.16));
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
  font-size: 0.84rem;
  font-weight: 900;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 2.6em;
  overflow: hidden;
  color: #252d46;
  font-weight: 900;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.5em;
  margin: 10px 0 12px;
  overflow: hidden;
  color: #4a5568;
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  min-height: 168px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72)),
    radial-gradient(circle at top right, rgba(240, 147, 251, 0.22), transparent 8rem);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.16rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
}

.compact-thumb {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(102, 126, 234, 0.1);
}

.compact-thumb img {
  width: 96px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.compact-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.rank-num {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  font-size: 0.88rem;
}

.compact-info p {
  display: -webkit-box;
  margin: 8px 0;
  overflow: hidden;
  color: #4a5568;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumb {
  margin: 24px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.24fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 30px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: rgba(102, 126, 234, 0.12);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 4vw, 42px);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  color: #4a5568;
  font-weight: 800;
}

.detail-info p {
  margin: 0 0 16px;
  color: #4a5568;
  font-size: 1.02rem;
  line-height: 1.9;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #0b1024;
  box-shadow: var(--shadow);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(12, 16, 42, 0.75), rgba(31, 38, 135, 0.4)),
    radial-gradient(circle at 50% 45%, rgba(240, 147, 251, 0.22), transparent 22rem);
  cursor: pointer;
  z-index: 2;
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: 0 20px 54px rgba(240, 147, 251, 0.32);
  cursor: pointer;
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 26px solid #ffffff;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 26px;
}

.article-block {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 1.6rem;
}

.article-block p {
  color: #4a5568;
  line-height: 2;
}

.side-list {
  display: grid;
  gap: 12px;
}

.site-footer {
  margin-top: 56px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  margin-bottom: 8px;
  color: #2d3748;
  font-size: 1.14rem;
}

.footer-shell p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.hidden-by-filter {
  display: none !important;
}

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

  .detail-body {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: grid;
  }

  .hero {
    min-height: 690px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 46px 22px 72px;
  }

  .hero-card {
    max-width: 260px;
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

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

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

  .detail-poster img {
    min-height: 0;
  }

  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .header-shell,
  .footer-shell,
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

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

  .hero {
    border-radius: 24px;
  }

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

  .compact-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .compact-thumb img {
    width: 82px;
  }

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