:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --orange: #f97316;
  --yellow: #eab308;
  --red: #ef4444;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  color: var(--gray-700);
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: #eff6ff;
}

.header-search,
.mobile-search,
.wide-search,
.page-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.header-search input,
.mobile-search input,
.wide-search input,
.page-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  background: transparent;
}

.header-search button,
.mobile-search button,
.wide-search button,
.page-search button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.header-search {
  width: 300px;
}

.header-search input {
  width: 100%;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  color: var(--blue);
  background: #eff6ff;
  border-radius: 14px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--gray-100);
  padding: 14px 16px 18px;
}

.mobile-panel.open {
  display: block;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.32), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  color: #fff;
}

.hero-content h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: #e0f2fe;
}

.hero-meta span {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.light {
  color: var(--blue);
  background: #fff;
  border-color: transparent;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.ghost-btn.light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.48);
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.search-band {
  margin-top: -48px;
  position: relative;
  z-index: 8;
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-band h2 {
  margin: 10px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.wide-search input {
  flex: 1;
}

.section-block {
  padding: 58px 0;
}

.soft-section {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.section-heading .section-kicker {
  color: var(--blue);
  background: #dbeafe;
}

.section-action {
  color: var(--blue);
  font-weight: 800;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--gray-200);
}

.movie-card:not(.horizontal-card) .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.duration-pill,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  color: #fff;
  background: rgba(2, 6, 23, 0.75);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  top: 10px;
  bottom: auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(2, 6, 23, 0);
  font-size: 44px;
  opacity: 0;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  background: rgba(2, 6, 23, 0.28);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--blue);
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.top-meta {
  justify-content: space-between;
  margin-bottom: 8px;
}

.top-meta a {
  color: var(--blue);
  font-weight: 800;
}

.tag-row,
.detail-tags,
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags a,
.search-chips a {
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(6, 182, 212, 0.18));
  border-radius: 50%;
}

.category-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 18px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.category-card strong {
  display: block;
  margin: 18px 0 8px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.cta-section {
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, var(--blue), var(--cyan));
  padding: 70px 0;
}

.cta-inner {
  text-align: center;
}

.cta-inner h2 {
  max-width: 820px;
  margin: 0 auto 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.cta-inner p {
  max-width: 680px;
  margin: 0 auto 28px;
  color: #e0f2fe;
  font-size: 18px;
}

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

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

.horizontal-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
}

.horizontal-card .poster-link {
  height: 100%;
  min-height: 118px;
}

.horizontal-card .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero {
  color: #fff;
  padding: 82px 0;
  background:
    radial-gradient(circle at 12% 30%, rgba(6, 182, 212, 0.34), transparent 26%),
    linear-gradient(135deg, #0f172a, #1d4ed8 56%, #06b6d4);
}

.page-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--gray-800);
  background: #fff;
  outline: 0;
}

.empty-state {
  display: none;
  padding: 44px;
  color: var(--gray-500);
  text-align: center;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.empty-state.show {
  display: block;
}

.category-preview {
  margin-bottom: 52px;
}

.compact-heading h2 {
  max-width: 760px;
  color: var(--gray-800);
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -0.035em;
}

.player-section {
  padding: 26px 0 38px;
  background: #020617;
}

.light-breadcrumb {
  margin: 0 0 16px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 24px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.video-element {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.34);
  font-size: 34px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 42px 0 70px;
}

.detail-card,
.sidebar-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.detail-card {
  padding: 26px;
}

.detail-heading {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: start;
}

.detail-heading img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.detail-badge {
  margin-bottom: 12px;
}

.detail-heading h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.detail-heading p {
  margin: 0 0 16px;
  color: var(--gray-600);
  font-size: 17px;
}

.detail-meta,
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta span,
.detail-stats span,
.detail-stats button {
  padding: 7px 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.detail-stats {
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.detail-stats button {
  color: var(--blue);
  cursor: pointer;
}

.text-section {
  margin-top: 26px;
}

.text-section h2,
.sidebar-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.text-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-tags a {
  color: var(--blue);
  background: #dbeafe;
}

.related-block {
  padding-bottom: 0;
}

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

.sidebar-card {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-list .horizontal-card {
  grid-template-columns: 112px 1fr;
  box-shadow: none;
  border-color: var(--gray-100);
}

.side-list .horizontal-card .movie-info {
  padding: 10px;
}

.side-list .horizontal-card .movie-info p,
.side-list .horizontal-card .movie-meta {
  display: none;
}

.side-more {
  display: block;
  margin-top: 14px;
  padding: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 14px;
  text-align: center;
  font-weight: 800;
}

.ranking-table {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 56px 70px minmax(0, 1fr) 120px 80px 80px 120px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  color: var(--gray-600);
  font-weight: 700;
}

.ranking-row:hover {
  color: var(--blue);
  border-color: #bfdbfe;
}

.ranking-row img {
  width: 70px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: 50%;
  font-weight: 900;
}

.ranking-title {
  overflow: hidden;
  color: var(--gray-900);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-search {
  width: min(680px, 100%);
  margin-top: 24px;
}

.page-search input {
  flex: 1;
}

.search-chips {
  margin-top: 18px;
}

.search-chips a {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding-top: 46px;
}

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

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 38px auto 0;
  padding: 18px 16px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .library-grid,
  .movie-grid,
  .home-grid,
  .feature-grid,
  .preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .sidebar-card {
    position: static;
  }

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

  .ranking-row {
    grid-template-columns: 48px 64px minmax(0, 1fr) 90px 70px;
  }

  .ranking-row span:nth-last-child(-n + 2) {
    display: none;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .header-inner {
    min-height: 62px;
  }

  .brand {
    font-size: 20px;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band {
    margin-top: 0;
  }

  .search-band-inner {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .section-heading {
    display: grid;
  }

  .library-grid,
  .movie-grid,
  .home-grid,
  .feature-grid,
  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .detail-heading {
    grid-template-columns: 1fr;
  }

  .detail-heading img {
    width: min(260px, 100%);
  }

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

  .footer-bottom {
    display: grid;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    height: 520px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

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

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

  .wide-search,
  .page-search {
    display: grid;
    border-radius: 18px;
  }

  .wide-search button,
  .page-search button {
    border-radius: 0;
  }

  .library-grid,
  .movie-grid,
  .home-grid,
  .feature-grid,
  .preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    grid-template-columns: 132px 1fr;
  }

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

  .player-frame {
    border-radius: 16px;
  }

  .detail-card {
    padding: 18px;
  }

  .ranking-row {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .ranking-row span:nth-child(n + 4) {
    display: none;
  }
}
