:root {
  --bg-start: #faf5ff;
  --bg-mid: #fdf2f8;
  --bg-end: #eff6ff;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: rgba(255, 255, 255, 0.72);
  --line: rgba(147, 51, 234, 0.14);
  --purple: #9333ea;
  --pink: #db2777;
  --blue: #2563eb;
  --radius: 1.5rem;
  --shadow: 0 24px 60px rgba(88, 28, 135, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #6d28d9;
  font-size: 1.18rem;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.32);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 650;
  font-size: 0.94rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #7e22ce;
  background: rgba(243, 232, 255, 0.82);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 74px 0 52px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.5;
  pointer-events: none;
}

.hero::before {
  width: 320px;
  height: 320px;
  left: -90px;
  top: 60px;
  background: #e9d5ff;
}

.hero::after {
  width: 380px;
  height: 380px;
  right: -130px;
  bottom: 30px;
  background: #bfdbfe;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.hero-copy {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #7e22ce;
  font-weight: 750;
  font-size: 0.9rem;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 14px;
  line-height: 1.05;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  letter-spacing: -0.08em;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead,
.page-lead {
  color: #4b5563;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.85;
  max-width: 680px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 18px 30px rgba(147, 51, 234, 0.22);
}

.btn-soft {
  color: #7e22ce;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(147, 51, 234, 0.12);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(88, 28, 135, 0.18);
}

.hero-slider {
  position: relative;
  min-height: 560px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.68);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

.hero-slide-panel {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 20px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.78));
  backdrop-filter: blur(10px);
}

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

.hero-slide-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.hero-dots {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: none;
  padding: 0;
}

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

.section {
  padding: 54px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  letter-spacing: -0.05em;
  color: #312e81;
}

.section-subtitle {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.rank-card,
.detail-card,
.search-panel {
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(88, 28, 135, 0.1);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 26px 56px rgba(88, 28, 135, 0.18);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ffd1dc, #e6b3ff, #b3d9ff);
}

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

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

.badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  color: #7e22ce;
  background: rgba(243, 232, 255, 0.88);
}

.poster .badge {
  position: absolute;
  left: 10px;
  top: 10px;
  color: #ffffff;
  background: rgba(147, 51, 234, 0.82);
}

.movie-card-body,
.category-card,
.rank-info,
.detail-card {
  padding: 16px;
}

.movie-card h3,
.category-card h2,
.rank-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.35;
  color: #312e81;
}

.movie-card p,
.category-card p,
.rank-card p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.page-hero {
  padding: 54px 0 26px;
}

.filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 22px 0 26px;
}

.filterbar input,
.filterbar select {
  width: 100%;
  border: 1px solid rgba(147, 51, 234, 0.16);
  border-radius: 999px;
  padding: 13px 16px;
  color: #374151;
  background: rgba(255, 255, 255, 0.78);
  outline: none;
}

.filterbar input:focus,
.filterbar select:focus {
  border-color: rgba(147, 51, 234, 0.42);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.08);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.rank-card .poster {
  border-radius: 18px;
  margin-left: 12px;
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #9333ea, #db2777);
  font-weight: 900;
  margin-bottom: 8px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.06), rgba(17, 24, 39, 0.64));
}

.play-layer.is-hidden {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9333ea, #db2777, #2563eb);
  box-shadow: 0 18px 42px rgba(147, 51, 234, 0.38);
  font-size: 1.7rem;
}

.detail-card h2 {
  margin: 0 0 12px;
  color: #312e81;
  font-size: 1.35rem;
}

.detail-card p {
  color: #4b5563;
  line-height: 1.9;
  margin: 0 0 15px;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  margin-bottom: 18px;
  font-size: 0.94rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.site-footer {
  margin-top: 42px;
  padding: 32px 0;
  color: #6b7280;
  border-top: 1px solid rgba(147, 51, 234, 0.12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .hero-shell,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    min-height: 480px;
  }

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

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

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

  .navbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 38px;
    min-height: auto;
  }

  .hero-copy {
    padding: 22px;
  }

  .hero-slider {
    min-height: 420px;
  }

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

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

  .movie-card-body,
  .category-card,
  .rank-info,
  .detail-card {
    padding: 13px;
  }

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