
:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --purple: #7c3aed;
  --purple-dark: #4c1d95;
  --pink: #db2777;
  --blue: #2563eb;
  --cyan: #0891b2;
  --orange: #ea580c;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #fff;
  background: linear-gradient(90deg, #0f172a, #581c87 52%, #111827);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.26);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.32);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #d8b4fe, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-nav a {
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #fff;
}

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

.header-search input {
  width: 190px;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 9px 10px;
}

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

.header-search button,
.filter-bar button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  padding: 9px 16px;
  font-weight: 700;
}

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

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

.hero {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.55), transparent 30%), linear-gradient(135deg, #312e81, #581c87 55%, #831843);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(88, 28, 135, 0.52), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  padding-top: 40px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-kicker {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 850px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.65;
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

.hero-tags span,
.tag-list a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  box-shadow: 0 16px 34px rgba(219, 39, 119, 0.32);
}

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

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

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

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  cursor: pointer;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
}

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

.search-panel-section {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.big-search input {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  outline: 0;
  font-size: 16px;
}

.big-search button {
  border: 0;
  cursor: pointer;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  padding: 0 28px;
  font-weight: 800;
}

.content-section,
.category-strip,
.ranking-preview {
  padding: 72px 0;
}

.section-white {
  background: #fff;
}

.section-gradient-warm {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.section-gradient-cool,
.strip-cool {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.strip-warm {
  background: linear-gradient(135deg, #fff1f2, #faf5ff);
}

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

.section-heading h2,
.page-hero h1,
.ranking-copy h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--purple);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
}

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b, #831843);
}

.movie-card.wide .movie-cover {
  aspect-ratio: 16 / 10;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78));
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-badge,
.movie-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(124, 58, 237, 0.9);
}

.movie-play {
  left: 14px;
  bottom: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .movie-play {
  opacity: 1;
  transform: translateY(0);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-meta {
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.ranking-preview {
  color: #fff;
  background: linear-gradient(135deg, #111827, #4c1d95 60%, #831843);
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: center;
}

.ranking-copy p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rank-num {
  color: #f0abfc;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 76px 0;
  color: #fff;
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.purple-hero {
  background: linear-gradient(135deg, #4c1d95, #db2777);
}

.blue-hero {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

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

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

.library-shell {
  padding: 36px 0 78px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
  gap: 14px;
  padding: 18px;
  margin-bottom: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  outline: 0;
  background: #fff;
}

.filter-bar button {
  align-self: end;
  height: 42px;
}

.result-summary {
  margin: 10px 0 22px;
  color: var(--muted);
  font-weight: 700;
}

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

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 44px 0 80px;
}

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 130px;
  background: linear-gradient(135deg, #312e81, #831843);
}

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

.category-body {
  padding: 20px;
}

.category-body h2 {
  margin: 0 0 8px;
}

.category-body p {
  color: var(--muted);
  line-height: 1.7;
}

.category-body span {
  color: var(--purple);
  font-weight: 800;
}

.ranking-page-list {
  display: grid;
  gap: 16px;
  padding: 42px 0 80px;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 68px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ranking-card img {
  width: 92px;
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #312e81, #831843);
}

.ranking-number {
  color: var(--purple);
  font-size: 28px;
  font-weight: 900;
}

.ranking-card-body {
  display: grid;
  gap: 8px;
}

.ranking-card-body strong {
  font-size: 20px;
}

.ranking-card-body small {
  color: var(--muted);
}

.ranking-card-body em {
  color: #374151;
  font-style: normal;
  line-height: 1.6;
}

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

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
}

.detail-hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(88, 28, 135, 0.68));
}

.detail-hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster img {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 32px 60px rgba(0, 0, 0, 0.36);
  background: linear-gradient(135deg, #312e81, #831843);
}

.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
}

.detail-copy p {
  max-width: 800px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.75;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 42px 0 88px;
}

.detail-main-card,
.sidebar-card,
.info-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.player-panel,
.text-panel,
.tag-panel {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}

.tag-panel {
  border-bottom: 0;
}

.player-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.player-title-row h2,
.text-panel h2,
.tag-panel h2,
.sidebar-card h2,
.info-panel h2 {
  margin: 0;
  font-size: 24px;
}

.player-title-row span {
  color: var(--purple);
  font-weight: 800;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.28), rgba(2, 6, 23, 0.74));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: 0 18px 40px rgba(219, 39, 119, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 26px;
}

.player-overlay small,
.player-status {
  color: #9ca3af;
}

.player-status {
  margin-bottom: 0;
}

.text-panel p {
  color: #374151;
  line-height: 1.9;
  white-space: pre-line;
}

.tag-list a {
  color: var(--purple);
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.sidebar-card {
  padding: 22px;
}

.compact-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-thumb {
  display: block;
  overflow: hidden;
  width: 98px;
  height: 66px;
  border-radius: 14px;
  background: linear-gradient(135deg, #312e81, #831843);
}

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

.compact-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.compact-body strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-body small {
  color: var(--muted);
}

.movie-dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
}

.movie-dl dt {
  color: var(--muted);
}

.movie-dl dd {
  margin: 0;
  font-weight: 700;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 44px 0 82px;
}

.info-panel {
  padding: 26px;
}

.info-panel p {
  color: var(--muted);
  line-height: 1.85;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 30px;
  padding: 46px 0;
}

.footer-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h3 {
  color: #fff;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #c4b5fd;
}

.footer-bottom {
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1024px) {
  .movie-grid,
  .movie-row,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav,
  .header-search {
    display: none;
  }

  .site-nav.is-open {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(17, 24, 39, 0.96);
  }

  .hero {
    min-height: 620px;
  }

  .hero h1 {
    font-size: 46px;
  }

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

  .movie-grid,
  .movie-row,
  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .filter-bar,
  .big-search,
  .footer-grid,
  .categories-grid,
  .about-content {
    grid-template-columns: 1fr;
  }

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

  .detail-poster img {
    width: 180px;
  }

  .ranking-card a {
    grid-template-columns: 46px 78px 1fr;
  }

  .ranking-card img {
    width: 78px;
    height: 100px;
  }
}

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

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

  .hero {
    min-height: 560px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .movie-grid,
  .movie-row,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .movie-card:not(.wide) .movie-card-link {
    display: grid;
    grid-template-columns: 126px 1fr;
  }

  .movie-card:not(.wide) .movie-cover {
    aspect-ratio: 3 / 4;
  }

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

  .rank-meta {
    grid-column: 2;
  }

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