html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f8fafc;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.site-logo-icon {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.mobile-nav {
  display: none;
}

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

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

.hero-track {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(248, 113, 113, 0.35), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0;
}

.hero-card {
  max-width: 760px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(16px);
}

.hero-title {
  margin: 0.75rem 0 1rem;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  max-width: 680px;
  color: #fee2e2;
  font-size: 1.12rem;
  line-height: 1.85;
}

.hero-actions,
.hero-tags,
.hero-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-actions {
  margin-top: 1.5rem;
}

.hero-tags span,
.badge-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.36rem 0.75rem;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-button,
.hero-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 999px;
  padding: 0 1.35rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero-button {
  background: #ffffff;
  color: #dc2626;
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.18);
}

.hero-button-secondary {
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #ffffff;
  background: rgba(239, 68, 68, 0.22);
}

.hero-button:hover,
.hero-button-secondary:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: max(1rem, calc((100% - 1120px) / 2));
  bottom: 2rem;
  z-index: 4;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1.4rem;
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 180ms ease, background 180ms ease;
}

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

.section-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-kicker {
  color: #ef4444;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

@media (min-width: 768px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (min-width: 1280px) {
  .movie-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-wrap img,
.wide-card img,
.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.poster-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 60%);
  color: #ffffff;
}

.card-body {
  padding: 0.9rem;
}

.card-title {
  min-height: 2.8rem;
  color: #1f2937;
  font-weight: 800;
  line-height: 1.35;
}

.card-desc {
  margin-top: 0.45rem;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
  color: #64748b;
  font-size: 0.78rem;
}

.wide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 38% 1fr;
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.wide-poster {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: #0f172a;
}

.wide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
}

.rank-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 3.5rem 4rem 1fr;
  align-items: center;
  gap: 0.85rem;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.rank-no {
  color: #ef4444;
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  width: 4rem;
  height: 4rem;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #0f172a;
}

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

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

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

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

.category-tile {
  display: block;
  min-height: 180px;
  border-radius: 1.25rem;
  padding: 1.4rem;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, #334155, #111827);
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.page-hero-dark {
  color: #ffffff;
  background: linear-gradient(135deg, #1f2937, #0f172a);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-radius: 1.25rem;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

.filter-panel input,
.filter-panel select,
.nav-search-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.78rem 1rem;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.nav-search-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.player-trigger {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.15));
  color: #ffffff;
}

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

.play-circle {
  display: inline-flex;
  width: 5.6rem;
  height: 5.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #ffffff;
  font-size: 2.4rem;
  line-height: 1;
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.35);
  transform: translateZ(0);
  transition: transform 180ms ease;
}

.player-trigger:hover .play-circle {
  transform: scale(1.08);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

.detail-card,
.side-card {
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-content {
  padding: 1.5rem;
}

.detail-content p {
  color: #374151;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: #64748b;
  font-size: 0.92rem;
}

.related-list {
  display: grid;
  gap: 0.9rem;
}

.related-card {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.8rem;
  align-items: center;
  color: inherit;
}

.related-thumb {
  width: 5rem;
  height: 5rem;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #0f172a;
}

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

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

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

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

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

  .hero-card {
    padding: 1.25rem;
  }

  .hero-controls {
    right: 1rem;
    bottom: 1rem;
  }

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

  .wide-poster {
    min-height: 220px;
  }
}
