:root {
  color-scheme: light;
  --site-blue: #2563eb;
  --site-cyan: #06b6d4;
  --site-teal: #14b8a6;
  --site-dark: #111827;
  --site-muted: #6b7280;
  --site-soft: #f8fafc;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #f9fafb;
  color: #111827;
}

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

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

.site-header {
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #2563eb;
  background: #eff6ff;
}

.nav-dropdown {
  position: relative;
}

.nav-drop-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 60;
  display: none;
  width: 12rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: white;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  display: block;
}

.nav-dropdown-panel a,
.mobile-menu a {
  display: block;
  padding: 0.72rem 1rem;
  color: #374151;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-dropdown-panel a:hover,
.mobile-menu a:hover {
  color: #2563eb;
  background: #eff6ff;
}

.mobile-menu {
  display: none;
  border-top: 1px solid #e5e7eb;
  background: white;
  padding: 0.35rem 0.75rem 0.75rem;
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.75s ease, transform 0.75s ease;
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.92), rgba(8, 145, 178, 0.72), rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 640px;
  align-items: center;
}

.hero-copy {
  max-width: 46rem;
  color: white;
}

.hero-kicker {
  margin-bottom: 1rem;
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-title {
  margin: 0 0 1.35rem;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 42rem;
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.2rem;
  line-height: 1.8;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  padding: 0.26rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-tags .tag-pill,
.detail-hero .tag-pill {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.primary-button,
.white-button,
.outline-button,
.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  padding: 0.82rem 1.35rem;
  font-weight: 800;
  transition: all 0.25s ease;
}

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

.primary-button:hover,
.white-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 42px rgba(37, 99, 235, 0.34);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.16);
  color: white;
  backdrop-filter: blur(10px);
}

.ghost-link {
  color: white;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.white-button {
  background: white;
  color: var(--site-blue);
}

.outline-button {
  border: 2px solid white;
  color: white;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 5;
  display: flex;
  gap: 0.55rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dot.active {
  width: 2rem;
  background: white;
}

.stat-mark {
  display: inline-flex;
  min-width: 5.2rem;
  height: 5.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.side-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.movie-card {
  position: relative;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-cover {
  position: relative;
  height: 14rem;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.compact-card .movie-cover {
  height: 12rem;
}

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

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

.movie-cover-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  width: 3.2rem;
  height: 3.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2563eb;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: all 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-meta-over {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.movie-meta-over span {
  border-radius: 0.45rem;
  background: rgba(15, 23, 42, 0.66);
  color: white;
  padding: 0.22rem 0.48rem;
  font-size: 0.75rem;
  backdrop-filter: blur(8px);
}

.movie-info {
  min-height: 10.2rem;
}

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

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.filter-panel {
  border: 1px solid #e5e7eb;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.search-label {
  align-self: center;
  color: #374151;
  font-weight: 800;
}

.search-input,
.search-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.85rem;
  background: white;
  padding: 0.82rem 1rem;
  color: #111827;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus,
.search-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.section-heading {
  gap: 1rem;
}

.section-more {
  white-space: nowrap;
}

.rank-list {
  display: grid;
  gap: 0.72rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  border-radius: 1rem;
  background: white;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: all 0.22s ease;
}

.rank-row a:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.rank-num {
  display: inline-flex;
  width: 2.3rem;
  height: 2.3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #f59e0b;
  font-weight: 900;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.page-hero .breadcrumb,
.detail-hero .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

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

.category-visual {
  position: relative;
  display: flex;
  height: 12rem;
  align-items: end;
  padding: 1.2rem;
  background-position: center;
  background-size: cover;
  color: white;
  font-size: 1.55rem;
  font-weight: 900;
}

.category-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.76));
}

.category-visual span {
  position: relative;
  z-index: 1;
}

.category-links {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.category-links a,
.category-more,
.footer-links a,
.side-links a {
  color: #2563eb;
  transition: color 0.2s ease;
}

.category-links a:hover,
.category-more:hover,
.footer-links a:hover,
.side-links a:hover {
  color: #0891b2;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.category-strip a {
  border-radius: 999px;
  background: white;
  color: #374151;
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.category-strip a.active,
.category-strip a:hover {
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  color: white;
}

.ranking-list-page {
  display: grid;
  gap: 1rem;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 3rem 6rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.ranking-card img {
  width: 6rem;
  height: 7.8rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

.ranking-index {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  font-weight: 900;
}

.ranking-info h2 {
  margin: 0 0 0.5rem;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 900;
}

.ranking-info p {
  margin: 0 0 0.75rem;
  color: #6b7280;
  line-height: 1.6;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ranking-meta span {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.25rem 0.62rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.ranking-score {
  color: #f59e0b;
  font-size: 1.4rem;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
}

.detail-backdrop,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-backdrop {
  background-position: center;
  background-size: cover;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.06);
}

.detail-overlay {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.82), rgba(8, 145, 178, 0.58));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  width: 16rem;
  max-width: 70vw;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
}

.detail-one-line {
  max-width: 50rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.15rem;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.2rem 0;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.player-stage {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: flex;
  width: 5rem;
  height: 5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #2563eb;
  font-size: 1.8rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
}

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

.player-status {
  margin-top: 0.75rem;
  min-height: 1.2rem;
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 700;
}

.content-card h2,
.side-panel h2 {
  margin: 0 0 1rem;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 1.4rem;
  color: #374151;
  line-height: 1.9;
}

.movie-dl {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.movie-dl div {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
}

.movie-dl dt {
  color: #6b7280;
  font-weight: 700;
}

.movie-dl dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

.side-links {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-grid .compact-card .movie-cover {
  height: 11rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (min-width: 768px) {
  .filter-row {
    grid-template-columns: 13rem 1fr 11rem 11rem;
  }

  .detail-hero-grid {
    grid-template-columns: 18rem minmax(0, 1fr);
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 20rem;
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .ranking-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }
}

@media (max-width: 767px) {
  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-title {
    font-size: 3rem;
  }

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

  .ranking-card a {
    grid-template-columns: 2.5rem 5rem 1fr;
  }

  .ranking-card .ranking-score {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .poster-grid,
  .side-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-cover,
  .compact-card .movie-cover {
    height: 11.5rem;
  }

  .ranking-info p,
  .ranking-meta {
    display: none;
  }
}
