
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f7fb;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.nav-search {
  margin-left: auto;
  width: min(320px, 34vw);
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.nav-search input,
.big-search input,
.card-search {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.nav-search input {
  padding: 10px 12px 10px 16px;
}

.nav-search button,
.big-search button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: #dc2626;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button {
  padding: 10px 16px;
}

.nav-search button:hover,
.big-search button:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #111827;
}

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

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg {
  transform: scale(1.03);
  filter: saturate(1.05);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.12) 52%, rgba(15, 23, 42, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 340px;
  align-items: center;
  gap: 48px;
  padding: 80px 0 150px;
}

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

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
}

.eyebrow.red {
  color: #dc2626;
}

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

.hero-line,
.page-hero p,
.detail-one-line {
  margin: 20px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 22px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags,
.detail-tags {
  margin-top: 18px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  padding: 5px 10px;
  color: #fecaca;
  background: rgba(220, 38, 38, 0.18);
}

.movie-tags span {
  padding: 3px 8px;
  color: #991b1b;
  background: #fee2e2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.3);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.ghost.light {
  color: #111827;
  background: #ffffff;
}

.btn:hover,
.more-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  font-weight: 800;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 102px;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  background: #dc2626;
}

.hero-rail {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero-thumb img {
  width: 52px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.hero-thumb span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 800;
}

.section-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.search-hero {
  margin-top: -48px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 0.65fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.search-hero h2,
.section-head h2,
.category-preview-block h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.search-hero p,
.section-head p,
.category-preview-block p,
.detail-text p {
  color: #6b7280;
}

.big-search {
  display: flex;
  min-height: 56px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  background: #f9fafb;
}

.big-search input {
  padding: 0 18px;
}

.big-search button {
  padding: 0 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 28px;
}

.more-link {
  color: #dc2626;
  background: #fee2e2;
}

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

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

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

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

.poster-link {
  display: block;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: #e5e7eb;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.44);
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  border-radius: 50%;
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.42);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-badge,
.poster-hot {
  position: absolute;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 10px;
  background: #dc2626;
}

.poster-hot {
  right: 10px;
  background: rgba(0, 0, 0, 0.66);
}

.movie-title {
  display: block;
  margin-top: 12px;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-meta,
.movie-brief {
  margin: 4px 0 0;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-brief {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  margin-top: 10px;
}

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

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

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

.movie-card:hover .movie-title {
  color: #dc2626;
}

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

.category-tile {
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

.category-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.category-images img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-tile strong {
  display: block;
  font-size: 20px;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-style: normal;
  font-size: 14px;
}

.ranking-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 30px;
  align-items: start;
}

.ranking-copy {
  position: sticky;
  top: 96px;
  padding: 32px;
  border-radius: 26px;
  color: #ffffff;
  background: radial-gradient(circle at top left, #ef4444, #111827 62%);
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.24);
}

.ranking-copy h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}

.ranking-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 54px 64px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.13);
}

.rank-number {
  color: #dc2626;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  margin-top: 3px;
  color: #6b7280;
  font-style: normal;
  font-size: 14px;
}

.rank-score {
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #111827;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.page-hero {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 72px 16px;
  text-align: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(220, 38, 38, 0.4), transparent 28%),
    linear-gradient(135deg, #111827, #1f2937 58%, #7f1d1d);
}

.page-hero > div {
  width: min(900px, 100%);
}

.category-preview-block {
  padding: 34px 0;
  border-bottom: 1px solid #e5e7eb;
}

.category-preview-block:last-child {
  border-bottom: 0;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.card-search {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: #dc2626;
}

.searchable-card.is-hidden {
  display: none;
}

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

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 42px;
  align-items: end;
  padding: 92px 0 64px;
}

.detail-cover {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
}

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

.player-section {
  padding-top: 38px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #050505;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.18), rgba(0, 0, 0, 0.42));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #dc2626;
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.45);
}

.detail-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.detail-text article,
.detail-side {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-side {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 96px;
}

.detail-side a {
  padding: 12px;
  border-radius: 14px;
  color: #374151;
  background: #f9fafb;
  font-weight: 700;
}

.detail-side a:hover {
  color: #dc2626;
  background: #fee2e2;
}

.site-footer {
  margin-top: 56px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-inner p {
  color: #9ca3af;
}

.footer-links h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-links a {
  color: #9ca3af;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  color: #6b7280;
  text-align: center;
}

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

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

  .hero-content {
    grid-template-columns: 1fr 260px;
  }

  .hero-rail {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    min-height: auto;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 8px;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 74px 0 170px;
  }

  .hero-poster {
    width: min(220px, 58vw);
  }

  .hero-controls {
    bottom: 116px;
  }

  .hero-rail {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-thumb:nth-child(n + 3) {
    display: none;
  }

  .search-hero,
  .ranking-split,
  .detail-text,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

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

  .detail-cover {
    width: min(230px, 70vw);
  }
}

@media (max-width: 640px) {
  .home-grid,
  .category-page-grid,
  .preview-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-shell {
    width: min(100% - 24px, 1200px);
    padding: 40px 0;
  }

  .hero-actions,
  .big-search {
    flex-direction: column;
  }

  .big-search button {
    min-height: 48px;
  }

  .rank-row a {
    grid-template-columns: 44px 54px 1fr;
  }

  .rank-score {
    display: none;
  }

  .rank-row img {
    width: 54px;
    height: 72px;
  }

  .movie-title {
    font-size: 14px;
  }

  .movie-meta,
  .movie-brief {
    font-size: 12px;
  }
}
