:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7fb;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #ec4899;
  --primary-dark: #db2777;
  --accent: #7c3aed;
  --gold: #f59e0b;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --container: min(1180px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(236, 72, 153, 0.08), transparent 30%), var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.site-logo span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(236, 72, 153, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 15px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary-dark);
  background: #fdf2f8;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fdf2f8;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 999px;
}

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

.hero-slider {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.15);
  transform: scale(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.78), rgba(236, 72, 153, 0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: var(--container);
  min-height: 650px;
  margin: 0 auto;
  padding: 70px 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 56px;
}

.hero-copy {
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-size: 13px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

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

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.tag-list span {
  background: #f1f5f9;
  color: #475569;
}

.tag-list.large span {
  background: #fff1f7;
  color: var(--primary-dark);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.30);
}

.btn.ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
}

.btn.soft {
  color: var(--primary-dark);
  background: #fdf2f8;
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.section-wrap {
  width: var(--container);
  margin: 56px auto;
}

.section-wrap.tinted {
  padding: 32px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(253, 242, 248, 0.95), rgba(238, 242, 255, 0.95));
}

.section-head,
.search-panel,
.list-tools,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head h2,
.search-panel h2,
.list-tools h2,
.category-overview-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p,
.search-panel p,
.list-tools p,
.category-overview-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--primary-dark);
  font-weight: 900;
}

.search-panel {
  margin-top: -36px;
  position: relative;
  z-index: 5;
  padding: 28px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-form {
  display: flex;
  width: min(520px, 100%);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-form.center {
  margin: 24px auto 0;
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--text);
}

.search-form button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
  cursor: pointer;
}

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

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

.movie-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
}

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

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

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(236, 72, 153, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-body a:hover h3,
.rank-info a:hover h3,
.movie-card.compact a:hover h3 {
  color: var(--primary-dark);
}

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

.card-meta,
.meta-line {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.meta-line span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f8fafc;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: #111827;
  box-shadow: var(--soft-shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

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

.category-card div {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  font-size: 12px;
  font-weight: 900;
}

.category-card h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.rank-number {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(236, 72, 153, 0.22);
}

.rank-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-poster {
  display: block;
  height: 118px;
  border-radius: 16px;
  overflow: hidden;
}

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

.rank-info h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-main {
  padding-bottom: 12px;
}

.page-hero {
  width: var(--container);
  margin: 34px auto 0;
  padding: 58px 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff7fb, #eef2ff);
  box-shadow: var(--soft-shadow);
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 820px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.category-overview {
  display: grid;
  gap: 24px;
}

.category-overview-block {
  padding: 24px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

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

.movie-card.compact a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  align-items: center;
}

.movie-card.compact img {
  width: 110px;
  height: 110px;
  border-radius: 16px;
  object-fit: cover;
}

.movie-card.compact h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.movie-card.compact p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-card.compact span {
  display: inline-flex;
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tool-row input {
  width: min(340px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: #ffffff;
}

.tool-row input:focus {
  border-color: var(--primary);
}

.tool-row button {
  border: 0;
  border-radius: 999px;
  padding: 12px 15px;
  color: var(--primary-dark);
  background: #fdf2f8;
  font-weight: 900;
  cursor: pointer;
}

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

.category-link-grid a {
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.category-link-grid span {
  color: var(--primary-dark);
}

.breadcrumb {
  width: var(--container);
  margin: 28px auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

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

.detail-hero {
  width: var(--container);
  margin: 0 auto;
  padding: 34px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ffffff, #fff7fb);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
}

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

.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.lead {
  margin: 18px 0 0;
  color: #475569;
  font-size: 18px;
}

.detail-meta-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta-grid div {
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
}

.detail-meta-grid span {
  display: block;
  color: #94a3b8;
  font-size: 13px;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.player-wrap {
  scroll-margin-top: 86px;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.video-play span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 45px rgba(236, 72, 153, 0.40);
  font-size: 30px;
  padding-left: 5px;
}

.video-play strong {
  font-size: 18px;
}

.video-player.playing .video-play {
  opacity: 0;
  pointer-events: none;
}

.video-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  margin: 0;
  color: #ffffff;
  text-align: center;
  pointer-events: none;
}

.article-content {
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.article-content h2 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.article-content p {
  margin: 0 0 26px;
  color: #475569;
  font-size: 17px;
}

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

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

.pager-nav a {
  display: block;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.pager-nav span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.pager-nav strong {
  font-size: 20px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  width: var(--container);
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #475569;
}

.footer-inner strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 22px;
}

.footer-inner p {
  margin: 0;
  max-width: 680px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
}

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

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

@media (max-width: 980px) {
  .hero-content,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    width: min(360px, 100%);
    transform: none;
  }

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

  .home-ranking,
  .compact-list,
  .category-link-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    width: 100%;
  }

  .hero-section,
  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    padding: 42px 0 80px;
    gap: 28px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .section-head,
  .search-panel,
  .list-tools,
  .category-overview-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-panel {
    margin-top: 28px;
  }

  .search-form {
    width: 100%;
  }

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

  .poster-link {
    height: 280px;
  }

  .page-hero,
  .detail-hero,
  .section-wrap.tinted,
  .article-content {
    padding: 24px;
  }

  .detail-poster img {
    height: 420px;
  }

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

  .rank-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

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

  .rank-poster {
    height: 108px;
  }

  .pager-nav {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    flex-wrap: wrap;
  }
}
