:root {
  --rose: #f43f5e;
  --rose-dark: #be123c;
  --orange: #f97316;
  --pink-soft: #fff1f2;
  --orange-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f1d5d9;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(190, 18, 60, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(244, 63, 94, 0.12);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-wrap,
.hero-strip,
.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #fb923c);
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.28);
}

.brand-text {
  font-size: clamp(20px, 2vw, 26px);
  color: transparent;
  background: linear-gradient(90deg, #f43f5e, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
}

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

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

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

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

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--rose);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 241, 242, 0.8);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.hero-stage {
  position: relative;
  height: min(72vh, 640px);
  min-height: 520px;
}

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

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

.hero-slide img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 82px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #f43f5e, #f97316);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.28);
}

.hero-content h1,
.page-hero h1,
.detail-main-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.04;
  font-weight: 900;
}

.hero-tags,
.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, #f43f5e, #f97316);
  box-shadow: 0 14px 28px rgba(244, 63, 94, 0.28);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 30px;
  background: #fff;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding: 18px 0 24px;
}

.hero-mini-card {
  position: relative;
  min-height: 94px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 14px 25px rgba(15, 23, 42, 0.2);
}

.hero-mini-card img {
  width: 100%;
  height: 94px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.hero-mini-card span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.section-wrap {
  padding: 56px 0;
}

.tinted-section {
  width: 100%;
  max-width: none;
  padding: 56px max(16px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, 0.52);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #f97316);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.22);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.category-card,
.movie-card,
.content-card,
.side-card,
.search-panel,
.rank-list {
  border: 1px solid rgba(244, 63, 94, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.category-card {
  display: block;
  padding: 16px;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff1f2;
}

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

.category-card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

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

.movie-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.cover-badge,
.cover-play {
  position: absolute;
  color: #fff;
  background: rgba(244, 63, 94, 0.88);
  backdrop-filter: blur(6px);
}

.cover-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.cover-play {
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .cover-play {
  opacity: 1;
  transform: scale(1);
}

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

.movie-meta-line,
.detail-meta,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta-line {
  color: var(--muted);
  font-size: 12px;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--rose);
}

.movie-card p {
  min-height: 58px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tag-row a,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: #ffe4e6;
  font-size: 12px;
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.search-box span {
  color: var(--rose);
  font-weight: 900;
}

.search-box input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.filter-select {
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.rank-list {
  overflow: hidden;
  border-radius: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 66px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(244, 63, 94, 0.1);
}

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

.rank-number {
  color: transparent;
  background: linear-gradient(90deg, #f43f5e, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 24px;
  font-weight: 900;
}

.rank-row img {
  width: 66px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  display: grid;
  gap: 6px;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
}

.rank-hot {
  color: var(--rose);
  font-weight: 900;
}

.center-action {
  margin-top: 24px;
  text-align: center;
}

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 360px;
  padding: 84px max(16px, calc((100% - 1180px) / 2));
  color: #fff;
  overflow: hidden;
  background: radial-gradient(circle at 20% 30%, rgba(251, 113, 133, 0.95), transparent 34%), linear-gradient(135deg, #111827, #7f1d1d 58%, #f97316);
}

.page-hero.image-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  filter: blur(1px);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.45));
}

.page-hero > div {
  position: relative;
  z-index: 1;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(1px);
  opacity: 0.62;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 86px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: #f3f4f6;
}

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

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

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.detail-tags {
  margin-top: 18px;
}

.player-section {
  padding-top: 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #050505;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(244, 63, 94, 0.14), rgba(0, 0, 0, 0.36));
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.player-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #f97316);
  box-shadow: 0 18px 45px rgba(244, 63, 94, 0.35);
  font-size: 36px;
}

.detail-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.detail-article {
  display: grid;
  gap: 22px;
}

.content-card,
.side-card {
  padding: 26px;
  border-radius: 26px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 14px;
  color: #374151;
  line-height: 1.95;
}

.side-card {
  position: sticky;
  top: 92px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

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

.footer-inner {
  display: grid;
  gap: 18px;
  padding: 42px 0;
}

.footer-inner p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover {
  color: #fb7185;
}

.copyright {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

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

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

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

  .mobile-menu-button {
    display: block;
  }

  .hero-stage {
    min-height: 560px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .search-panel {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 44px 58px 1fr;
  }

  .rank-hot {
    grid-column: 3;
  }

  .detail-layout,
  .detail-content-wrap {
    grid-template-columns: 1fr;
  }

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

  .side-card {
    position: static;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .footer-inner,
  .section-wrap,
  .hero-strip,
  .detail-hero-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-stage {
    min-height: 610px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-main-info h1 {
    font-size: 34px;
  }

  .section-wrap,
  .tinted-section {
    padding-top: 38px;
    padding-bottom: 38px;
  }

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

  .rank-row {
    grid-template-columns: 36px 52px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .rank-row img {
    width: 52px;
    height: 72px;
  }

  .detail-hero {
    min-height: 760px;
  }
}
