* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #020617;
  color: #ffffff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.site-nav {
  max-width: 80rem;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.34);
  font-size: 0.82rem;
}

.desktop-menu {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  color: #cbd5e1;
  font-size: 0.94rem;
}

.desktop-menu a,
.mobile-menu a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-menu a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
  color: #22d3ee;
}

.nav-search {
  position: relative;
  width: min(18rem, 26vw);
}

.nav-search input,
.mobile-search input,
.search-panel input,
.filter-box input {
  width: 100%;
  border: 1px solid rgba(51, 65, 85, 0.8);
  outline: none;
  color: #ffffff;
  background: #0f172a;
  border-radius: 0.75rem;
  padding: 0.72rem 2.7rem 0.72rem 1rem;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.26);
}

.nav-search button {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 0.5rem 1rem 1rem;
  background: #0f172a;
  border-top: 1px solid #1e293b;
}

.mobile-menu a {
  display: block;
  padding: 0.68rem 0;
  color: #cbd5e1;
}

.mobile-search {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.mobile-search button,
.search-panel button,
.filter-box button {
  border: 0;
  border-radius: 0.7rem;
  color: #ffffff;
  background: #2563eb;
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.76) 38%, rgba(0, 0, 0, 0.3) 72%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 80rem;
  height: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-copy > * {
  max-width: 42rem;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  margin-bottom: 1rem;
  color: #ffffff;
  background: #2563eb;
  font-size: 0.88rem;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.36);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-line {
  margin: 0 0 0.4rem;
  color: #d1d5db;
  font-size: 1.15rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.hero-summary {
  margin: 0 0 1.6rem;
  color: #94a3b8;
  font-size: 1rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.hero-actions,
.section-head,
.chip-row,
.meta-row,
.tag-row,
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.75rem;
  padding: 0.78rem 1.25rem;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-muted {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.84);
}

.btn-muted:hover {
  background: rgba(51, 65, 85, 0.92);
}

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

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

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

.hero-dot {
  width: 1rem;
  height: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: #4b5563;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #2563eb;
}

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-hero {
  padding: 4rem 1rem 2rem;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 34%), #020617;
}

.page-hero-inner {
  max-width: 80rem;
  margin: 0 auto;
}

.page-kicker {
  color: #22d3ee;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.page-hero h1,
.section-title {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.14;
}

.page-hero h1 {
  max-width: 58rem;
  margin-top: 0.6rem;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 50rem;
  margin: 1rem 0 0;
  color: #94a3b8;
  font-size: 1.08rem;
}

.section-block {
  margin-top: 3rem;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.section-title {
  font-size: 1.55rem;
}

.section-link {
  color: #38bdf8;
  font-size: 0.95rem;
}

.chip-row a,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  color: #ffffff;
  background: #0f172a;
  border: 1px solid #1e293b;
}

.chip-row a:hover {
  background: #2563eb;
  border-color: #2563eb;
}

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

.movie-card {
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 0.78rem;
  background: #0f172a;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.2), transparent);
  transition: opacity 0.25s ease;
}

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

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

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

.card-category,
.card-year,
.rank-badge {
  position: absolute;
  top: 0.55rem;
  border-radius: 0.35rem;
  padding: 0.28rem 0.48rem;
  color: #ffffff;
  font-size: 0.74rem;
  line-height: 1;
  background: #2563eb;
}

.card-category {
  left: 0.55rem;
}

.card-year {
  right: 0.55rem;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 0.55rem;
  top: auto;
  bottom: 0.55rem;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-card-body {
  padding-top: 0.62rem;
}

.movie-card h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h3 a:hover {
  color: #60a5fa;
}

.movie-card p {
  margin: 0.32rem 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  overflow: hidden;
  border-radius: 1rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.75);
  background: #111c31;
}

.category-card-posters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.2rem;
  padding: 0.75rem 0.75rem 0;
}

.category-card-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
}

.category-card-copy {
  padding: 1.15rem;
}

.category-card-copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.category-card-copy p {
  margin: 0 0 0.75rem;
  color: #94a3b8;
}

.category-card-copy span {
  color: #38bdf8;
  font-weight: 700;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.rank-panel,
.info-panel,
.content-card,
.player-shell,
.search-panel,
.filter-box {
  border-radius: 1rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.22);
}

.rank-panel {
  padding: 1rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 2.6rem 4rem 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.78rem;
  border-radius: 0.8rem;
  color: #e2e8f0;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: #1e293b;
}

.rank-row img {
  width: 4rem;
  height: 5.6rem;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #020617;
}

.rank-no {
  color: #38bdf8;
  font-weight: 900;
  font-size: 1.1rem;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  color: #ffffff;
  line-height: 1.35;
}

.rank-copy em {
  margin-top: 0.25rem;
  color: #94a3b8;
  font-style: normal;
  font-size: 0.82rem;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.8fr);
  gap: 1.5rem;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  margin-bottom: 1.3rem;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-error {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #fecaca;
  text-align: center;
  background: rgba(0, 0, 0, 0.82);
}

.player-error.is-visible {
  display: flex;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent);
  transition: opacity 0.2s ease;
}

.video-frame:hover .player-controls,
.video-frame.is-paused .player-controls {
  opacity: 1;
}

.player-controls button,
.big-play {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.player-controls button {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

.player-controls button:hover {
  background: #06b6d4;
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #06b6d4;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.35);
}

.big-play:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.video-frame.is-playing .big-play {
  display: none;
}

.content-card {
  padding: 1.35rem;
}

.content-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.16;
}

.meta-row {
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 0.92rem;
}

.meta-row span {
  padding: 0.35rem 0.62rem;
  border-radius: 0.5rem;
  background: #111827;
}

.tag-row {
  margin-bottom: 1.2rem;
}

.tag-row span {
  color: #cbd5e1;
  font-size: 0.86rem;
  padding: 0.4rem 0.72rem;
}

.article-block {
  margin-top: 1.2rem;
}

.article-block h2 {
  margin: 0 0 0.55rem;
  font-size: 1.18rem;
}

.article-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.info-panel {
  padding: 1.2rem;
}

.info-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.info-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.info-list div {
  display: grid;
  gap: 0.25rem;
}

.info-list dt {
  color: #94a3b8;
  font-size: 0.82rem;
}

.info-list dd {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

.search-panel {
  padding: 1rem;
  margin-top: 1.4rem;
}

.search-panel form {
  display: flex;
  gap: 0.75rem;
}

.search-panel input {
  flex: 1;
  padding-right: 1rem;
}

.search-empty {
  padding: 2rem;
  color: #94a3b8;
  text-align: center;
  border: 1px dashed #334155;
  border-radius: 1rem;
}

.filter-box {
  padding: 1rem;
  margin-bottom: 1.4rem;
}

.filter-box form {
  display: flex;
  gap: 0.75rem;
}

.filter-count {
  margin-top: 0.65rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 3rem;
  background: #0f172a;
  border-top: 1px solid #1e293b;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p,
.site-footer li,
.footer-copy {
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.footer-copy {
  border-top: 1px solid #1e293b;
  text-align: center;
  padding: 1.2rem;
  font-size: 0.88rem;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-menu {
    gap: 0.8rem;
    font-size: 0.88rem;
  }

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

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

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

  .mobile-toggle {
    display: block;
  }

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

  .hero {
    height: 520px;
  }

  .hero-copy {
    padding: 0 1.25rem;
  }

  .hero-arrow {
    display: none;
  }

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

  .search-panel form,
  .filter-box form {
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .site-nav {
    gap: 0.75rem;
  }

  .site-logo span:last-child {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    height: 500px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

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

  .hero-actions {
    align-items: stretch;
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 9rem;
  }

  .container {
    padding: 2rem 1rem;
  }

  .movie-grid,
  .category-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

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

  .rank-row {
    grid-template-columns: 2rem 3.4rem 1fr;
  }

  .rank-row img {
    width: 3.4rem;
    height: 4.8rem;
  }

  .rank-score {
    display: none;
  }

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