* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #0f172a;
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: #ffffff;
  background: #2563eb;
  border-radius: 12px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.brand:hover .brand-icon,
.footer-brand:hover .brand-icon {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
  color: #0f172a;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 0;
  color: #334155;
  background: transparent;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 248px;
  display: grid;
  gap: 4px;
  padding: 12px;
  visibility: hidden;
  opacity: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.dropdown-link,
.mobile-link,
.side-link {
  display: block;
  padding: 10px 12px;
  color: #475569;
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-link:hover,
.mobile-link:hover,
.side-link:hover,
.side-link.is-current {
  color: #1d4ed8;
  background: #eff6ff;
}

.header-search,
.mobile-search,
.search-page-form,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  color: #0f172a;
  background: #f1f5f9;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.header-search input {
  width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.header-search button,
.mobile-search button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #ffffff;
  background: #2563eb;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #334155;
  border-radius: 99px;
}

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

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

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.72) 40%, rgba(15, 23, 42, 0.25) 100%);
}

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

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

.hero-kicker {
  margin: 0 0 16px;
  color: #60a5fa;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-summary,
.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

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

.center-actions {
  justify-content: center;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.btn-primary.full {
  width: 100%;
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-ghost.dark {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background-color 0.2s ease;
}

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

.page-section {
  padding: 72px 0;
}

.bg-white {
  background: #ffffff;
}

.bg-soft {
  background: #f8fafc;
}

.bg-gradient {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

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

.section-head h2,
.ranking-panel h2,
.side-panel h2,
.related-panel h2,
.footer-title {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 850;
}

.section-icon {
  display: inline-flex;
  margin-right: 8px;
  color: #2563eb;
}

.section-more {
  color: #2563eb;
  font-weight: 800;
}

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

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

.editor-grid .movie-card-large:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: thin;
}

.movie-card,
.movie-row-card,
.category-card,
.category-tile,
.related-card,
.ranking-panel,
.side-panel,
.detail-article,
.related-panel,
.cta-box {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.movie-card,
.movie-row-card,
.category-card,
.category-tile,
.related-card {
  display: flex;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card {
  height: 100%;
  flex-direction: column;
}

.movie-card:hover,
.movie-row-card:hover,
.category-card:hover,
.category-tile:hover,
.related-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  transform: translateY(-3px);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-frame img,
.related-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.movie-row-card:hover img,
.related-card:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.type-badge,
.category-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 7px;
  padding: 0 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-badge {
  left: 10px;
  top: 10px;
  background: rgba(37, 99, 235, 0.92);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: rgba(245, 158, 11, 0.95);
}

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

.movie-title {
  color: #0f172a;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 850;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover .movie-title,
.movie-row-card:hover .movie-title {
  color: #2563eb;
}

.movie-desc {
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  margin-top: auto;
  color: #64748b;
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

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

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

.category-card,
.category-tile {
  flex-direction: column;
  min-height: 168px;
  padding: 22px;
}

.category-title {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.category-desc {
  margin-top: 12px;
  color: #64748b;
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.category-samples a {
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
}

.feature-layout,
.two-column,
.detail-grid {
  display: grid;
  gap: 28px;
}

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

.ranking-panel,
.side-panel,
.related-panel,
.detail-article,
.cta-box {
  padding: 24px;
}

.ranking-panel p {
  color: #64748b;
  line-height: 1.7;
}

.rank-list,
.mini-rank-list,
.related-list,
.side-links {
  display: grid;
  gap: 10px;
}

.rank-row,
.mini-rank {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.rank-row:hover .rank-title,
.mini-rank:hover strong {
  color: #2563eb;
}

.rank-number,
.mini-rank span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  background: #2563eb;
  border-radius: 10px;
  font-weight: 900;
}

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

.rank-meta,
.mini-rank em {
  grid-column: 2;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.cta-section {
  background: #0f172a;
}

.cta-box {
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  border-color: rgba(255, 255, 255, 0.12);
}

.cta-box h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
}

.cta-box p {
  max-width: 760px;
  margin: 18px auto 0;
  color: #dbeafe;
  line-height: 1.8;
}

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

.page-hero {
  padding: 74px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #334155);
}

.page-hero.dark-hero {
  background: linear-gradient(135deg, #0f172a, #1e293b 52%, #1d4ed8);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #dbeafe;
  font-size: 14px;
}

.crumbs a:hover {
  color: #ffffff;
}

.two-column {
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
}

.ranking-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.side-panel,
.sticky-panel,
.related-panel {
  position: sticky;
  top: 86px;
}

.content-panel {
  min-width: 0;
}

.filter-bar {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 16px;
}

.filter-bar select {
  width: 170px;
}

.movie-row-card {
  align-items: stretch;
  gap: 18px;
  padding: 14px;
  margin-bottom: 16px;
}

.row-poster {
  width: 230px;
  flex: 0 0 230px;
  border-radius: 12px;
}

.row-info {
  padding: 6px 0;
}

.search-page-form {
  max-width: 720px;
  margin-bottom: 22px;
}

.search-status {
  margin-bottom: 22px;
  color: #64748b;
  font-weight: 700;
}

.detail-main {
  background: #f8fafc;
}

.player-shell {
  padding: 32px 0;
  background: #000000;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 18px;
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(15, 23, 42, 0.2));
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  padding-left: 4px;
  background: #2563eb;
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.42);
}

.detail-content {
  padding: 40px 0 72px;
}

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

.detail-article h1 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
}

.detail-article .crumbs {
  color: #64748b;
}

.detail-article .crumbs a:hover {
  color: #2563eb;
}

.detail-meta {
  margin-bottom: 28px;
}

.detail-meta span {
  color: #1d4ed8;
  background: #eff6ff;
}

.text-block {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.text-block h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 20px;
}

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

.lead-text {
  font-weight: 700;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.related-card {
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.related-poster {
  width: 126px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex: 0 0 126px;
  background: #0f172a;
  border-radius: 10px;
}

.related-info {
  min-width: 0;
}

.related-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-info em {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.footer-desc {
  margin: 18px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-title {
  color: #ffffff;
  font-size: 17px;
  margin-bottom: 16px;
}

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

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 18px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 14px;
}

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

@media (max-width: 1180px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .feature-layout,
  .two-column,
  .ranking-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .sticky-panel,
  .related-panel {
    position: static;
  }
}

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

  .brand-subtitle {
    display: none;
  }

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

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

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

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .page-section {
    padding: 46px 0;
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar select {
    width: 100%;
  }

  .movie-row-card {
    flex-direction: column;
  }

  .row-poster {
    width: 100%;
    flex-basis: auto;
  }

  .player-shell {
    padding: 16px 0;
  }

  .player-box {
    border-radius: 12px;
  }

  .detail-content {
    padding-top: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}
