:root {
  --rose: #e11d48;
  --pink: #db2777;
  --purple: #7c3aed;
  --dark: #111827;
  --muted: #6b7280;
  --line: #ffe4e6;
  --card: #ffffff;
  --soft: #fff1f2;
  --shadow: 0 24px 70px rgba(190, 18, 60, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--dark);
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 55%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(255, 241, 242, 0.96), rgba(253, 242, 248, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(190, 18, 60, 0.06);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.3);
  font-size: 14px;
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, var(--rose), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--rose);
  background: rgba(255, 228, 230, 0.78);
}

.top-search,
.mobile-search,
.large-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search input,
.mobile-search input,
.large-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #fecdd3;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  background: #fff;
  color: #374151;
  outline: none;
}

.top-search input {
  width: 230px;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.15);
}

.top-search button,
.mobile-search button,
.large-search button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ffe4e6;
  color: var(--rose);
  font-size: 22px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 14px 24px 22px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
}

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

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(120deg, #fb7185, #db2777 48%, #7c3aed);
}

.hero-section:before,
.page-hero:before,
.detail-hero:before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.26), transparent 28%), radial-gradient(circle at 82% 12%, rgba(255,255,255,.18), transparent 24%), radial-gradient(circle at 70% 80%, rgba(255,255,255,.12), transparent 34%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, .42), rgba(17, 24, 39, .12));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  align-items: center;
}

.eyebrow {
  color: #fff;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  margin: 0 0 12px;
}

.eyebrow.dark {
  color: var(--rose);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy h1 span {
  color: #ffe4e6;
}

.hero-desc {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.9);
  font-size: 21px;
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: .2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  box-shadow: 0 18px 34px rgba(225,29,72,.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(225,29,72,.34);
}

.btn-ghost {
  color: #fff;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.28);
}

.hero-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-mini-links a {
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

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

.hero-card {
  position: relative;
  min-height: 210px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 65px rgba(17,24,39,.32);
  transform: translateZ(0);
}

.hero-main-card {
  grid-column: span 2;
  min-height: 280px;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .55s ease;
}

.hero-card:hover img {
  transform: scale(1.08);
}

.hero-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.78), rgba(0,0,0,.08));
}

.hero-card div {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: #fff;
}

.hero-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-card small {
  color: rgba(255,255,255,.78);
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

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

.section-head.slim {
  align-items: center;
  margin-bottom: 20px;
}

.section-head h2,
.tag-panel h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  color: #111827;
}

.section-head a {
  color: var(--rose);
  font-weight: 800;
}

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

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

.category-movie-grid {
  margin-top: 28px;
}

.movie-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(254,205,211,.72);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(190,18,60,.08);
  transition: .25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 0;
  background: #111827;
}

.compact .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.72));
  opacity: .78;
}

.play-pill {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: #fff;
  background: rgba(225,29,72,.92);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(239,68,68,.28);
}

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

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 850;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f9fafb;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #be123c;
  background: #ffe4e6;
  font-size: 12px;
  font-weight: 750;
}

.split-section {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
}

.rank-panel,
.tag-panel {
  background: #fff;
  border: 1px solid rgba(254,205,211,.72);
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 12px 38px rgba(190,18,60,.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 20px;
  transition: .2s ease;
}

.rank-item:hover {
  background: #fff1f2;
}

.rank-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-weight: 900;
}

.rank-item img {
  width: 82px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.rank-item p,
.rank-item em {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-panel p {
  margin: 12px 0 22px;
  color: #6b7280;
  line-height: 1.7;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.tag-cloud a {
  border-radius: 999px;
  padding: 10px 15px;
  color: #4b5563;
  background: #fff;
  border: 1px solid #fecdd3;
  font-weight: 750;
  transition: .2s ease;
}

.tag-cloud a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  transform: translateY(-2px);
}

.large-search input {
  flex: 1;
  min-width: 0;
}

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

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

.category-card {
  position: relative;
  min-height: 240px;
  border-radius: 30px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 22px 45px rgba(17,24,39,.15);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .5s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17,24,39,.88), rgba(225,29,72,.28));
}

.category-card div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 14px;
  color: rgba(255,255,255,.84);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card strong {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  background: linear-gradient(120deg, #fb7185, #db2777, #7c3aed);
  display: flex;
  align-items: center;
}

.page-hero > div {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 24px;
  color: #fff;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 19px;
  line-height: 1.7;
}

.filter-bar {
  background: #fff;
  border: 1px solid #fecdd3;
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(190,18,60,.08);
}

.filter-bar input {
  flex: 1;
  min-width: 220px;
}

.filter-bar select {
  min-width: 140px;
}

.movie-card.hidden-by-filter {
  display: none;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: .38;
  filter: blur(6px);
  transform: scale(1.04);
}

.detail-backdrop:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17,24,39,.95), rgba(17,24,39,.62), rgba(17,24,39,.88));
}

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

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 74px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 18px 0 42px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(0,0,0,.45);
  aspect-ratio: 3 / 4;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 68px);
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 21px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta span {
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 750;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-section {
  padding-top: 58px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #030712;
  box-shadow: 0 32px 80px rgba(17,24,39,.24);
  aspect-ratio: 16 / 9;
}

.player-wrap video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.player-wrap video {
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.player-cover img {
  object-fit: cover;
}

.player-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.72), rgba(0,0,0,.18));
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink));
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(225,29,72,.45);
}

.player-wrap.is-playing .player-cover {
  display: none;
}

.detail-article {
  margin-top: 34px;
  padding: 34px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid rgba(254,205,211,.78);
  box-shadow: 0 14px 38px rgba(190,18,60,.08);
}

.detail-article h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 28px;
}

.detail-article p {
  margin: 0 0 28px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.detail-article p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid #fecdd3;
  background: linear-gradient(180deg, #fff, #fff1f2);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #6b7280;
}

.footer-brand {
  color: var(--rose);
  font-size: 18px;
}

.footer-inner p {
  margin: 0;
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

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

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

  .header-inner {
    min-height: 66px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 54px;
    padding-bottom: 54px;
  }

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

  .hero-main-card {
    grid-column: span 1;
  }

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

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

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

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

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

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

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

  .hero-desc,
  .detail-one-line {
    font-size: 17px;
  }

  .hero-actions,
  .large-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .content-section {
    padding: 48px 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .player-wrap,
  .detail-article,
  .rank-panel,
  .tag-panel {
    border-radius: 22px;
  }

  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}
