:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(30, 41, 59, 0.52);
  --line: rgba(56, 189, 248, 0.2);
  --line-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #60a5fa;
  --orange: #fb923c;
  --violet: #a78bfa;
  --gold: #facc15;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
  --header-height: 80px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -10%, rgba(6, 182, 212, 0.18), transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.14), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(8, 145, 178, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.36);
}

.brand-icon::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 11px;
  border-left: 13px solid #ffffff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.brand-icon.small {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 10px;
}

.brand-icon.small::before {
  left: 12px;
  top: 8px;
  border-left-width: 10px;
  border-top-width: 7px;
  border-bottom-width: 7px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--cyan);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
  display: grid;
  gap: 4px;
}

.mobile-link {
  padding: 10px 4px;
  color: #cbd5e1;
  font-weight: 700;
}

.mobile-link.sub {
  color: var(--muted);
  padding-left: 18px;
  font-size: 14px;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--cyan);
}

main {
  overflow: hidden;
}

.page-main {
  padding-top: var(--header-height);
}

.hero {
  position: relative;
  height: 85vh;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-image,
.hero-shade,
.hero-side-shade {
  position: absolute;
  inset: 0;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 36%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-side-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.4) 48%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 20px currentColor;
}

.eyebrow.warm {
  color: var(--orange);
}

.eyebrow.violet {
  color: var(--violet);
}

.eyebrow.gold {
  color: var(--gold);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.hero p {
  margin: 0 0 24px;
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(16px, 2.2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta,
.hero-tags,
.tag-row,
.tag-cloud,
.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 16px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.hero-tags {
  margin-bottom: 30px;
}

.hero-tags span,
.tag-row span,
.tag-cloud span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.22);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.24);
  border: 0;
}

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

.primary-button:hover {
  box-shadow: 0 22px 54px rgba(6, 182, 212, 0.34);
}

.primary-button.small,
.ghost-button.small {
  min-height: 44px;
  padding: 0 18px;
}

.primary-button.full {
  width: 100%;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 56px;
  display: flex;
  gap: 12px;
}

.hero-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(34, 211, 238, 0.26);
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 10px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--cyan);
}

.search-panel,
.page-hero,
.section-block,
.detail-card,
.aside-card,
.player-card,
.category-card-large,
.recommendation-shell,
.category-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.42));
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  align-items: center;
  gap: 26px;
  margin-top: -34px;
  margin-bottom: 76px;
  padding: 26px;
  position: relative;
  z-index: 8;
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-panel h2 {
  font-size: clamp(22px, 3vw, 34px);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
  gap: 12px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  outline: none;
  background: rgba(2, 6, 23, 0.58);
  color: var(--text);
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.sticky-panel {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 15;
  margin-top: 22px;
}

.slim-panel {
  margin-top: 24px;
  margin-bottom: 24px;
}

.section-block {
  padding: 32px;
  margin-bottom: 70px;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-head h3 {
  margin: 0;
  font-size: 22px;
}

.section-head a {
  color: var(--cyan);
  font-weight: 800;
}

.small-head {
  margin-bottom: 18px;
}

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

.compact-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

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

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

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

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

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 22px 42px rgba(8, 145, 178, 0.16);
}

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

.movie-card.compact .poster-wrap {
  aspect-ratio: 16 / 10;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 56%);
  opacity: 0.72;
  transition: opacity 0.25s ease;
}

.movie-link:hover .poster-wrap::after {
  opacity: 0.92;
}

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

.movie-link:hover img {
  transform: scale(1.08);
}

.type-badge,
.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: white;
  background: rgba(6, 182, 212, 0.9);
}

.score-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: #fef3c7;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(250, 204, 21, 0.26);
}

.rank-badge {
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #020617;
  background: linear-gradient(135deg, #fde68a, #f97316);
}

.play-circle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(10px);
}

.play-circle::before {
  content: "";
  margin-left: 4px;
  border-left: 16px solid #ffffff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  min-height: 45px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-body h3 {
  min-height: 0;
  font-size: 15px;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  color: var(--soft);
  font-size: 13px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  color: #bae6fd;
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.16);
}

.category-panel {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.48));
}

.category-chip-row {
  margin-bottom: 24px;
}

.category-chip {
  display: inline-flex;
  padding: 10px 15px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.36);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.category-chip:hover,
.category-chip.active {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.64);
  background: rgba(6, 182, 212, 0.18);
  transform: translateY(-2px);
}

.category-showcase {
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero {
  margin-top: 36px;
  margin-bottom: 30px;
  padding: 42px;
}

.small-hero {
  background:
    radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.42));
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 880px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 17px;
}

.page-chips {
  margin-top: 24px;
  margin-bottom: 0;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 70px;
}

.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.category-card-large a {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  min-height: 260px;
  flex-direction: column;
  padding: 30px;
}

.category-card-large h2 {
  margin: 0 0 14px;
  font-size: 32px;
}

.category-card-large p {
  margin: 0 0 20px;
  color: var(--soft);
}

.category-glow {
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  filter: blur(6px);
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.category-samples a {
  min-height: 0;
  padding: 0;
  color: var(--cyan);
  font-weight: 700;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-filter {
  margin-bottom: 22px;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 56px 92px 1fr auto 70px;
  gap: 16px;
  align-items: center;
  min-height: 110px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.56);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-link:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(15, 23, 42, 0.86);
  transform: translateX(4px);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
  font-weight: 900;
}

.rank-link img {
  width: 92px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-info strong {
  color: var(--text);
  font-size: 18px;
}

.rank-info em,
.rank-meta {
  color: var(--muted);
  font-style: normal;
}

.rank-info em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cyan);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

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

.player-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 24px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
  position: relative;
  width: 82px;
  height: 82px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.34);
}

.player-play-icon::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 25px;
  border-left: 22px solid #ffffff;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.custom-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  pointer-events: none;
}

.custom-controls button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.detail-meta {
  margin: 18px 0 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-section {
  margin-top: 24px;
}

.detail-section h2,
.aside-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-section p {
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 16px;
}

.tag-cloud {
  margin-top: 12px;
}

.detail-aside {
  display: grid;
  align-content: start;
  gap: 20px;
}

.aside-card {
  padding: 20px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 16px;
}

.aside-list {
  display: grid;
  gap: 12px;
}

.aside-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.aside-item:hover {
  background: rgba(30, 41, 59, 0.66);
}

.aside-item img {
  width: 96px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
}

.aside-item span {
  min-width: 0;
  display: grid;
}

.aside-item strong {
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.aside-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.related-block {
  margin-top: 34px;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.8fr 1fr;
  gap: 34px;
  padding: 44px 0 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.site-footer p,
.site-footer li,
.footer-bottom {
  color: var(--muted);
  font-size: 14px;
}

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

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

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

@media (max-width: 960px) {
  :root {
    --header-height: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .brand-title {
    font-size: 20px;
  }

  .hero {
    height: 78vh;
    min-height: 570px;
  }

  .hero-content {
    padding-bottom: 96px;
  }

  .hero-controls {
    right: 18px;
    bottom: 42px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .wide-grid,
  .category-grid,
  .compact-grid,
  .dense-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .rank-link {
    grid-template-columns: 44px 74px 1fr 58px;
  }

  .rank-meta {
    display: none;
  }
}

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

  .brand-subtitle {
    display: none;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .hero {
    min-height: 560px;
  }

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

  .hero p {
    font-size: 15px;
  }

  .hero-controls {
    display: none;
  }

  .hero-dots {
    bottom: 20px;
  }

  .search-panel,
  .section-block,
  .page-hero,
  .detail-card {
    padding: 20px;
  }

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

  .movie-grid,
  .wide-grid,
  .category-grid,
  .compact-grid,
  .dense-grid,
  .category-overview-grid,
  .detail-aside,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-body h3 {
    min-height: 0;
  }

  .rank-link {
    grid-template-columns: 40px 72px 1fr;
    gap: 10px;
  }

  .rank-score {
    grid-column: 3;
  }

  .custom-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .custom-controls button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
}
