/* ========== СТРАНИЦА ПОИСКА ========== */
.search-page {
  padding: 10px 0 40px;
}

/* Заголовок и счётчик */
.search-head {
  margin-bottom: 22px;
}

.search-heading {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.25;
}

.search-count {
  color: #888;
  font-size: 14px;
}

/* Тулбар: вкладки + сортировка */
.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-tabs {
  display: flex;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid #222;
  border-radius: 30px;
  padding: 4px;
}

.search-tab {
  background-color: transparent;
  color: #999;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}

.search-tab:hover {
  color: #fff;
}

.search-tab.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.15),
    rgba(236, 72, 153, 0.1)
  );
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

/* Сортировка */
.search-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #888;
}

.search-sort select {
  background-color: #111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
}

.search-sort select:hover,
.search-sort select:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px rgba(var(--neon-purple-rgb), 0.4);
}

/* Сетка карточек */
.search-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}

/* Карточки в сетке — те же .movie-card, но без фикс. ширины */
.search-grid .movie-card {
  width: 100%;
  min-width: 0;
}

/* Скелетоны */
.skeleton-card {
  background-color: #1a1a1a;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
}

.skeleton-poster {
  width: 100%;
  height: 320px;
  background: linear-gradient(90deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

.skeleton-info {
  padding: 14px;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #1a1a1a 0%, #252525 50%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.4s ease-in-out infinite;
  margin-bottom: 8px;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes skeletonPulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Пустой результат */
.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.search-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(var(--neon-purple-rgb), 0.08);
  border: 1px solid rgba(var(--neon-purple-rgb), 0.25);
  color: var(--neon-purple);
}

.search-empty-icon svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-empty h2 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: bold;
}

.search-empty p {
  font-size: 14px;
  margin-bottom: 24px;
}

.search-empty a {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 16px rgba(var(--neon-purple-rgb), 0.4);
}

.search-empty a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(var(--neon-purple-rgb), 0.6);
}

/* Кнопка "Показать ещё" */
.search-more-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 20px;
}

.search-more {
  background-color: transparent;
  color: #fff;
  border: 2px solid var(--neon-purple);
  border-radius: 30px;
  padding: 12px 36px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.search-more:hover {
  background-color: var(--neon-purple);
  color: #000;
  box-shadow: 0 0 20px rgba(var(--neon-purple-rgb), 0.7);
  transform: translateY(-2px);
}

.search-more:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  background-color: transparent;
  color: #fff;
  box-shadow: none;
}

/* Адаптив */
@media (max-width: 1280px) {
  .search-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .search-heading {
    font-size: 20px;
  }

  .search-toolbar {
    gap: 12px;
  }

  .search-sort {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .search-grid {
    grid-template-columns: 1fr;
  }
}
