:root {
  --jelly-bg-primary: #f8f9fe;
  --jelly-bg-secondary: #ffffff;
  --jelly-text-primary: #2d3748;
  --jelly-text-secondary: #718096;
  --jelly-accent-mint: #b8e6d5;
  --jelly-accent-lavender: #d4c5f9;
  --jelly-accent-pink: #ffc4dd;
  --jelly-accent-blue: #c4ddff;
  --jelly-accent-peach: #ffd4c4;
  --jelly-moon: #e8eaf6;
  --panel-bg: rgba(255, 255, 255, 0.78);
  --panel-line: rgba(255, 255, 255, 0.34);
  --shadow-soft: 0 8px 32px rgba(31, 38, 135, 0.16), 0 2px 8px rgba(31, 38, 135, 0.10);
  --shadow-strong: 0 18px 56px rgba(31, 38, 135, 0.28);
}

* {
  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", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
  background-size: 400% 400%;
  animation: gradientShift 30s ease infinite;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

.glass-panel,
.jelly-glass {
  border: 1px solid var(--panel-line);
  background: var(--panel-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.70);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1280px;
  min-height: 74px;
  margin: 0 auto;
  padding: 0 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #a78bfa, #f9a8d4);
  box-shadow: 0 0 34px rgba(232, 234, 246, 0.72);
}

.brand-text,
.footer-brand,
.jelly-gradient-text {
  color: transparent;
  background-image: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  background-clip: text;
  -webkit-background-clip: text;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.desktop-nav > a,
.nav-group > button {
  color: #4a5568;
  border: 0;
  background: transparent;
  transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-group > button:hover {
  color: #764ba2;
}

.nav-group {
  position: relative;
}

.nav-panel {
  position: absolute;
  top: 100%;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 310px;
  padding: 14px;
  margin-top: 16px;
  visibility: hidden;
  opacity: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: var(--shadow-strong);
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.nav-panel a {
  padding: 10px 12px;
  border-radius: 14px;
  color: #4a5568;
}

.nav-panel a:hover {
  background: rgba(118, 75, 162, 0.11);
  color: #764ba2;
}

.nav-group:hover .nav-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.header-search {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.header-search input,
.header-search button,
.wide-search input,
.wide-search button,
.filter-bar input,
.filter-bar select {
  border: 0;
  outline: 0;
}

.header-search input {
  width: 190px;
  padding: 11px 14px;
  background: transparent;
}

.header-search button,
.wide-search button,
.primary-button,
.small-button {
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 8px 24px rgba(118, 75, 162, 0.26);
}

.header-search button {
  padding: 0 18px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 22px 18px;
}

.mobile-nav a {
  padding: 10px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

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

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

.hero-carousel {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 34px;
  box-shadow: var(--shadow-strong);
  background: rgba(255, 255, 255, 0.22);
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  visibility: visible;
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  background: linear-gradient(90deg, rgba(22, 17, 50, 0.86), rgba(22, 17, 50, 0.46), rgba(22, 17, 50, 0.18)), linear-gradient(0deg, rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  min-height: 570px;
  padding: 62px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 6vw, 5.4rem);
  line-height: 1;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.20);
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta-line,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button,
.small-button,
.plain-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 700;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

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

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
}

.intro-copy,
.hot-panel,
.page-title,
.category-overview,
.ranking-row,
.detail-hero,
.player-section,
.detail-text,
.breadcrumb,
.prev-next {
  border-radius: 28px;
  padding: 28px;
}

.intro-copy h2,
.hot-panel h2,
.section-heading h2,
.page-title h1,
.detail-copy h1,
.player-section h2,
.detail-text h2 {
  margin: 0;
}

.intro-copy h2,
.page-title h1,
.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.06;
}

.intro-copy p,
.page-title p,
.detail-text p,
.ranking-copy p,
.category-overview p,
.lead-text {
  color: #4a5568;
  line-height: 1.8;
}

.wide-search {
  display: flex;
  max-width: 640px;
  overflow: hidden;
  margin-top: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.wide-search input {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  background: transparent;
}

.wide-search button {
  padding: 0 28px;
}

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

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-heading a,
.plain-link {
  color: #6b46c1;
  font-weight: 700;
}

.category-grid,
.movie-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

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

.category-tile {
  min-height: 142px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-strong);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.category-tile span {
  color: #667085;
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
}

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

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

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62));
  transition: opacity 0.25s ease;
}

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

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.movie-meta-line {
  justify-content: space-between;
  margin-bottom: 10px;
  color: #667085;
  font-size: 0.86rem;
}

.movie-card h3 {
  min-height: 2.8em;
  margin: 0 0 9px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.7em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #667085;
  font-size: 0.94rem;
  line-height: 1.58;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #6b46c1;
  background: rgba(118, 75, 162, 0.11);
  font-size: 0.82rem;
}

.rank-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea, #f093fb);
  font-weight: 800;
}

.rank-mini {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rank-mini img {
  width: 56px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-mini strong,
.rank-mini small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-mini small {
  margin-top: 6px;
  color: #718096;
}

.page-title {
  margin-top: 24px;
  margin-bottom: 28px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(118, 75, 162, 0.10);
}

.filter-bar input {
  min-width: min(420px, 100%);
}

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

.category-overview {
  display: grid;
  gap: 18px;
}

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

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 66px 110px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.big-rank {
  color: transparent;
  background-image: linear-gradient(135deg, #667eea, #f093fb);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
}

.ranking-poster img {
  width: 110px;
  height: 146px;
  border-radius: 18px;
  object-fit: cover;
}

.ranking-copy h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.detail-page {
  display: grid;
  gap: 28px;
}

.breadcrumb,
.prev-next {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
}

.detail-copy h1 {
  margin-bottom: 18px;
}

.detail-meta {
  margin: 18px 0;
}

.detail-meta span {
  color: #4a5568;
  background: rgba(255, 255, 255, 0.58);
}

.player-box {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 28px;
  background: #111827;
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.55));
}

.player-start span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #667eea, #f093fb);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  font-size: 2rem;
}

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

.detail-text h2 + p {
  margin-top: 12px;
}

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

.prev-next {
  justify-content: space-between;
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.footer-inner p {
  max-width: 520px;
  color: #718096;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

@media (max-width: 1120px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

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

@media (max-width: 780px) {
  .header-inner {
    min-height: 66px;
    padding: 0 16px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

  .hero-content {
    padding: 34px 24px;
  }

  .hero-dots {
    right: 22px;
    bottom: 18px;
  }

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

  .ranking-row {
    grid-template-columns: 48px 86px minmax(0, 1fr);
  }

  .ranking-row .small-button {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .ranking-poster img {
    width: 86px;
    height: 116px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 480px;
  }

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

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

  .wide-search,
  .filter-bar {
    display: grid;
    border-radius: 22px;
  }

  .wide-search button,
  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  .detail-hero,
  .player-section,
  .detail-text,
  .breadcrumb,
  .prev-next,
  .page-title,
  .intro-copy,
  .hot-panel {
    padding: 20px;
  }

  .ranking-row {
    grid-template-columns: 1fr;
  }

  .ranking-poster img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .big-rank {
    text-align: left;
  }
}
