:root {
  --page-bg: linear-gradient(135deg, #fff4e6 0%, #ffe8e0 42%, #f8e8ee 100%);
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-solid: #ffffff;
  --text: #251f24;
  --muted: #6f6370;
  --soft-muted: #9b8d99;
  --line: rgba(43, 31, 39, 0.10);
  --accent: #f472b6;
  --accent-dark: #db2777;
  --accent-soft: #fdf2f8;
  --orange: #ff9a8b;
  --orange-soft: #ffd4b2;
  --purple: #c084fc;
  --green: #34d399;
  --shadow: 0 18px 50px rgba(80, 36, 55, 0.15);
  --shadow-soft: 0 12px 24px rgba(0, 0, 0, 0.10);
  --radius: 24px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background: var(--page-bg);
}

a {
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

a:hover,
button:hover {
  transform: translateY(-2px);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(70, 42, 62, 0.08);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-dark);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 10px 24px rgba(244, 114, 182, 0.32);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  color: #55464f;
  border-radius: 999px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--accent-dark);
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #111111;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

.hero-slide img.image-missing,
.detail-backdrop img.image-missing,
.poster-media img.image-missing {
  opacity: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-pill,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 16px 30px rgba(244, 114, 182, 0.34);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px);
}

.ghost-btn.light {
  color: var(--accent-dark);
  background: #ffffff;
  border-color: rgba(244, 114, 182, 0.18);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(12px);
  font-size: 34px;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  gap: 10px;
  transform: translateX(50%);
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  background: #ffffff;
}

.section-block {
  padding: 56px 0;
}

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

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
}

.section-kicker {
  color: var(--accent-dark);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.compact-heading {
  margin-bottom: 18px;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 800;
}

.glass-panel,
.movie-card,
.content-card,
.category-tile,
.category-overview-card,
.hot-rank-panel {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.search-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(22px, 3vw, 34px);
}

.inline-search,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inline-search input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid rgba(244, 114, 182, 0.22);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.88);
}

.inline-search input:focus,
.filter-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.12);
}

.inline-search button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  white-space: nowrap;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  font-weight: 800;
}

.filter-bar {
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-bar span {
  color: var(--accent-dark);
  white-space: nowrap;
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 52px rgba(80, 36, 55, 0.22);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.72), transparent 36%),
    linear-gradient(135deg, #ffb3c6, #ffd4b2 52%, #c8d5b9);
}

.large-card .poster-media {
  aspect-ratio: 4 / 5;
}

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

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

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-size: 34px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.36);
  transition: opacity 0.3s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: var(--shadow-soft);
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--soft-muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h2 {
  display: -webkit-box;
  min-height: 2.55em;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 18px;
  line-height: 1.28;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3em;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.movie-card .tag-row span {
  color: var(--accent-dark);
  background: var(--accent-soft);
  backdrop-filter: none;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

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

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

.category-tile,
.category-overview-card a {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.category-tile strong,
.category-overview-card h2 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 24px;
}

.category-tile span,
.category-count {
  width: fit-content;
  padding: 4px 10px;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  font-size: 13px;
  font-weight: 800;
}

.category-tile em,
.category-overview-card p,
.category-overview-card em {
  color: var(--muted);
  font-style: normal;
}

.hot-rank-panel {
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.rank-item:hover {
  color: var(--accent-dark);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: grid;
  height: 44px;
  place-items: center;
  color: #ffffff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  font-weight: 900;
}

.rank-text {
  min-width: 0;
}

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

.rank-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.38), transparent 28%),
    linear-gradient(135deg, #1f1720, #3c2633 52%, #6f314f);
}

.slim-hero {
  padding: 86px 0 64px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.detail-hero {
  min-height: 560px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(2px);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 12, 16, 0.94), rgba(17, 12, 16, 0.64), rgba(17, 12, 16, 0.22)),
    linear-gradient(0deg, rgba(17, 12, 16, 0.82), transparent 60%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  min-height: 560px;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.26);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  margin-top: 18px;
  margin-bottom: 14px;
}

.detail-meta span,
.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #08080a;
  box-shadow: var(--shadow);
}

.main-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(244, 114, 182, 0.42), rgba(0, 0, 0, 0.52));
}

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

.play-start span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--orange));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  font-size: 32px;
}

.play-start strong {
  font-size: 18px;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  margin: 0;
  color: #ffffff;
  text-align: center;
}

.content-card {
  margin-top: 22px;
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--muted);
}

.compact-card {
  margin-top: 0;
}

.movie-dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.movie-dl dt {
  color: var(--soft-muted);
  font-weight: 800;
}

.movie-dl dd {
  margin: 0;
  color: var(--text);
}

.page-turner {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.page-turner a {
  color: var(--accent-dark);
  font-weight: 800;
}

.all-movie-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.all-movie-list li {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.all-movie-list a {
  color: var(--accent-dark);
  font-weight: 800;
}

.all-movie-list span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  padding: 42px 0;
  background: rgba(255, 255, 255, 0.62);
  border-top: 1px solid rgba(255, 255, 255, 0.76);
}

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

.site-footer p {
  color: var(--muted);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  color: var(--accent-dark);
  border-radius: 999px;
  background: #ffffff;
  font-weight: 700;
}

.compact-links a {
  font-size: 13px;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.55s ease-out;
}

.is-filtered-out {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

  .hot-rank-panel {
    order: -1;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .hero-control {
    display: none;
  }

  .search-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    min-height: auto;
    padding: 52px 0;
  }

  .detail-poster {
    max-width: 260px;
  }

  .movie-grid,
  .category-movie-grid,
  .rank-card-grid,
  .category-overview-grid,
  .wide-rank-list,
  .all-movie-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 580px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .hero-carousel {
    height: 600px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .movie-grid,
  .category-movie-grid,
  .rank-card-grid,
  .category-overview-grid,
  .wide-rank-list,
  .all-movie-list {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .inline-search {
    align-items: stretch;
    flex-direction: column;
  }

  .section-block {
    padding: 42px 0;
  }

  .movie-dl {
    grid-template-columns: 1fr;
  }
}
