* {
  box-sizing: border-box;
}

:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --emerald-600: #059669;
  --amber-500: #f59e0b;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 35px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 26px 60px rgba(15, 23, 42, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--slate-900);
}

.brand-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--white);
  background: var(--blue-600);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

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

.brand-text small {
  color: var(--slate-500);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--slate-700);
  font-weight: 600;
}

.main-nav a:hover,
.nav-dropdown button:hover {
  color: var(--blue-600);
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown button {
  border: 0;
  background: transparent;
  color: var(--slate-700);
  cursor: pointer;
  font-weight: 600;
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  gap: 4px;
  width: 220px;
  padding: 12px;
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--slate-600);
}

.nav-menu a:hover {
  background: var(--blue-50);
}

.search-mini,
.mobile-search,
.search-large {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-mini input,
.mobile-search input,
.search-large input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--slate-800);
  background: var(--slate-100);
  outline: none;
  transition: 0.2s ease;
}

.search-mini input {
  width: 250px;
}

.search-mini input:focus,
.mobile-search input:focus,
.search-large input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  background: var(--white);
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-mini button,
.mobile-search button,
.search-large button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--blue-600);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--slate-100);
  color: var(--slate-700);
}

.mobile-panel {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

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

.hero-shade,
.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  max-width: 780px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero-content h1,
.detail-hero-content h1,
.page-hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p,
.detail-hero-content p,
.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

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

.btn-primary,
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 20px;
  font-weight: 800;
}

.btn-primary {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.btn-glass,
.hero-meta {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 64px 0;
}

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

.light-section {
  background: var(--slate-50);
}

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

.section-head h2,
.rank-panel h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 28px;
  line-height: 1.2;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--slate-500);
}

.section-more,
.text-link {
  color: var(--blue-600);
  font-weight: 800;
}

.rail {
  display: flex;
  gap: 18px;
  padding: 2px 2px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rail .movie-card {
  flex: 0 0 310px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: 0.24s ease;
}

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

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-900);
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.movie-card-wide .movie-cover {
  min-height: 100%;
  aspect-ratio: auto;
}

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

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

.movie-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.46), transparent 56%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.movie-type,
.movie-region {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.movie-type {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-region {
  left: 10px;
  top: 10px;
  background: rgba(37, 99, 235, 0.88);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--blue-50);
  color: var(--blue-700);
}

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

.category-tile {
  display: grid;
  min-height: 160px;
  align-content: end;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--slate-800));
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: 0.24s ease;
}

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

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  margin-top: 8px;
  color: #dbeafe;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.content-card,
.side-card,
.filter-panel,
.category-overview-card,
.featured-rank-card,
.ranking-table {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.rank-panel,
.content-card,
.side-card,
.filter-panel {
  padding: 22px;
}

.rank-list,
.compact-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rank-item,
.compact-card {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: 0.2s ease;
}

.compact-card {
  grid-template-columns: 64px minmax(0, 1fr);
}

.rank-item:hover,
.compact-card:hover,
.rank-row:hover {
  background: var(--slate-100);
}

.rank-number,
.rank-row-num {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue-600);
  font-size: 12px;
  font-weight: 900;
}

.rank-item img,
.compact-card img {
  width: 58px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--slate-900);
}

.compact-card img {
  width: 64px;
  height: 48px;
}

.rank-copy,
.compact-card span {
  display: grid;
  min-width: 0;
}

.rank-copy strong,
.compact-card strong {
  overflow: hidden;
  color: var(--slate-900);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-copy small,
.compact-card small {
  overflow: hidden;
  color: var(--slate-500);
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.blue-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), var(--slate-800));
}

.dark-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

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

.category-overview-card {
  overflow: hidden;
}

.category-overview-card > div {
  padding: 20px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--slate-600);
}

.category-thumb-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 120px;
  background: var(--slate-900);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  margin-bottom: 24px;
}

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

.top-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.featured-rank-card {
  overflow: hidden;
  padding-bottom: 18px;
}

.featured-rank-card > a {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--slate-900);
}

.featured-rank-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: var(--amber-500);
  font-weight: 900;
}

.featured-rank-card h2,
.featured-rank-card p,
.featured-rank-card .movie-meta {
  margin-left: 18px;
  margin-right: 18px;
}

.featured-rank-card h2 {
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--slate-900);
}

.featured-rank-card p {
  color: var(--slate-600);
}

.ranking-table {
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 50px 86px minmax(0, 1fr) 90px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--slate-200);
}

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

.rank-row img {
  width: 86px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-900);
}

.rank-row-main {
  display: grid;
  min-width: 0;
}

.rank-row-main strong {
  color: var(--slate-900);
}

.rank-row-main small {
  overflow: hidden;
  color: var(--slate-500);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row-meta {
  color: var(--slate-500);
  text-align: right;
}

.search-large {
  max-width: 760px;
  margin-top: 28px;
}

.search-large input {
  min-height: 52px;
  background: rgba(255, 255, 255, 0.96);
}

.search-large button {
  min-height: 52px;
  padding: 0 24px;
  background: var(--slate-900);
}

.search-status {
  margin-bottom: 22px;
  color: var(--slate-600);
  font-weight: 700;
}

.detail-hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--slate-900);
}

.detail-hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--white);
}

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

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

.detail-side {
  position: sticky;
  top: 86px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  color: var(--blue-600);
  background: var(--white);
  font-size: 28px;
  box-shadow: var(--shadow-lg);
}

.player-overlay strong {
  max-width: 80vw;
  font-size: 22px;
  text-align: center;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.detail-meta-grid span {
  display: grid;
  gap: 4px;
  border-radius: 14px;
  padding: 12px;
  background: var(--slate-100);
  color: var(--slate-700);
}

.detail-meta-grid strong {
  color: var(--slate-900);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
}

.content-card p {
  color: var(--slate-700);
  font-size: 16px;
}

.related-grid {
  margin-top: 18px;
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 520px;
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--white);
}

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

.footer-grid a:hover {
  color: #60a5fa;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.footer-bottom {
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1100px) {
  .main-nav,
  .search-mini {
    display: none;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .hero-carousel,
  .detail-hero {
    height: 520px;
  }

  .movie-grid.three,
  .movie-grid.four,
  .movie-grid.two,
  .category-grid,
  .category-overview-grid,
  .top-rank-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .rank-row,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .rank-row-meta {
    text-align: left;
  }

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

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

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

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

  .hero-content p,
  .detail-hero-content p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rail .movie-card {
    flex-basis: 280px;
  }

  .section {
    padding: 46px 0;
  }
}
