* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: #f9fafb;
  line-height: 1.5;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(100% - 32px, 1280px);
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand:hover {
  color: #2563eb;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #374151;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 10px;
  color: #374151;
  font-weight: 600;
}

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

.hero {
  position: relative;
  height: 600px;
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #1f2937);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 0 0 86px;
  max-width: 1280px;
}

.hero-copy > * {
  max-width: 760px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-badges span,
.hero-badges a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hero-badges span {
  background: #dc2626;
}

.hero-badges a {
  background: #2563eb;
}

.hero h1 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 24px;
  color: #d1d5db;
  font-weight: 600;
}

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

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

.primary-button {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.primary-button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.ghost-button:hover {
  background: rgba(0, 0, 0, 0.54);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.52);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.search-band {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.search-band-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.search-band strong {
  display: block;
  color: #111827;
  font-size: 20px;
}

.search-band span {
  color: #6b7280;
}

.quick-search {
  width: min(100%, 520px);
  display: flex;
  gap: 10px;
}

.quick-search input,
.filter-row input,
.filter-row select {
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: #111827;
  outline: none;
}

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

.quick-search input {
  flex: 1;
}

.quick-search button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 800;
  cursor: pointer;
}

.page-stack {
  padding: 56px 0 72px;
  display: grid;
  gap: 64px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: #6b7280;
}

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

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

.all-grid {
  align-items: stretch;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.card-duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.card-body h2 a:hover {
  color: #2563eb;
}

.card-body p {
  min-height: 42px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 12px;
}

.card-tags,
.detail-tags,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tags span,
.detail-tags span,
.detail-tags a,
.footer-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.soft-panel {
  padding: 40px;
  border-radius: 28px;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 18px;
  color: #ffffff;
  background: #1f2937;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  opacity: 0.42;
  transform: scale(1.08);
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0 18px;
}

.category-tile span {
  padding-top: 78px;
  font-size: 18px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 6px;
  color: #e5e7eb;
  font-size: 13px;
  font-style: normal;
}

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

.row-list {
  display: grid;
  gap: 16px;
}

.movie-row {
  display: grid;
  grid-template-columns: auto 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 900;
}

.row-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

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

.row-content h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.row-content h2 a:hover {
  color: #2563eb;
}

.row-content p {
  margin: 0 0 10px;
  color: #4b5563;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.ranking-box,
.side-card,
.text-card,
.player-card,
.filter-panel {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ranking-box {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.ranking-box h2,
.side-card h2,
.text-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
}

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

.compact-ranking .movie-row {
  grid-template-columns: auto 92px minmax(0, 1fr);
  padding: 0;
  box-shadow: none;
}

.compact-ranking .row-content p,
.side-list .row-content p {
  display: none;
}

.compact-ranking .row-meta,
.side-list .row-meta {
  font-size: 12px;
}

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: #2563eb;
  font-weight: 800;
}

.text-link:hover {
  color: #1d4ed8;
}

.page-main {
  padding: 42px 0 72px;
}

.page-hero {
  margin-bottom: 32px;
  padding: 34px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1f2937);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.page-hero.compact span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 17px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.category-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #4b5563;
}

.ranking-list .movie-row {
  grid-template-columns: auto 180px minmax(0, 1fr);
}

.filter-panel {
  padding: 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 12px;
}

.filter-result {
  margin: 18px 0;
  color: #4b5563;
  font-weight: 700;
}

.detail-page {
  padding-bottom: 72px;
}

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

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px);
  opacity: 0.45;
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.2));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  min-height: 520px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding-top: 60px;
  padding-bottom: 60px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-copy p {
  max-width: 820px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.7;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  margin-top: 34px;
}

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

.player-card {
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.36), rgba(0, 0, 0, 0.46));
  cursor: pointer;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563eb;
  font-size: 34px;
  text-indent: 4px;
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.38);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover span {
  transform: scale(1.05);
  background: #1d4ed8;
}

.video-shell.is-playing .player-overlay {
  display: none;
}

.text-card {
  padding: 24px;
}

.text-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-tags span,
.detail-tags a {
  min-height: 30px;
  font-size: 13px;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 20px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-list .movie-row {
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 0;
  box-shadow: none;
}

.side-list .rank-num {
  display: none;
}

.related-section {
  margin-top: 48px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 44px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid p {
  margin: 0;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-tags span {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.34);
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .four-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-box,
  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

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

  .hero {
    height: 560px;
    min-height: 560px;
  }

  .hero-copy {
    padding-bottom: 78px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band-inner,
  .quick-search {
    flex-direction: column;
    align-items: stretch;
  }

  .search-band-inner {
    padding: 20px 0;
  }

  .page-stack {
    padding-top: 36px;
    gap: 44px;
  }

  .four-cols,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .soft-panel,
  .page-hero {
    padding: 24px;
  }

  .movie-row,
  .ranking-list .movie-row {
    grid-template-columns: auto 112px minmax(0, 1fr);
    gap: 12px;
  }

  .row-content p {
    display: none;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    align-items: end;
  }

  .detail-poster {
    width: min(70vw, 260px);
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

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

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

  .movie-row,
  .ranking-list .movie-row,
  .compact-ranking .movie-row,
  .side-list .movie-row {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .rank-num {
    display: none;
  }

  .player-overlay span {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
