: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-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  --jelly-border: rgba(255, 255, 255, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--jelly-text-primary);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 197, 249, 0.65), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(255, 196, 221, 0.65), transparent 28rem),
    radial-gradient(circle at 50% 95%, rgba(184, 230, 213, 0.45), transparent 34rem),
    var(--jelly-bg-primary);
}

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

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

button,
input {
  font: inherit;
}

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

.jelly-glass {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--jelly-border);
  box-shadow: var(--jelly-shadow);
  backdrop-filter: blur(18px);
}

.jelly-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px rgba(31, 38, 135, 0.10);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.jelly-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 46px rgba(118, 75, 162, 0.18);
}

.jelly-gradient-text {
  background: linear-gradient(135deg, #667eea, #764ba2 45%, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.moon-glow,
.brand-mark {
  box-shadow: 0 0 28px rgba(192, 132, 252, 0.55);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-radius: 0 0 24px 24px;
}

.nav-shell {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #c084fc, #f9a8d4);
  font-size: 24px;
}

.brand-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 650;
}

.nav-link,
.nav-dropdown > a {
  color: #4a5568;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown:hover > a {
  color: #764ba2;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  width: 260px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-panel a {
  padding: 9px 10px;
  border-radius: 12px;
  color: #4a5568;
  font-size: 14px;
}

.dropdown-panel a:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #764ba2;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.header-search input,
.local-search input,
.search-hero input {
  border: 0;
  outline: 0;
  min-width: 190px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #2d3748;
}

.header-search button,
.search-hero button,
.primary-btn,
.secondary-btn,
.play-mask span {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(168, 85, 247, 0.26);
}

.header-search button {
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: #764ba2;
  font-size: 23px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 20px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero {
  position: relative;
  margin-top: 28px;
  min-height: 620px;
  border-radius: 36px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 24px 70px rgba(31, 38, 135, 0.2);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 18, 35, 0.86), rgba(20, 18, 35, 0.45) 50%, rgba(20, 18, 35, 0.2)),
    linear-gradient(0deg, rgba(20, 18, 35, 0.66), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 48px));
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 70px 0 70px 58px;
  color: #fff;
}

.hero-kicker,
.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: none;
}

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

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  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.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 36px;
  background: #fff;
}

.section-block,
.page-hero,
.detail-layout,
.category-overview,
.search-block {
  margin-top: 56px;
}

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

.section-heading h1,
.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading h2 span {
  margin-right: 10px;
}

.section-heading p,
.page-hero p,
.search-empty,
.footer-grid p {
  margin: 10px 0 0;
  color: var(--jelly-text-secondary);
  line-height: 1.8;
}

.section-link {
  color: #764ba2;
  font-weight: 800;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: linear-gradient(135deg, #f3e8ff, #fdf2f8);
}

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  font-size: 12px;
  font-weight: 800;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.card-tags span,
.detail-tags span,
.category-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(212, 197, 249, 0.48);
  color: #6b46c1;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  margin: 0 0 10px;
  color: var(--jelly-text-secondary);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: var(--jelly-text-secondary);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-card {
  padding: 24px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  min-height: 76px;
  margin: 0 0 18px;
  color: var(--jelly-text-secondary);
  line-height: 1.75;
}

.category-card a {
  color: #764ba2;
  font-weight: 800;
}

.page-hero {
  padding: 42px;
  border-radius: 30px;
}

.local-search,
.search-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.local-search input,
.search-hero input {
  width: min(460px, 100%);
  border: 1px solid rgba(212, 197, 249, 0.55);
}

.search-hero button {
  padding: 12px 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea, #ec4899);
  color: #fff;
  font-weight: 900;
}

.rank-item img {
  width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--jelly-text-secondary);
  line-height: 1.7;
}

.rank-item .primary-btn {
  white-space: nowrap;
  padding: 11px 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.detail-title {
  padding: 32px;
  border-radius: 30px;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-meta {
  color: var(--jelly-text-secondary);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.player-card {
  padding: 16px;
  border-radius: 30px;
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  aspect-ratio: 16 / 9;
}

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

.play-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(20, 18, 35, 0.42), rgba(20, 18, 35, 0.7));
}

.play-mask span {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  font-size: 32px;
}

.play-mask strong {
  font-size: 20px;
}

.play-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
}

.content-card h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #4a5568;
  line-height: 1.95;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
}

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

.related-list {
  display: grid;
  gap: 10px;
}

.related-list a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: #4a5568;
  font-weight: 750;
}

.related-list a:hover {
  color: #764ba2;
  background: rgba(255, 255, 255, 0.9);
}

.breadcrumb {
  margin: 24px 0 0;
  color: var(--jelly-text-secondary);
  font-size: 14px;
}

.breadcrumb a {
  color: #764ba2;
  font-weight: 800;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.site-footer {
  margin-top: 70px;
  border-radius: 30px 30px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 26px;
  padding: 42px 0;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: var(--jelly-text-secondary);
}

.footer-grid a:hover {
  color: #764ba2;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: var(--jelly-text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

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

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

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

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

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

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

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

  .detail-side {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 20px;
  }

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

  .hero-content {
    min-height: 560px;
    width: calc(100% - 28px);
    padding: 48px 0 56px 24px;
  }

  .hero p {
    font-size: 16px;
  }

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

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .category-cards,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-title,
  .content-card {
    padding: 24px;
  }

  .rank-item {
    grid-template-columns: auto 78px 1fr;
  }

  .rank-item .primary-btn {
    grid-column: 2 / -1;
  }

  .rank-item img {
    width: 78px;
  }
}
