:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 48%, #0891b2 100%);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 22px;
  backdrop-filter: blur(12px);
}

.brand-text strong {
  display: block;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.brand-text small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  margin-top: 2px;
}

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

.site-nav a {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.16);
}

.hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(180deg, var(--slate) 0%, var(--slate-soft) 100%);
}

.hero {
  min-height: 560px;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: radial-gradient(circle at 22% 18%, rgba(56, 189, 248, 0.9), transparent 20%), radial-gradient(circle at 75% 30%, rgba(59, 130, 246, 0.75), transparent 24%), linear-gradient(135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%);
  background-size: auto, auto, 42px 42px;
}

.hero-container {
  position: relative;
  z-index: 2;
  padding: 48px 0 64px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-title-row > span,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  color: #facc15;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-stage {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) 1fr;
  gap: 42px;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  inset: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-poster {
  position: relative;
  height: 420px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  background: linear-gradient(145deg, #1e3a8a, #0f172a);
}

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

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

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

.hero-copy {
  max-width: 620px;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.hero-copy h1,
.detail-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p,
.detail-copy p,
.page-hero p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn.primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.32);
}

.btn.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  color: #e2e8f0;
}

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

.hero-dots button {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
  background: #facc15;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-50%);
  font-size: 28px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-arrow.prev {
  left: -12px;
}

.hero-arrow.next {
  right: -12px;
}

.section {
  padding: 64px 0;
}

.white-section {
  background: var(--white);
}

.tinted-section {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

.split-section {
  background: #f8fafc;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  color: #1e293b;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  flex: none;
  color: var(--blue);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  color: var(--text);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(145deg, #1e3a8a, #0f172a);
}

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.24);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.poster-overlay span {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
}

.movie-card:hover .poster-overlay {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #1e293b;
  background: #facc15;
  font-weight: 900;
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.movie-info strong {
  color: #1e293b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-desc,
.movie-score {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-score {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.movie-score span:first-child {
  color: #f59e0b;
  font-weight: 800;
}

.split-layout,
.leaderboard,
.detail-layout {
  display: grid;
  gap: 30px;
}

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

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

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

.rank-item {
  display: grid;
  grid-template-columns: 36px 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-num {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-item strong {
  display: block;
  color: #1e293b;
  line-height: 1.35;
}

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

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

.category-tile,
.category-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

.category-tile {
  padding: 22px;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong,
.category-card strong {
  display: block;
  color: #1e293b;
  font-size: 19px;
}

.category-tile span,
.category-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
  font-style: normal;
}

.category-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
}

.category-card img {
  width: 112px;
  height: 132px;
  border-radius: 16px;
  object-fit: cover;
  background: #0f172a;
}

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

.compact-hero {
  padding: 72px 0;
}

.compact-hero .container {
  max-width: 860px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 170px;
  gap: 12px;
  margin-top: 26px;
}

.search-panel input,
.search-panel select {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--white);
  outline: 0;
  background: rgba(255, 255, 255, 0.12);
}

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

.search-panel option {
  color: #0f172a;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--white);
}

.pagination a.active,
.pagination a:hover {
  color: var(--white);
  border-color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  filter: blur(12px) saturate(1.15);
  transform: scale(1.05);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 68px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  background: #0f172a;
}

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

.detail-copy {
  max-width: 760px;
}

.detail-score {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0;
}

.detail-score strong {
  color: #facc15;
  font-size: 24px;
}

.detail-score span {
  color: #cbd5e1;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  position: absolute;
  inset: 0;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #020617;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.62;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-large {
  position: absolute;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-size: 36px;
}

.detail-article {
  margin-top: 28px;
  padding: 30px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-article h2,
.side-column h2 {
  margin: 0 0 14px;
  color: #1e293b;
  font-size: 24px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: #334155;
  line-height: 2;
}

.detail-article .tag-list {
  margin-top: 24px;
}

.detail-article .tag-list span {
  color: var(--blue);
  background: #eff6ff;
}

.side-column {
  position: sticky;
  top: 108px;
}

.side-list .rank-item {
  grid-template-columns: 32px 62px minmax(0, 1fr);
}

.side-list .rank-item img {
  width: 62px;
  height: 82px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding: 38px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.site-footer strong {
  display: block;
  color: var(--white);
  margin-bottom: 8px;
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  max-width: 620px;
  line-height: 1.8;
}

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

.footer-links a {
  color: var(--white);
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1100px) {
  .cards-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .side-column {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    align-items: flex-start;
  }

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

  .site-nav {
    position: absolute;
    top: 88px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 14px;
    border-radius: 18px;
    background: #1d4ed8;
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    display: block;
  }

  .hero-slide,
  .detail-hero-inner,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

  .hero-poster {
    height: 380px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .brand-icon {
    width: 42px;
    height: 42px;
  }

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

  .brand-text small {
    display: none;
  }

  .section {
    padding: 44px 0;
  }

  .section-heading,
  .footer-grid {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .cards-4,
  .cards-5,
  .leaderboard,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-poster {
    height: 320px;
    border-radius: 22px;
  }

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

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

  .rank-item img {
    width: 60px;
    height: 80px;
  }

  .detail-hero-inner {
    padding: 44px 0;
  }

  .detail-article {
    padding: 22px;
  }

  .play-large {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
