:root {
  --bg: #0d111f;
  --bg-soft: #141827;
  --bg-card: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --line: rgba(255, 255, 255, 0.12);
  --pink: #ec4899;
  --rose: #f43f5e;
  --orange: #fb923c;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(236, 72, 153, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(244, 63, 94, 0.18), transparent 30rem),
    linear-gradient(180deg, #0b1020 0%, #111827 46%, #0d111f 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 31, 0.82);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  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: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.34);
}

.brand-text {
  font-size: 1.2rem;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(236, 72, 153, 0.14);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(310px, 32vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.header-search input,
.wide-search input,
.filter-search input,
.filter-selects select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 8px 10px;
}

.header-search button,
.wide-search button,
.filter-search button,
.primary-button,
.ghost-button,
.filter-selects select {
  border: 0;
  border-radius: 999px;
}

.header-search button,
.wide-search button,
.primary-button {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  box-shadow: 0 16px 34px rgba(236, 72, 153, 0.28);
}

.header-search button {
  padding: 8px 14px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #fff;
}

.hero-carousel {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111827;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 72px);
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.58s ease;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #f9a8d4;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-content .lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.card-meta span,
.detail-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(249, 168, 212, 0.22);
  border-radius: 999px;
  color: #fce7f3;
  background: rgba(236, 72, 153, 0.12);
}

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

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

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-tile:hover,
.rank-item:hover {
  transform: translateY(-4px);
}

.ghost-button {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button.compact {
  min-height: 40px;
  padding: 0 18px;
}

.hero-poster {
  justify-self: center;
  width: min(320px, 80%);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(244, 63, 94, 0.16));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.image-off {
  opacity: 0;
}

.hero-controls {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 0 0 24px;
  margin-top: -62px;
  z-index: 2;
}

.hero-controls button {
  cursor: pointer;
}

.hero-controls > button,
.hero-dot {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.active {
  width: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--rose));
}

.quick-search-section,
.content-section,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 26px 0 8px;
}

.wide-search,
.filter-panel,
.page-hero,
.movie-card,
.category-tile,
.rank-item,
.detail-layout,
.site-footer,
.rank-board {
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
}

.wide-search input {
  padding: 12px 16px;
}

.wide-search button {
  padding: 0 24px;
  cursor: pointer;
}

.shortcut-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shortcut-links a {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.content-section {
  padding: 44px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.section-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-grid,
.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

.category-tile {
  min-height: 156px;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile span,
.category-tile strong,
.category-tile small {
  display: block;
}

.category-tile span {
  color: #fff;
  font-size: 1.24rem;
  font-weight: 900;
}

.category-tile strong {
  margin: 10px 0;
  color: #f9a8d4;
  font-size: 2rem;
}

.category-tile small {
  color: var(--muted);
  line-height: 1.6;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(249, 168, 212, 0.48);
  box-shadow: 0 22px 58px rgba(236, 72, 153, 0.16);
}

.poster-shell {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(236, 72, 153, 0.55), transparent 34%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(88, 28, 135, 0.28));
}

.poster-shell img {
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.play-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(236, 72, 153, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 14px;
}

.card-meta,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}

.card-meta span,
.detail-facts span {
  min-height: 22px;
  padding: 3px 8px;
  color: #fce7f3;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info a:hover,
.compact-link-list a:hover {
  color: #f9a8d4;
}

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

.tag-row span {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 0.75rem;
}

.page-main,
.detail-main {
  padding: 34px 0 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 0.95rem;
}

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

.page-hero {
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
}

.filter-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.filter-search input {
  padding: 10px 12px;
}

.filter-search button {
  padding: 0 16px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-width: 130px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
}

.quick-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tags button {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
}

.quick-tags button.active,
.quick-tags button:hover {
  color: #fff;
  border-color: rgba(249, 168, 212, 0.42);
  background: rgba(236, 72, 153, 0.2);
}

.result-count {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--soft);
}

.rank-list,
.rank-board {
  display: grid;
  gap: 12px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-list b,
.rank-index {
  color: #f9a8d4;
  font-size: 1.35rem;
}

.rank-list span {
  font-weight: 800;
}

.rank-list em {
  color: var(--soft);
  font-style: normal;
}

.rank-board {
  padding: 18px;
  border-radius: 28px;
}

.rank-item {
  display: grid;
  grid-template-columns: 80px 80px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(244, 63, 94, 0.14));
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  padding: 22px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.player-section {
  grid-column: 1 / -1;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  cursor: pointer;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(236, 72, 153, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.82));
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--rose));
  box-shadow: 0 22px 42px rgba(236, 72, 153, 0.34);
}

.detail-side {
  grid-column: 2;
}

.detail-poster {
  margin: 0 0 14px;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.35), rgba(244, 63, 94, 0.14));
}

.detail-content {
  grid-column: 1;
  grid-row: 2;
}

.detail-content h1 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
}

.detail-content h2 {
  margin: 30px 0 12px;
  font-size: 1.55rem;
}

.detail-content p {
  color: var(--muted);
  line-height: 1.9;
}

.large-tags span {
  font-size: 0.9rem;
}

.related-section {
  padding-top: 36px;
}

.site-footer {
  margin-top: 30px;
  border-width: 1px 0 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 30px;
  padding: 36px 0;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(236, 72, 153, 0.14);
}

.is-hidden {
  display: none !important;
}

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

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

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

  .site-nav {
    position: fixed;
    top: 66px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(13, 17, 31, 0.96);
  }

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

  .nav-toggle {
    display: block;
  }

  .header-search {
    display: none;
  }

  .hero-track {
    min-height: 620px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .hero-poster {
    display: none;
  }

  .quick-search-section,
  .filter-panel,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-content,
  .detail-side,
  .player-section {
    grid-column: auto;
    grid-row: auto;
  }

  .detail-side {
    display: none;
  }

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

  .rank-cover,
  .rank-item .primary-button {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .hero-carousel,
  .quick-search-section,
  .content-section,
  .page-main,
  .detail-main {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-track {
    min-height: 570px;
  }

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

  .section-heading {
    display: block;
  }

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

  .wide-search,
  .filter-search {
    flex-direction: column;
  }

  .wide-search button,
  .filter-search button {
    min-height: 42px;
  }

  .rank-list a {
    grid-template-columns: 34px 1fr;
  }

  .rank-list em {
    grid-column: 2;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-content h1 {
    font-size: 2.1rem;
  }
}
