* {
  box-sizing: border-box;
}

: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;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow-soft: 0 18px 60px rgba(31, 38, 135, 0.20);
  --shadow-card: 0 8px 32px rgba(31, 38, 135, 0.16);
  --glass: rgba(255, 255, 255, 0.78);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--jelly-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "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 {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.35), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(255, 196, 221, 0.30), transparent 28%),
    radial-gradient(circle at 50% 88%, rgba(196, 221, 255, 0.32), transparent 34%);
  z-index: -1;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(28px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 8px 30px rgba(31, 38, 135, 0.12);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.35);
}

.logo strong {
  font-size: 1.26rem;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.pill-link {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #39405f;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.pill-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: #4a5568;
  border-radius: 8px;
}

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

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

.hero {
  position: relative;
  margin: 32px auto 34px;
  min-height: 640px;
  border-radius: 38px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.30);
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 36, 72, 0.86), rgba(31, 36, 72, 0.46), rgba(31, 36, 72, 0.10));
}

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

.hero-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 30px;
  padding: 72px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero h1,
.detail-title h1,
.page-title h1 {
  margin: 18px 0;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.hero p,
.page-title p,
.detail-title p {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.primary-button,
.play-button {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #f093fb);
  box-shadow: 0 14px 34px rgba(102, 126, 234, 0.35);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px);
}

.primary-button:hover,
.secondary-button:hover,
.play-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(31, 38, 135, 0.30);
}

.hero-panel {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.26);
  padding: 22px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--jelly-accent-lavender), var(--jelly-accent-blue));
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.search-strip,
.filter-bar,
.page-title,
.section-block,
.detail-shell,
.player-shell,
.article-shell,
.related-shell,
.category-card,
.ranking-row {
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: var(--shadow-card);
}

.search-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  margin: 0 0 34px;
}

.search-strip input,
.search-strip select,
.filter-bar input,
.search-page-panel input,
.search-page-panel select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  padding: 0 18px;
  color: #2d3748;
  outline: none;
}

.section-block {
  padding: 30px;
  margin: 28px 0;
}

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

.section-head h2,
.page-title h1,
.article-shell h2,
.related-shell h2,
.player-shell h2 {
  margin: 0;
  color: #26304f;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.section-head p,
.category-card p,
.article-shell p,
.related-shell p,
.page-title p,
.movie-card p,
.ranking-row p {
  color: var(--jelly-text-secondary);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.36s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #d4c5f9, #c4ddff, #ffc4dd);
}

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

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

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.42));
}

.quality-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #f093fb);
  box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 0.86rem;
}

.meta-line span,
.tag-row span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(102, 126, 234, 0.10);
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #26304f;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #667eea;
}

.movie-card p {
  margin: 0;
  min-height: 54px;
  font-size: 0.92rem;
}

.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #4a5568;
  font-size: 0.84rem;
}

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

.category-card {
  display: block;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #26304f;
}

.page-title {
  margin: 32px 0 28px;
  padding: 40px;
  overflow: hidden;
  position: relative;
}

.page-title::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -50px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.78), transparent 70%);
}

.page-title h1,
.page-title p {
  position: relative;
  z-index: 1;
  color: #26304f;
  text-shadow: none;
}

.filter-bar,
.search-page-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0;
}

.page-nav a {
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.page-nav a.active,
.page-nav a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea, #f093fb);
}

.detail-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  padding: 34px;
  margin: 32px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #d4c5f9, #c4ddff, #ffc4dd);
  box-shadow: var(--shadow-card);
}

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

.detail-title h1 {
  color: #26304f;
  text-shadow: none;
}

.detail-title p {
  color: #4a5568;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #667eea;
  font-size: 0.95rem;
}

.player-shell,
.article-shell,
.related-shell {
  padding: 30px;
  margin: 28px 0;
}

.player {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  font-size: 2rem;
  background: linear-gradient(135deg, #667eea, #f093fb);
  box-shadow: 0 14px 40px rgba(102, 126, 234, 0.42);
}

.player.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.article-shell p {
  margin: 14px 0 0;
  color: #3f4965;
  font-size: 1.02rem;
}

.article-shell h2 + p {
  margin-bottom: 22px;
}

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

.compact-card .movie-card-body {
  padding: 12px;
}

.compact-card p,
.compact-card .tag-row {
  display: none;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 74px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-row .number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #f093fb);
}

.ranking-row img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, #d4c5f9, #c4ddff);
}

.ranking-row h3 {
  margin: 0 0 8px;
  color: #26304f;
}

.search-results-note {
  margin: 0 0 18px;
  color: #4a5568;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 26px;
  padding: 28px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: var(--shadow-card);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.footer-logo {
  margin-bottom: 14px;
}

.site-footer p {
  color: #5b6478;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: #26304f;
}

.copyright {
  margin: 18px 0 0;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

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

  .hero-panel {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: flex;
  }

  .hero {
    min-height: 640px;
    border-radius: 28px;
  }

  .hero-content {
    padding: 38px 24px 80px;
  }

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

  .search-strip,
  .filter-bar,
  .search-page-panel,
  .ranking-row {
    grid-template-columns: 1fr;
  }

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

  .detail-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .ranking-row img {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 520px) {
  main,
  .header-inner,
  .mobile-nav,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

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

  .section-block,
  .player-shell,
  .article-shell,
  .related-shell,
  .page-title {
    padding: 20px;
  }
}
