html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

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

.site-shell {
  color: #f3f4f6;
}

.brand-mark {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}

.brand-mark.small {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.875rem;
}

.nav-link,
.mobile-nav-link {
  color: #d1d5db;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  display: inline-flex;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #ffffff;
  background: rgba(30, 64, 175, 0.5);
}

.mobile-menu-button {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.625rem;
  border-radius: 0.625rem;
  color: #d1d5db;
}

.mobile-menu-button span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.search-shell {
  position: relative;
}

.site-search-input {
  width: 16rem;
  border: 1px solid rgba(29, 78, 216, 0.5);
  border-radius: 0.625rem;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  outline: none;
}

.site-search-input::placeholder {
  color: #9ca3af;
}

.site-search-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #3b82f6;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.hero-slider {
  height: 500px;
  background: #020617;
}

@media (min-width: 768px) {
  .hero-slider {
    height: 600px;
  }
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(15, 23, 42, 0.68) 48%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 1rem 4.5rem;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 3rem 1.5rem 5.5rem;
  }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.hero-content h1,
.page-hero h1 {
  max-width: 48rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}

.hero-content p,
.page-hero p {
  max-width: 42rem;
  color: #e5e7eb;
  line-height: 1.75;
}

.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.75rem;
  padding: 0 1.25rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.primary-button {
  background: #2563eb;
  color: #ffffff;
}

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

.ghost-button {
  background: rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.ghost-button:hover {
  background: rgba(30, 64, 175, 0.6);
  color: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.75rem;
  height: 2.75rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
}

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

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

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

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

.content-section {
  margin-bottom: 4rem;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.section-title h2 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
}

.section-icon {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(37, 99, 235, 0.22);
  color: #60a5fa;
}

.section-more {
  color: #60a5fa;
  font-size: 0.875rem;
  font-weight: 700;
}

.section-more:hover {
  color: #93c5fd;
}

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

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

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

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  background: rgba(30, 41, 59, 0.5);
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px #3b82f6, 0 18px 36px rgba(15, 23, 42, 0.35);
  background: rgba(30, 41, 59, 0.72);
}

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .movie-thumb img {
  transform: scale(1.04);
}

.movie-play-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .movie-play-mask {
  opacity: 1;
}

.play-triangle {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 1rem solid transparent;
  border-bottom: 1rem solid transparent;
  border-left: 1.55rem solid #ffffff;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}

.play-triangle.small {
  border-top-width: 0.75rem;
  border-bottom-width: 0.75rem;
  border-left-width: 1.1rem;
}

.play-triangle.tiny {
  border-top-width: 0.5rem;
  border-bottom-width: 0.5rem;
  border-left-width: 0.8rem;
}

.play-triangle.large {
  border-top-width: 1.25rem;
  border-bottom-width: 1.25rem;
  border-left-width: 1.9rem;
}

.play-triangle.player {
  border-top-width: 1.5rem;
  border-bottom-width: 1.5rem;
  border-left-width: 2.3rem;
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-body h3,
.movie-info h3,
.movie-info h4 {
  color: #ffffff;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.movie-card-body h3 {
  min-height: 3rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card-body p,
.movie-info p {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card-foot,
.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.movie-meta {
  justify-content: flex-start;
  color: #6b7280;
  font-size: 0.75rem;
}

.category-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 0.45rem;
  background: rgba(37, 99, 235, 0.82);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.category-pill.strong {
  font-size: 0.875rem;
  border-radius: 999px;
  padding: 0.375rem 0.875rem;
}

.movie-year {
  color: #6b7280;
  font-size: 0.75rem;
}

.movie-card.horizontal {
  display: flex;
  gap: 1rem;
  padding: 0;
}

.horizontal-thumb {
  width: 12rem;
  height: 8rem;
  flex-shrink: 0;
  aspect-ratio: auto;
}

.movie-card.horizontal .movie-info {
  padding: 0.875rem 1rem 0.875rem 0;
}

.movie-card.list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
}

.list-thumb {
  width: 6rem;
  height: 4rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  aspect-ratio: auto;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.32);
  padding: 1.5rem;
}

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

.rank-number {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: #334155;
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 800;
}

.rank-number.top {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #ffffff;
}

.movie-card.large {
  border-radius: 1rem;
}

.large-thumb {
  aspect-ratio: 16 / 9;
}

.movie-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12), transparent);
}

.large-caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
}

.large-caption strong,
.large-caption em {
  display: block;
}

.large-caption strong {
  color: #ffffff;
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 800;
}

.large-caption em {
  color: #e5e7eb;
  font-size: 0.875rem;
  font-style: normal;
  line-height: 1.5;
  margin-top: 0.35rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.28), rgba(8, 47, 73, 0.28));
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .intro-panel {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
  }
}

.intro-copy h2 {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.intro-copy p {
  color: #cbd5e1;
  line-height: 1.75;
}

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

.intro-links a {
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.58);
  color: #dbeafe;
  padding: 0.875rem 1rem;
  font-weight: 700;
  text-align: center;
}

.intro-links a:hover {
  background: rgba(37, 99, 235, 0.45);
  color: #ffffff;
}

.page-hero {
  border-radius: 1.25rem;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.42), transparent 34%), linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(96, 165, 250, 0.25);
  padding: 2rem;
  margin-bottom: 2rem;
}

.page-hero.compact h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: #9ca3af;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

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

.filter-panel {
  border: 1px solid rgba(51, 65, 85, 0.75);
}

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

@media (min-width: 768px) {
  .filter-grid {
    grid-template-columns: 1.5fr 0.8fr 0.8fr;
  }
}

.filter-grid label {
  display: grid;
  gap: 0.5rem;
  color: #cbd5e1;
  font-size: 0.875rem;
}

.filter-grid input,
.filter-grid select {
  border: 1px solid rgba(29, 78, 216, 0.5);
  border-radius: 0.625rem;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  padding: 0.75rem 0.875rem;
  outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
  box-shadow: 0 0 0 2px #3b82f6;
}

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

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

.category-overview-card {
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.7);
  padding: 1.25rem;
}

.category-overview-main h2 {
  color: #ffffff;
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0.5rem 0;
}

.category-overview-main p {
  color: #cbd5e1;
  line-height: 1.65;
}

.category-overview-icon {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(37, 99, 235, 0.24);
  color: #93c5fd;
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.category-preview-links a {
  color: #93c5fd;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

.category-preview-links a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.5);
}

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

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

.player-card {
  margin-bottom: 1.5rem;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 0.875rem;
  background: #000000;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.movie-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay::before {
  content: "";
  position: absolute;
  width: 5.75rem;
  height: 5.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.88);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
}

.player-overlay .play-triangle {
  position: relative;
  z-index: 2;
  transform: translateX(0.2rem);
}

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

.detail-panel {
  border: 1px solid rgba(51, 65, 85, 0.7);
}

.detail-panel h1 {
  color: #ffffff;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.detail-panel h2,
.side-card h2 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.detail-panel p {
  color: #d1d5db;
  line-height: 1.9;
  text-align: justify;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-meta span {
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.65);
  color: #cbd5e1;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
}

.genre-line {
  color: #9ca3af;
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag-pill {
  background: rgba(51, 65, 85, 0.75);
  color: #cbd5e1;
}

.one-line {
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  color: #93c5fd !important;
  font-size: 1.125rem;
  font-weight: 700;
  padding-top: 1rem;
}

.detail-side {
  min-width: 0;
}

@media (min-width: 1024px) {
  .detail-side {
    position: sticky;
    top: 5rem;
    align-self: start;
  }
}

.search-page-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.search-page-form .site-search-input {
  width: min(100%, 32rem);
  padding-left: 1rem;
}

.footer-title {
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-links a,
.site-footer a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

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

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

@media (max-width: 640px) {
  .hero-arrow {
    display: none;
  }

  .hero-content {
    padding-bottom: 4rem;
  }

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

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

  .movie-card.horizontal {
    gap: 0.75rem;
  }

  .horizontal-thumb {
    width: 7.5rem;
    height: 5rem;
  }

  .movie-card.horizontal .movie-info {
    padding: 0.65rem 0.75rem 0.65rem 0;
  }

  .movie-info p {
    display: none;
  }
}
