:root {
  --jelly-text-primary: #2d3748;
  --jelly-text-secondary: #6b7280;
  --jelly-accent-lavender: #d4c5f9;
  --jelly-accent-pink: #ffc4dd;
  --jelly-accent-blue: #c4ddff;
  --jelly-accent-mint: #b8e6d5;
  --jelly-card: rgba(255, 255, 255, 0.86);
  --jelly-glass: rgba(255, 255, 255, 0.72);
  --jelly-border: rgba(255, 255, 255, 0.36);
  --jelly-shadow: 0 18px 50px rgba(31, 38, 135, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--jelly-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  background-size: 400% 400%;
  animation: gradientShift 30s ease infinite;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.42), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(255, 196, 221, 0.42), transparent 24%),
    radial-gradient(circle at 60% 82%, rgba(196, 221, 255, 0.45), transparent 30%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background: rgba(248, 249, 254, 0.38);
  backdrop-filter: blur(2px);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--jelly-border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(36px);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.12);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #c084fc, #f9a8d4);
  box-shadow: 0 12px 28px rgba(168, 85, 247, 0.22);
  font-size: 22px;
}

.brand-text,
.footer-brand span:last-child,
.jelly-gradient-text {
  background: linear-gradient(135deg, #7c3aed, #db2777, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  display: flex;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.62);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 20px rgba(31, 38, 135, 0.12);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #6d28d9;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  margin: 24px auto 54px;
  overflow: hidden;
  border: 1px solid var(--jelly-border);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: var(--jelly-shadow);
  backdrop-filter: blur(28px);
}

.hero-glow {
  position: absolute;
  z-index: 1;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.66;
  pointer-events: none;
}

.hero-glow-one {
  top: -80px;
  left: -70px;
  background: rgba(255, 196, 221, 0.6);
}

.hero-glow-two {
  right: -90px;
  bottom: -90px;
  background: rgba(184, 230, 213, 0.72);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
  gap: 36px;
  align-items: center;
  padding: 74px;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  z-index: 2;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 36px;
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.68) 47%, rgba(255, 255, 255, 0.18)),
    linear-gradient(135deg, rgba(118, 75, 162, 0.3), rgba(240, 147, 251, 0.24));
  backdrop-filter: blur(8px);
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.08);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #1f2937;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.5);
}

.hero-content p {
  max-width: 680px;
  margin: 24px 0;
  color: #4b5563;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

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

.hero-tags a,
.hero-tags span,
.tag-row a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #5b21b6;
  background: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.section-link,
.search-button,
.player-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.search-button {
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.25);
}

.ghost-btn,
.section-link {
  color: #5b21b6;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(31, 38, 135, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(31, 38, 135, 0.2);
}

.hero-poster {
  display: block;
  overflow: hidden;
  min-height: 430px;
  border: 12px solid rgba(255, 255, 255, 0.52);
  border-radius: 34px;
  background: linear-gradient(135deg, #fff, #f3e8ff);
  box-shadow: 0 24px 62px rgba(31, 38, 135, 0.22);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 74px;
  bottom: 38px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.64);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 74px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.content-section {
  margin: 56px 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #4b5563;
  line-height: 1.75;
}

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.player-card,
.search-panel,
.breadcrumb,
.site-footer {
  border: 1px solid var(--jelly-border);
  background: var(--jelly-card);
  box-shadow: var(--jelly-shadow);
  backdrop-filter: blur(24px);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 24px 64px rgba(31, 38, 135, 0.24);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.poster-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(17, 24, 39, 0.62), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

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

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(124, 58, 237, 0.88);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #5f6775;
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: var(--radius-xl);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px rgba(31, 38, 135, 0.22);
}

.category-card span {
  color: #7c3aed;
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.7;
}

.category-card em {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #5b21b6;
  background: rgba(255, 255, 255, 0.7);
  font-style: normal;
  font-weight: 800;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
}

.rank-number {
  color: #7c3aed;
  font-size: 32px;
  font-weight: 950;
  text-align: center;
}

.rank-card img {
  width: 92px;
  height: 126px;
  border-radius: 18px;
  object-fit: cover;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-card p {
  margin: 0;
  color: #5f6775;
  line-height: 1.65;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.pagination a {
  min-width: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #5b21b6;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 900;
  text-align: center;
}

.pagination a.active,
.pagination a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  margin-bottom: 22px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #5b21b6;
  font-weight: 800;
}

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

.player-card {
  overflow: hidden;
  border-radius: 32px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.18), rgba(88, 28, 135, 0.38));
  cursor: pointer;
}

.player-overlay span {
  width: 92px;
  height: 92px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  box-shadow: 0 24px 52px rgba(124, 58, 237, 0.35);
  font-size: 28px;
}

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

.detail-panel {
  padding: 28px;
  border-radius: 32px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-panel p,
.article-block p {
  color: #4b5563;
  line-height: 1.9;
}

.detail-kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.detail-kv div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.detail-kv span {
  display: block;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 900;
}

.detail-kv strong {
  display: block;
  margin-top: 4px;
  color: #374151;
  font-size: 15px;
}

.article-block {
  margin-top: 28px;
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--jelly-shadow);
  backdrop-filter: blur(24px);
}

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

.search-panel {
  padding: 26px;
  border-radius: 30px;
}

.search-form {
  display: flex;
  gap: 12px;
}

.search-input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  color: #374151;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search-results {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.search-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.64);
}

.search-item img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.search-item h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.search-item p {
  margin: 0;
  color: #5f6775;
  line-height: 1.6;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto 24px;
  padding: 34px;
  border-radius: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
}

.footer-grid p {
  color: #5f6775;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.footer-links a {
  color: #5f6775;
  font-weight: 700;
}

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

.footer-bottom {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  color: #6b7280;
  font-size: 14px;
}

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

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

  .hero-poster {
    display: none;
  }

  .hero-slide {
    padding: 56px;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .page-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 20px;
  }

  .hero-carousel {
    min-height: 590px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 32px 24px 72px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content p {
    font-size: 17px;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

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

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

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

  .rank-card .primary-btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .rank-card img {
    width: 76px;
    height: 104px;
  }

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

  .search-form {
    flex-direction: column;
  }
}
