:root {
  --rose: #f43f5e;
  --pink: #ec4899;
  --orange: #f97316;
  --amber: #f59e0b;
  --yellow: #facc15;
  --violet: #8b5cf6;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --slate: #334155;
  --text: #1f2937;
  --muted: #64748b;
  --soft: #fff7fb;
  --line: rgba(15, 23, 42, 0.1);
  --shadow: 0 20px 45px rgba(244, 63, 94, 0.14);
  --shadow-strong: 0 28px 70px rgba(244, 63, 94, 0.26);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 45%, #fff7ed 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--rose), var(--pink), var(--orange));
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(244, 63, 94, 0.25);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: var(--rose);
  background: #ffffff;
  box-shadow: inset 0 -8px 20px rgba(250, 204, 21, 0.28);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-weight: 700;
}

.main-nav a {
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.header-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 8px 10px;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.btn-primary,
.btn-ghost,
.sort-button,
.player-start {
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--rose);
  background: #ffffff;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, #f43f5e 0%, #ec4899 52%, #f97316 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.22;
  pointer-events: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  left: 8%;
  top: 8%;
  background: #ffffff;
}

.hero::after {
  width: 440px;
  height: 440px;
  right: 7%;
  bottom: 3%;
  background: var(--yellow);
}

.hero-slider {
  isolation: isolate;
}

.hero-slides {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-slide {
  display: none;
  padding: 76px 0 60px;
}

.hero-slide.is-active {
  display: block;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

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

.btn-primary {
  color: var(--rose);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.22);
}

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

.btn-primary:hover,
.btn-ghost:hover,
.sort-button:hover,
.player-start:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 20px 0 0;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-meta span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-panel {
  position: relative;
  border-radius: 34px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: 26px;
  background: radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.36), transparent 30%), linear-gradient(135deg, #fb7185, #f97316);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-panel:hover .hero-poster img {
  transform: scale(1.05);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.66));
}

.hero-poster-title {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  font-size: 24px;
  font-weight: 900;
}

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

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.section {
  padding: 62px 0;
}

.section-soft {
  background: rgba(255, 255, 255, 0.48);
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--rose);
  font-weight: 900;
}

.section-head p {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.stat-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.stat-card span {
  color: var(--muted);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.category-card strong {
  position: relative;
  z-index: 3;
  font-size: 24px;
  line-height: 1.1;
}

.category-card em {
  position: relative;
  z-index: 3;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-style: normal;
  font-size: 14px;
}

.category-cover {
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 142px;
  height: 190px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(8deg);
}

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

.category-glow {
  position: absolute;
  inset: auto auto -40px -30px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(4px);
}

.from-rose {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
}

.from-orange {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.from-violet {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.from-pink {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.from-blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.from-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.from-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.from-cyan {
  background: linear-gradient(135deg, #06b6d4, #10b981);
}

.from-emerald {
  background: linear-gradient(135deg, #10b981, #22c55e);
}

.from-slate {
  background: linear-gradient(135deg, #334155, #8b5cf6);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(244, 63, 94, 0.1);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 38px rgba(244, 63, 94, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  display: block;
}

.poster-shell {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.5), transparent 30%), linear-gradient(135deg, #fb7185, #f97316);
}

.poster-shell img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--rose);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3em;
  margin-bottom: 10px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.card-meta span,
.detail-meta span {
  padding: 5px 10px;
  color: var(--rose);
  background: rgba(244, 63, 94, 0.09);
  font-size: 12px;
}

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #9f1239;
  background: #ffe4e6;
  font-size: 12px;
  font-weight: 700;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(120deg, var(--rose), var(--pink), var(--orange));
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: 10%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(12px);
}

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.sort-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sort-button {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text);
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.sort-button.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--rose), var(--orange));
}

.filter-input,
.search-hero-form input {
  min-height: 46px;
  border: 1px solid rgba(244, 63, 94, 0.18);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 18px;
}

.filter-input {
  width: min(340px, 100%);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-weight: 900;
}

.rank-thumb {
  width: 72px;
  height: 96px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.rank-info strong {
  display: block;
  color: #111827;
  font-size: 18px;
}

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

.rank-heat {
  padding: 8px 12px;
  border-radius: 999px;
  color: #9f1239;
  background: #ffe4e6;
  font-weight: 900;
}

.detail-hero {
  padding: 54px 0;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
}

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

.breadcrumb a:hover {
  color: var(--rose);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, #fb7185, #f97316);
  box-shadow: var(--shadow-strong);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-copy .lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
}

.rating-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 18px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 900;
}

.content-card {
  padding: 26px;
  border: 1px solid rgba(244, 63, 94, 0.11);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.content-card p {
  margin: 0;
  color: #374151;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.detail-stack {
  display: grid;
  gap: 24px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 88px;
  color: var(--muted);
  font-weight: 800;
}

.player-section {
  padding: 44px 0;
  background: #111827;
}

.player-section h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 42px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.54));
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--rose);
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.32);
}

.player-start strong {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.video-shell.is-playing .player-start,
.video-shell.is-loading .player-start {
  opacity: 0;
  pointer-events: none;
}

.search-hero-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.search-hero-form input {
  flex: 1 1 280px;
}

.search-status {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #94a3b8;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pagination-links a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--rose);
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

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

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

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

@media (max-width: 820px) {
  .nav-wrap {
    flex-wrap: wrap;
    min-height: 66px;
  }

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    order: 5;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 0 0 16px;
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
  }

  .hero {
    min-height: auto;
  }

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

  .hero-panel {
    max-width: 440px;
    margin: 0 auto;
  }

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

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

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

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

  .hero-slide {
    padding: 44px 0 68px;
  }

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

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

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

  .rank-heat {
    grid-column: 3;
    justify-self: start;
  }

  .rank-thumb {
    width: 60px;
    height: 82px;
  }
}
