:root {
  --bg: #030712;
  --bg-soft: #07111f;
  --panel: #111827;
  --panel-soft: rgba(17, 24, 39, 0.76);
  --panel-hover: #1f2937;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --accent-line: rgba(16, 185, 129, 0.45);
  --blue-soft: rgba(59, 130, 246, 0.18);
  --purple-soft: rgba(168, 85, 247, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.14), transparent 24rem), radial-gradient(circle at 78% 8%, rgba(59, 130, 246, 0.1), transparent 26rem), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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: 100;
  background: rgba(17, 24, 39, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #6ee7b7;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.24);
  font-size: 14px;
}

.logo-text {
  font-size: 20px;
}

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

.nav-link {
  color: var(--soft);
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #6ee7b7;
}

.header-search {
  position: relative;
  width: 230px;
}

.site-search-input,
.catalog-search,
.catalog-filter {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.72);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}

.site-search-input:focus,
.catalog-search:focus,
.catalog-filter:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.09);
}

.site-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(3, 7, 18, 0.96);
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
}

.site-search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: rgba(31, 41, 55, 0.78);
}

.search-result-item img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.search-result-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.5);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.hero {
  position: relative;
  min-height: 560px;
  height: 70vh;
  overflow: hidden;
  background: #000000;
}

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

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

.hero-image,
.ranking-hero > img,
.detail-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.62) 38%, rgba(3, 7, 18, 0.18)), linear-gradient(0deg, var(--bg) 0%, rgba(3, 7, 18, 0.16) 42%, rgba(3, 7, 18, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 1180px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
}

.hero h1,
.hero h2 {
  max-width: 720px;
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--soft);
  font-size: 19px;
}

.hero-actions,
.quick-actions,
.preview-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.primary-button {
  color: #ffffff;
  background: #059669;
  border: 1px solid #10b981;
  box-shadow: 0 14px 26px rgba(16, 185, 129, 0.22);
}

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

.primary-button:hover {
  background: #10b981;
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(17, 24, 39, 0.62);
}

.ghost-button:hover {
  border-color: var(--accent-line);
  color: #6ee7b7;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--text);
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 26px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--accent);
  opacity: 1;
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(17, 24, 39, 0.45);
}

.section-gradient {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.74), rgba(3, 7, 18, 0));
}

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

.section-heading h2,
.preview-head h2,
.content-panel h2,
.side-panel h2 {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.2;
}

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

.section-heading a {
  color: #6ee7b7;
  font-weight: 700;
  white-space: nowrap;
}

.quick-search-section {
  padding: 36px 0 10px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(6, 78, 59, 0.28));
  box-shadow: var(--shadow);
}

.quick-search-card h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 4vw, 36px);
}

.quick-search-card p,
.preview-head p,
.content-panel p,
.side-panel p,
.page-hero p {
  margin: 0;
  color: var(--soft);
}

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

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

.card-link,
.movie-card > a {
  display: block;
  height: 100%;
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.7);
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover .card-link,
.movie-card:hover > a {
  transform: translateY(-5px);
  background: rgba(31, 41, 55, 0.88);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #000000;
}

.poster-wrap img,
.featured-main img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-wrap img,
.featured-main:hover img,
.category-tile:hover img {
  transform: scale(1.08);
}

.poster-shade,
.featured-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.04));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade,
.featured-main:hover .featured-shade,
.category-tile:hover .tile-shade {
  opacity: 1;
}

.poster-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-meta {
  opacity: 1;
  transform: translateY(0);
}

.poster-meta span,
.card-tags span,
.detail-tags span,
.detail-badges span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.72);
  color: var(--soft);
  font-size: 12px;
  padding: 4px 9px;
}

.card-body {
  padding: 16px;
}

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

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span {
  background: rgba(31, 41, 55, 0.95);
}

.featured-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.featured-main {
  position: relative;
  display: block;
  min-height: 430px;
  border-radius: 22px;
  overflow: hidden;
  background: #000000;
}

.featured-text,
.tile-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
}

.featured-text em,
.tile-text em {
  color: #6ee7b7;
  font-style: normal;
  font-weight: 700;
}

.featured-text strong,
.tile-text strong {
  display: block;
  margin: 8px 0;
  color: var(--text);
  font-size: 28px;
  line-height: 1.2;
}

.featured-text span,
.tile-text em {
  color: var(--soft);
}

.featured-side,
.side-list {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 94px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 90px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.76);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(31, 41, 55, 0.9);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: #6ee7b7;
  font-weight: 800;
}

.rank-item img {
  width: 94px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong {
  display: -webkit-box;
  color: var(--text);
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-info em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.category-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  background: var(--panel);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
}

.tile-text {
  z-index: 3;
  padding: 20px;
}

.tile-text strong {
  font-size: 20px;
}

.tile-text em {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.horizontal-row,
.wide-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.wide-scroller {
  grid-auto-columns: 260px;
}

.horizontal-row .movie-card,
.wide-scroller .movie-card {
  scroll-snap-align: start;
}

.horizontal-row::-webkit-scrollbar,
.wide-scroller::-webkit-scrollbar {
  height: 8px;
}

.horizontal-row::-webkit-scrollbar-track,
.wide-scroller::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.5);
  border-radius: 999px;
}

.horizontal-row::-webkit-scrollbar-thumb,
.wide-scroller::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.7);
  border-radius: 999px;
}

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

.mosaic-grid .movie-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.mosaic-grid .poster-wrap {
  aspect-ratio: 1 / 1;
}

.page-main {
  padding-top: 64px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.26), rgba(17, 24, 39, 0.78));
}

.compact-hero {
  padding: 70px 0 58px;
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a:hover {
  color: #6ee7b7;
}

.collection-preview {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.preview-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.preview-head > div {
  max-width: 760px;
}

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

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 160px 170px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.72);
}

.catalog-search,
.catalog-filter {
  height: 44px;
  padding: 0 14px;
}

.catalog-filter {
  color: var(--soft);
}

.empty-state {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(17, 24, 39, 0.72);
}

.movie-card.is-hidden,
.ranking-card.is-hidden {
  display: none;
}

.ranking-hero {
  min-height: 470px;
  display: flex;
  align-items: end;
  padding: 76px 0 62px;
}

.ranking-hero-content {
  position: relative;
  z-index: 2;
}

.ranking-hero h1 {
  max-width: 700px;
}

.ranking-hero p {
  max-width: 660px;
  margin-bottom: 24px;
}

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

.ranking-card > a {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
}

.ranking-card img {
  width: 96px;
  height: 132px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-index {
  color: #6ee7b7;
  font-size: 22px;
  font-weight: 900;
}

.ranking-detail strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.ranking-detail em,
.ranking-detail span {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.ranking-detail span {
  margin-top: 7px;
  color: var(--soft);
}

.ranking-score {
  display: grid;
  min-width: 62px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6ee7b7;
  font-weight: 800;
}

.detail-main {
  padding-top: 64px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 54px;
  background: #000000;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.97), rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.44)), linear-gradient(0deg, var(--bg), rgba(3, 7, 18, 0.2));
  backdrop-filter: blur(4px);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: end;
}

.detail-poster {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-intro h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  color: #6ee7b7;
  font-size: 20px;
  font-style: italic;
}

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

.detail-badges span:nth-child(2) {
  background: var(--blue-soft);
  color: #93c5fd;
}

.detail-badges span:nth-child(3) {
  background: var(--purple-soft);
  color: #d8b4fe;
}

.detail-tags {
  margin: 22px 0 26px;
}

.detail-tags span {
  background: rgba(31, 41, 55, 0.9);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 30px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #ffffff;
  background: #000000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.58;
}

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

.play-circle {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.88);
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.32);
  font-size: 34px;
}

.content-panel,
.side-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.78);
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.content-panel p {
  color: var(--soft);
  white-space: pre-line;
}

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

.movie-info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.movie-info-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.movie-info-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.movie-info-list dt {
  color: var(--muted);
}

.movie-info-list dd {
  margin: 0;
  color: var(--text);
}

.side-collection .ghost-button {
  margin-top: 16px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.76);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.footer-brand p {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 22px;
}

.footer-links a {
  color: var(--soft);
  font-size: 14px;
}

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

@media (max-width: 1060px) {
  .nav-menu {
    gap: 14px;
  }

  .header-search {
    width: 190px;
  }

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

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

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

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

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

@media (max-width: 820px) {
  .header-inner {
    gap: 12px;
  }

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.97);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
    border-radius: 12px;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: rgba(16, 185, 129, 0.1);
  }

  .header-search {
    display: none;
  }

  .hero {
    height: 74vh;
    min-height: 540px;
  }

  .hero-gradient {
    background: linear-gradient(0deg, var(--bg), rgba(3, 7, 18, 0.46)), linear-gradient(90deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.28));
  }

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

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

  .quick-search-card,
  .featured-layout,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .featured-main {
    min-height: 330px;
  }

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

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

  .mosaic-grid .movie-card:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .ranking-card > a {
    grid-template-columns: 48px 72px 1fr;
  }

  .ranking-card img {
    width: 72px;
    height: 96px;
  }

  .ranking-score {
    grid-column: 3;
    justify-self: start;
  }

  .detail-poster {
    width: 200px;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 18px;
  }

  .section {
    padding: 52px 0;
  }

  .section-heading,
  .preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .preview-grid,
  .category-grid,
  .category-overview-grid,
  .rank-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-row,
  .wide-scroller {
    grid-auto-columns: 78%;
  }

  .rank-item {
    grid-template-columns: auto 82px 1fr;
  }

  .rank-item img {
    width: 82px;
    height: 58px;
  }

  .hero-controls {
    bottom: 16px;
  }

  .detail-layout {
    gap: 22px;
  }

  .detail-poster {
    width: 168px;
  }

  .content-panel,
  .side-panel {
    padding: 18px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
