:root {
  --pink: #ec4899;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #f59e0b;
  --blue: #0ea5e9;
  --cyan: #06b6d4;
  --green: #22c55e;
  --purple: #8b5cf6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff1f2;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fdf2f8 0%, #ffffff 48%, #eff6ff 100%);
}

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

img {
  display: block;
  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: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

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

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

.logo-mark {
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  animation: heartbeat 1.5s ease-in-out infinite;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--red);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 16px;
  animation: slide-down 0.3s ease-out;
}

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

.mobile-link {
  display: block;
  border-radius: 12px;
  padding: 12px 14px;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--red);
  background: #fff1f2;
}

.home-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  margin-bottom: 54px;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, var(--pink), var(--red), var(--yellow), var(--pink));
  background-size: 200% 200%;
  animation: gradient 3.5s ease infinite;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to top, #fdf2f8, rgba(253, 242, 248, 0));
}

.hero-inner {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: center;
  gap: 36px;
  color: #fff;
}

.hero-copy {
  max-width: 730px;
  animation: fade-in 0.5s ease-in;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero .eyebrow {
  color: #fff7ed;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.heart {
  display: inline-block;
  color: #fecaca;
  animation: heartbeat 1.5s ease-in-out infinite;
}

.hero-desc {
  margin: 24px 0 0;
  max-width: 680px;
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1.65;
  animation: slide-up 0.5s ease-out;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: var(--red);
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
}

.hero-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin-top: 26px;
  border-radius: 999px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.16);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 13px 16px;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--pink), var(--red));
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.hero-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.focus-links {
  display: grid;
  gap: 14px;
}

.focus-links a {
  display: block;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.focus-links a:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.24);
}

.focus-links strong,
.focus-links span {
  display: block;
}

.focus-links span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.55;
}

.section-block {
  margin-bottom: 64px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-title span {
  font-size: 30px;
}

.section-title h2 {
  margin: 0;
  flex: 1;
  color: transparent;
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
}

.section-title a {
  color: var(--red);
  font-weight: 800;
}

.rank-title h2 {
  background-image: linear-gradient(90deg, var(--blue), var(--cyan));
}

.latest-title h2 {
  background-image: linear-gradient(90deg, var(--green), var(--cyan));
}

.category-title h2,
.library-title h2 {
  background-image: linear-gradient(90deg, var(--purple), var(--pink));
}

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

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

.search-grid,
.category-movie-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(17, 24, 39, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(17, 24, 39, 0.16);
}

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

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-glow {
  opacity: 1;
}

.duration-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.duration-pill {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #facc15, var(--orange));
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.35);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 45px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--red);
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 10px 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-row span {
  color: #6b7280;
  font-size: 12px;
}

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

.soft-band {
  padding: 58px 0 6px;
  margin-bottom: 58px;
  background: linear-gradient(90deg, #ffedd5, #ffe4e6, #fdf2f8);
}

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

.category-tile {
  display: grid;
  min-height: 168px;
  align-content: space-between;
  border: 1px solid rgba(236, 72, 153, 0.15);
  border-radius: 24px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(236, 72, 153, 0.16);
}

.category-tile span {
  color: transparent;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
}

.category-tile strong {
  display: block;
  margin: 12px 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
}

.category-tile em {
  color: #9ca3af;
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.page-main {
  padding: 42px 0 30px;
}

.page-hero {
  border-radius: 32px;
  padding: 48px;
  margin-bottom: 42px;
  background: linear-gradient(135deg, #fff, #fff1f2 55%, #eff6ff);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: var(--ink);
  font-size: clamp(34px, 4vw, 58px);
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(236, 72, 153, 0.12);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.search-box {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 800;
}

.search-box input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  padding: 13px 14px;
  color: #374151;
  background: #fff;
}

.search-box input:focus,
.filter-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

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

.empty-result {
  display: none;
  margin: 0;
  border-radius: 16px;
  padding: 16px;
  color: #be123c;
  font-weight: 800;
  background: #ffe4e6;
}

.empty-result.show {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 60px 132px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.12);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, var(--orange));
}

.rank-thumb {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: #fee2e2;
}

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-info a {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.rank-score {
  text-align: right;
}

.rank-score strong,
.rank-score span {
  display: block;
}

.rank-score strong {
  color: var(--red);
  font-size: 20px;
}

.rank-score span {
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--red);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  border-radius: 32px;
  padding: 30px;
  margin-bottom: 38px;
  background: linear-gradient(135deg, #fff, #fff1f2 60%, #eff6ff);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: #ffe4e6;
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.16);
}

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

.detail-info h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.detail-one-line {
  margin: 18px 0 20px;
  color: #4b5563;
  font-size: 19px;
  line-height: 1.8;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #374151;
  font-weight: 800;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
}

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

.detail-info .primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--pink), var(--red));
}

.player-section {
  margin-bottom: 38px;
}

.player-section h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.26);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.16));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 6px;
  color: var(--red);
  font-size: 34px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  animation: heartbeat 1.8s ease-in-out infinite;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 58px;
}

.text-panel {
  border-radius: 26px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(17, 24, 39, 0.08);
}

.text-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 60px;
  color: #fff;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr 1.5fr;
  gap: 36px;
  padding: 44px 0;
}

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

.site-footer p {
  margin: 0;
  max-width: 460px;
  color: #cbd5e1;
  line-height: 1.75;
}

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

.site-footer a:not(.footer-logo) {
  display: inline-block;
  margin: 0 14px 10px 0;
  color: #cbd5e1;
  font-size: 14px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  color: #cbd5e1;
  text-align: center;
  font-size: 14px;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: linear-gradient(to bottom, var(--pink), var(--red));
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.1);
  }

  50% {
    transform: scale(1);
  }

  75% {
    transform: scale(1.15);
  }
}

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

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .home-hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-panel {
    margin-bottom: 40px;
  }

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

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

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

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

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

  .rank-row {
    grid-template-columns: 44px 100px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }
}

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

  .logo-text {
    font-size: 21px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 40px;
  }

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

  .hero-search {
    border-radius: 24px;
  }

  .hero-search button {
    width: 100%;
  }

  .page-hero,
  .detail-hero,
  .text-panel {
    border-radius: 22px;
    padding: 22px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-title {
    min-height: 38px;
    font-size: 15px;
  }

  .card-body p {
    min-height: 40px;
    font-size: 13px;
  }

  .section-title {
    align-items: flex-start;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .section-title a {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: 40px 84px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-info p {
    display: none;
  }

  .rank-score {
    display: none;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
