:root {
  --rose: #f43f5e;
  --rose-deep: #e11d48;
  --pink: #ec4899;
  --amber: #f59e0b;
  --purple: #8b5cf6;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --soft: #fff1f2;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.13);
  --shadow-soft: 0 14px 40px rgba(225, 29, 72, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #1f2937;
  background: linear-gradient(135deg, #fff7f9 0%, #ffffff 42%, #fff7ed 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb7185, #e11d48 50%, #f97316);
  box-shadow: 0 10px 26px rgba(244, 63, 94, 0.34);
  font-size: 16px;
}

.brand-text,
.footer-brand span:last-child {
  font-size: clamp(20px, 2vw, 28px);
  background: linear-gradient(90deg, #e11d48, #ec4899, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  padding: 10px 12px;
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--rose);
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rose-deep);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid #ffe4e6;
  border-radius: 999px;
  background: #fff7f8;
}

.header-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 9px 12px;
  color: #111827;
}

.header-search button,
.hero-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #f43f5e, #ec4899);
  padding: 9px 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff1f2;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid #ffe4e6;
  background: rgba(255, 255, 255, 0.98);
}

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

.mobile-nav-inner {
  padding: 16px 0 20px;
}

.mobile-nav nav {
  display: grid;
  gap: 8px;
}

.mobile-search {
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px solid #ffe4e6;
  background: #fff7f8;
}

.mobile-search input {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 40%, #fffbeb 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(45px);
  opacity: 0.32;
  animation: blob 12s ease-in-out infinite alternate;
}

.hero::before {
  top: 28px;
  left: -120px;
  background: #fb7185;
}

.hero::after {
  right: -140px;
  bottom: -80px;
  background: #f59e0b;
  animation-delay: 2s;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: 72px 0 90px;
}

.hero-copy {
  max-width: 680px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  padding: 8px 14px;
  color: #be123c;
  font-weight: 900;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 20px 0 18px;
  color: #111827;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.gradient-text {
  background: linear-gradient(90deg, #e11d48, #ec4899, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead,
.page-hero p,
.detail-title p {
  margin: 0 0 28px;
  color: #64748b;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.btn-primary,
.btn-secondary,
.watch-link,
.rank-link,
.category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary,
.watch-link,
.rank-link {
  color: #ffffff;
  background: linear-gradient(90deg, #f43f5e, #ec4899);
  box-shadow: 0 18px 34px rgba(236, 72, 153, 0.28);
}

.btn-primary {
  padding: 14px 22px;
}

.btn-secondary {
  color: #334155;
  background: rgba(255, 255, 255, 0.84);
  padding: 14px 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
}

.btn-primary:hover,
.btn-secondary:hover,
.watch-link:hover,
.rank-link:hover,
.category-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 45px rgba(225, 29, 72, 0.22);
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  padding: 7px;
  border: 1px solid rgba(251, 113, 133, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  background: transparent;
}

.hero-carousel {
  position: relative;
  min-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  gap: 20px;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-poster-card {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border-radius: 34px;
  background: linear-gradient(160deg, #0f172a, #831843 55%, #f97316);
  box-shadow: var(--shadow);
}

.hero-poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.62));
}

.hero-info-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 500px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-info-card h2 {
  margin: 12px 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-info-card p {
  color: #64748b;
  margin: 0 0 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.tag-row span,
.detail-tags span,
.filter-pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffe4e6;
  color: #be123c;
  font-size: 12px;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: -44px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #fecdd3;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: #e11d48;
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 1;
  color: #ffffff;
}

.section {
  padding: 72px 0;
  background: #ffffff;
}

.section.soft {
  background: linear-gradient(135deg, #f8fafc, #fff1f2);
}

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

.section-head h2,
.page-title,
.detail-section h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: #64748b;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e, #ec4899 52%, #f59e0b);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #8b5cf6, #ec4899 55%, #fb7185);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6 55%, #22c55e);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 145px;
  height: 145px;
  right: -38px;
  bottom: -42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 28px 58px rgba(225, 29, 72, 0.22);
}

.category-icon {
  font-size: 34px;
}

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

.category-card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: #fecdd3;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

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

.poster-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: radial-gradient(circle at 30% 20%, #fecdd3, transparent 35%), linear-gradient(145deg, #881337, #0f172a 62%, #f97316);
}

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

.poster-shell.is-empty img {
  display: none;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 48px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(8px);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.28;
  color: #111827;
}

.movie-card h2 a:hover {
  color: var(--rose-deep);
}

.movie-card p {
  min-height: 70px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
}

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

.watch-link {
  width: 100%;
  margin-top: 16px;
  padding: 10px 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 88px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.13);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  width: 88px;
  border-radius: 18px;
}

.rank-info strong {
  display: block;
  color: #111827;
  font-size: 17px;
  line-height: 1.25;
}

.rank-info span {
  display: block;
  color: #64748b;
  margin: 4px 0 10px;
  font-size: 13px;
}

.rank-link {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 62px;
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #ec4899 55%, #f97316);
}

.page-hero h1 {
  color: #ffffff;
  max-width: 900px;
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.filter-panel,
.search-panel {
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 30px;
}

.filter-panel input,
.filter-panel select,
.search-panel input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: 0;
  padding: 12px 14px;
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 24px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.detail-main {
  background: #f8fafc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 36px 0 72px;
}

.player-card,
.detail-section,
.side-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.09);
}

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: radial-gradient(circle at 50% 46%, rgba(225, 29, 72, 0.22), rgba(15, 23, 42, 0.66));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  box-shadow: 0 24px 56px rgba(225, 29, 72, 0.4);
  font-size: 34px;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  text-align: center;
}

.detail-title {
  padding: 28px;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #475569;
  background: #f1f5f9;
  font-weight: 800;
}

.detail-section {
  margin-top: 22px;
  padding: 28px;
}

.detail-section p {
  color: #475569;
  font-size: 17px;
}

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

.side-card {
  padding: 20px;
  margin-bottom: 22px;
}

.side-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 22px;
}

.small-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.small-card:hover {
  background: #fff1f2;
}

.small-poster {
  width: 68px;
  border-radius: 15px;
}

.small-card strong {
  display: block;
  color: #111827;
  line-height: 1.28;
}

.small-card em {
  display: block;
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.search-panel {
  display: flex;
  gap: 10px;
  max-width: 760px;
  margin-top: 24px;
}

.search-panel input {
  flex: 1;
}

.search-summary {
  margin: 0 0 24px;
  color: #64748b;
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 52%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0 34px;
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
}

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

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

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
}

@keyframes blob {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(34px, 22px) scale(1.14);
  }
}

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

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

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

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 48px 0 90px;
  }

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

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

  .hero-poster-card {
    min-height: 300px;
  }

  .hero-info-card {
    min-height: auto;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    letter-spacing: -0.05em;
  }

  .hero-search,
  .search-panel {
    flex-direction: column;
    border-radius: 24px;
  }

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

  .section-head {
    display: block;
  }

  .rank-item {
    grid-template-columns: 48px 74px 1fr;
  }

  .rank-poster {
    width: 74px;
  }

  .detail-title,
  .detail-section {
    padding: 22px;
  }
}
