:root {
  --pink: #ec4899;
  --pink-dark: #db2777;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --green: #22c55e;
  --orange: #f97316;
  --yellow: #f59e0b;
  --purple: #8b5cf6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 28px;
}

* {
  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", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fdf2f8 0%, #eff6ff 48%, #f0fdf4 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;
}

.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(90deg, rgba(253, 242, 248, 0.92), rgba(239, 246, 255, 0.92), rgba(240, 253, 244, 0.92));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 14px 28px rgba(236, 72, 153, 0.25);
}

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--pink);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 2px solid #fbcfe8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  outline: 0;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input {
  width: min(260px, 22vw);
  padding: 10px 16px;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-reset {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--blue));
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
}

.secondary-button {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-reset:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 38px rgba(236, 72, 153, 0.24);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  color: #374151;
  cursor: pointer;
}

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

.mobile-panel[hidden] {
  display: none;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
}

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

.mobile-nav a {
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  color: #374151;
  font-weight: 700;
}

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

.hero-shell {
  padding: 34px 0 38px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 4px;
  background: linear-gradient(90deg, #f472b6, #60a5fa, #4ade80);
  box-shadow: var(--shadow);
}

.hero-slide {
  display: none;
  min-height: 500px;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
}

.hero-slide.active {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 5vw, 58px);
  animation: fadeIn 0.6s ease both;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: var(--pink-dark);
  background: #fce7f3;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  margin: 0 0 26px;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags a,
.hero-tags span,
.card-tags span,
.detail-tags span,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: #2563eb;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.hero-media {
  position: relative;
  min-height: 350px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32);
  transform: rotate(1deg);
  transition: transform 0.35s ease;
}

.hero-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 65%);
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
  color: #ffffff;
}

.hero-caption p {
  color: rgba(255, 255, 255, 0.85);
}

.hero-caption strong {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 5vw, 58px);
  bottom: 24px;
  display: flex;
  gap: 8px;
  z-index: 4;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.24);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--pink), var(--blue));
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.gradient-title {
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.card-cover img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .card-cover img,
.mini-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.card-meta-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  top: 12px;
  bottom: auto;
  background: linear-gradient(90deg, var(--pink), var(--orange));
}

.card-body {
  padding: 18px;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
  color: var(--pink);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #4b5563;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.feature-strip {
  overflow: hidden;
  border-radius: var(--radius);
  padding: 28px;
  background: linear-gradient(90deg, #ffedd5, #fce7f3);
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.08);
}

.scroll-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  width: 330px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border-radius: 26px;
  background: #111827;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.category-card img {
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-card:hover img {
  opacity: 0.9;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.category-card-body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 20px;
  color: #ffffff;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

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

.ranking-list,
.side-panel,
.detail-panel,
.player-card,
.content-card,
.filter-panel,
.empty-state {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.ranking-list {
  overflow: hidden;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 180px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
  border-bottom: 0;
}

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

.ranking-row img {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-heat {
  white-space: nowrap;
  color: var(--pink);
  font-weight: 900;
}

.side-panel,
.detail-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.side-panel h2,
.detail-panel h2,
.content-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.mini-list {
  display: grid;
  gap: 16px;
}

.mini-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.mini-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.mini-cover img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.mini-rank {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--pink);
  font-size: 12px;
  font-weight: 900;
}

.mini-body {
  min-width: 0;
}

.mini-body strong {
  display: block;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-body em {
  display: block;
  margin: 5px 0;
  color: var(--pink);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.mini-body small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.filter-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 28px;
}

.filter-search {
  flex: 1;
}

.filter-input {
  width: 100%;
  padding: 14px 18px;
}

.filter-controls {
  display: flex;
  gap: 12px;
}

.filter-select {
  min-width: 150px;
  padding: 0 16px;
  color: #374151;
}

.empty-state {
  display: none;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--pink), var(--blue));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 32px;
  transition: transform 0.25s ease;
}

.player-overlay:hover .play-button {
  transform: scale(1.08);
}

.player-caption {
  padding: 22px;
}

.player-caption h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

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

.content-card p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.detail-meta {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.detail-meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.detail-meta strong {
  color: var(--text);
}

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

.site-footer {
  margin-top: 56px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0 28px;
}

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

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

.footer-links a {
  color: #4b5563;
}

.footer-links a:hover {
  color: var(--pink);
}

.copyright {
  padding: 18px 0 28px;
  border-top: 1px solid #e5e7eb;
  color: var(--muted);
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero-slide.active,
  .detail-layout,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .hero-dots {
    position: static;
    padding: 0 28px 24px;
    background: rgba(255, 255, 255, 0.96);
  }

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

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

  .side-panel,
  .detail-panel {
    position: static;
  }

  .ranking-row {
    grid-template-columns: 48px 130px 1fr;
  }

  .ranking-heat {
    grid-column: 3;
  }
}

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

  .logo,
  .footer-logo {
    font-size: 20px;
  }

  .hero-slide.active {
    min-height: auto;
    padding: 24px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-media {
    min-height: auto;
  }

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

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

  .filter-panel,
  .filter-controls {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
    min-height: 48px;
  }

  .ranking-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-row img {
    grid-column: 1 / -1;
  }

  .ranking-heat {
    grid-column: 2;
  }

  .mini-card {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .play-button {
    width: 72px;
    height: 72px;
  }
}
