/* === pages/release.css === */
/* Якорь «к плееру» со страницы «Продолжить просмотр» */
#release-player {
  scroll-margin-top: 1.25rem;
}

/* Страница релиза — зоны в рамках как на главной */
.release-full {
  margin-top: 2rem;
}

.section-box,
.release-full > .release-header,
.release-full > .release-content,
.release-full > .release-torrents,
.release-full > .release-player,
.release-full > .release-seasons,
.release-full > .similar-releases {
  border-radius: var(--border-24);
  padding: 2.2em 2em 1.2em 2em;
  box-shadow: 0 8px 12px 0px var(--link-2);
  background: var(--bg-second);
  overflow: hidden;
}

.release-full > .release-content,
.release-full > .release-torrents,
.release-full > .release-player,
.release-full > .release-seasons,
.release-full > .similar-releases {
  margin-top: 2rem;
}

.release-header {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-bottom: 0;
}

.release-poster-large img {
  width: 100%;
  border-radius: var(--border-15);
  box-shadow: 0 8px 16px rgba(115, 73, 171, 0.3);
}

.release-info h1 {
  margin-bottom: 1rem;
}

.release-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  color: var(--text);
  font-size: 0.9rem;
}

.meta-item strong {
  color: var(--text);
  margin-right: 0.5rem;
}

/* Рейтинги */
.ratings-container {
  margin-top: 0.5rem;
}

.ratings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.rating-item {
  display: inline-block;
}

.rating-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-second);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  border: 1px solid var(--border-color);
}

.rating-link:hover {
  background: var(--bg-third);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(151, 71, 255, 0.2);
}

.rating-source {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.rating-value {
  font-weight: 700;
  color: var(--link);
  font-size: 1rem;
}

.rating-item.rating-kinopoisk .rating-link {
  border-color: #ffa500;
}

.rating-item.rating-kinopoisk .rating-value {
  color: #ffa500;
}

.rating-item.rating-shikimori .rating-link {
  border-color: #9747FF;
}

.rating-item.rating-shikimori .rating-value {
  color: #9747FF;
}

.rating-item.rating-imdb .rating-link {
  border-color: #f5c518;
}

.rating-item.rating-imdb .rating-value {
  color: #f5c518;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-link {
  padding: 0.25rem 0.75rem;
  background: var(--bg-second);
  border-radius: 12px;
  font-size: 0.85rem;
  transition: background var(--transition);
}

.tag-link:hover {
  background: var(--link);
  color: var(--text);
}

.release-short-description {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-second);
  border-radius: var(--border-15);
}

.release-content {
  margin-top: 0;
}

.release-description-wrap {
  margin-top: 1rem;
}

.release-description {
  line-height: 1.8;
  color: var(--text);
}

.release-description-wrap--collapsed .release-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.release-description-toggle[hidden] {
  display: none;
}

.release-description-toggle {
  margin-top: 0.5rem;
  margin-left: auto;
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.release-description-toggle:hover,
.release-description-toggle:focus {
  color: var(--link);
  border-color: var(--link);
  outline: none;
}

.release-description p {
  margin-bottom: 1rem;
}

/* Галерея */
.release-gallery {
  margin-top: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item {
  display: block;
  border-radius: var(--border-15);
  overflow: hidden;
  transition: transform var(--transition);
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* Похожие релизы */
.similar-releases {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bg-second);
}

/* Секция сезонов */
.release-seasons {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--bg-second);
  width: 100%;
  clear: both;
}

.release-seasons h2 {
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
}

.seasons-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 1.5rem;
  margin-top: 1rem;
  width: 100%;
}

.season-card {
  background: var(--bg-second) !important;
  border-radius: var(--border-15);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border-color);
  display: block;
  width: 100%;
  position: relative;
}

.season-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.season-card a {
  display: block !important;
  text-decoration: none !important;
  color: inherit;
  width: 100%;
  height: 100%;
}

.season-poster {
  width: 100% !important;
  height: 280px !important;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.season-info {
  padding: 1rem;
  display: block;
}

.season-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.season-year {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.season-status {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  background: var(--bg);
  color: var(--text);
}

.season-status.completed {
  background: var(--green);
  color: #fff;
}

.season-status.ongoing {
  background: var(--link);
  color: #fff;
}

.season-status.in-progress {
  background: rgba(151, 71, 255, 0.2);
  color: var(--link);
}

.season-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  background: var(--link);
  color: #fff;
  font-weight: 500;
}

.season-current {
  border: 2px solid var(--link);
  box-shadow: 0 0 0 2px rgba(151, 71, 255, 0.2);
}

.season-current .season-poster {
  opacity: 1;
}

/* Адаптивность для сезонов */
@media (max-width: 768px) {
  .seasons-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .season-poster {
    height: 220px;
  }
  
  .season-info {
    padding: 0.75rem;
  }
  
  .season-title {
    font-size: 0.9rem;
  }
}

/* Лайтбокс */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  color: var(--text);
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--text);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  transition: background var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}/* Читаемость на странице релиза: основной текст ярче (белый в тёмной теме, чёрный в светлой), ссылки при наведении — цвет --link */
.release-full p {
  color: var(--text);
}.release-full a {
  color: var(--text);
  transition: color var(--transition);
}.release-full a:hover {
  color: var(--link);
}

/* Кнопка и модалка «Сообщить об ошибке» плеера LF */
.player-error-report-wrap {
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.player-error-report-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-third);
  border: 1px solid var(--border-color);
  border-radius: var(--border-15);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.player-error-report-btn:hover {
  background: var(--bg-hover);
  border-color: var(--link);
}
.player-error-report-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.player-error-report-modal-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}
.player-error-report-modal-content {
  position: relative;
  background: var(--bg-second);
  border: 1px solid var(--border-color);
  border-radius: var(--border-24);
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.player-error-report-modal-content h3 {
  margin-bottom: 0.5rem;
}
.player-error-report-modal-content p {
  margin-bottom: 1rem;
  color: var(--text-second);
  font-size: 0.9rem;
}
.player-error-report-modal-content textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  box-sizing: border-box;
}
.player-error-report-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.player-error-report-modal-actions button {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}
.player-error-report-modal-actions button[type="submit"] {
  background: var(--link);
  color: #fff;
  border: none;
}
.player-error-report-modal-actions button[type="submit"]:hover {
  background: var(--link-2);
}
.player-error-report-modal-actions button[type="button"] {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-second);
}
.player-error-report-modal-actions button[type="button"]:hover {
  color: var(--text);
  border-color: var(--text-second);
}
/* === pages/catalog.css === */
/* pages/catalog.css */
/* Каталог */
.catalog-main {
  width: 100%;
  flex: 1;
}

.catalog-main .container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* Заголовок каталога слева */
.catalog-main .section-container {
  text-align: left;
}

.catalog-layout {
  display: block;
  margin-top: 2rem;
}

/* Подпись активного фильтра под заголовком каталога */
.catalog-filter-label {
  margin-top: 0.25rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--text-second, #666);
}

/* «Фильтры» и «Сбросить» в одной строке под заголовком каталога */
.catalog-header-filters-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-catalog-filters-reset-inline {
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  box-sizing: border-box;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(151, 71, 255, 0.45);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-catalog-filters-reset-inline:hover {
  background: rgba(151, 71, 255, 0.1);
  border-color: var(--link);
}

:root.light .btn-catalog-filters-reset-inline {
  color: #0d1014;
  border-color: rgba(151, 71, 255, 0.45);
}

:root.light .btn-catalog-filters-reset-inline:hover {
  background: rgba(151, 71, 255, 0.08);
}

/* Кнопка «Фильтры» в шапке каталога — высота как у сортировки, обводка не обрезается */
.btn-filters-open {
  min-height: 44px;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  background: var(--bg-second);
  color: var(--text);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-filters-open:hover {
  background: rgba(151, 71, 255, 0.1);
}

/* Страница 404 */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  background: var(--link);
  color: var(--text);
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.error-page-btn:hover {
  opacity: 0.9;
}

/* Шаблон релиза */
.release-alt-titles {
  font-size: 0.85em;
  color: var(--text-second);
  margin-bottom: 0.5rem;
}

.actor-role {
  color: var(--text-second);
}

/* Результаты каталога */
.catalog-empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  color: var(--text-second);
  text-align: center;
}

/* Пагинация каталога — в одном стиле с кнопкой «Фильтры» */
.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.catalog-pagination a,
.catalog-pagination button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-second);
  color: var(--text);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  box-sizing: border-box;
}

.catalog-pagination a:hover,
.catalog-pagination button:hover:not(:disabled):not(.active) {
  background: rgba(151, 71, 255, 0.1);
  border-color: var(--border-color);
  color: var(--text);
}

.catalog-pagination button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.catalog-pagination button.active {
  background: var(--link);
  border-color: var(--link);
  color: var(--text);
}

.catalog-pagination-ellipsis {
  padding: 0.5rem 0.25rem;
  color: var(--text-second);
  font-weight: 500;
}

.catalog-pagination-pages {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.catalog-pagination .pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-second);
  color: var(--text);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  box-sizing: border-box;
  transition: var(--transition);
}

.catalog-pagination a.pagination-page:hover {
  background: rgba(151, 71, 255, 0.1);
  border-color: var(--border-color);
  color: var(--text);
}

.catalog-pagination .pagination-page--current {
  background: var(--link);
  border-color: var(--link);
  color: var(--text);
  cursor: default;
}

.btn-catalog-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: 0.35rem;
  padding: 0;
  border-radius: 8px;
  color: var(--text-second);
  background: var(--bg-second);
  box-shadow: 0 0 0 1px var(--border-color);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font: inherit;
}

.btn-catalog-settings:hover {
  color: var(--text);
  box-shadow: 0 0 0 1px var(--link);
}

.catalog-settings-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.catalog-settings-section-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.catalog-settings-layout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.catalog-settings-layout-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--bg-second);
  border: 1px solid var(--border-color);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.catalog-settings-layout-choice:hover {
  border-color: var(--link);
  color: var(--text);
}

.catalog-settings-layout-choice.is-active {
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(151, 71, 255, 0.35);
  color: var(--link);
}

.catalog-settings-layout-icon {
  display: flex;
  color: currentColor;
}

.catalog-settings-browse-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.catalog-settings-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
}

.catalog-settings-radio input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--link);
  cursor: pointer;
}

.catalog-settings-actions {
  margin-top: 0.25rem;
}

.catalog-infinite-sentinel {
  min-height: 2px;
  margin-top: 1.5rem;
  pointer-events: none;
}

.catalog-infinite-sentinel.is-loading {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-second);
  font-size: 0.95rem;
}

.catalog-infinite-sentinel.is-loading::after {
  content: 'Загрузка…';
}

.catalog-back-to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--link);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  font: inherit;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.catalog-back-to-top:hover {
  box-shadow: 0 6px 20px rgba(151, 71, 255, 0.45);
}

.catalog-back-to-top:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.catalog-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Tom Select кастомные стили для каталога - упрощенный дизайн */
.ts-wrapper.filter-select,
.ts-wrapper.filter-select.single,
.ts-wrapper.filter-select.multi {
  background: transparent !important;
  border: 1px solid var(--text-second);
  border-radius: 6px;
  font-size: 0.9rem;
}

.ts-wrapper.filter-select .ts-control {
  background: transparent !important;
  border: none !important;
  color: var(--text);
  padding: 0.5rem;
  min-height: auto;
}

.ts-wrapper.filter-select .ts-control input {
  color: var(--text);
  background: transparent !important;
}

.ts-wrapper.filter-select .ts-control input::placeholder {
  color: var(--text-second);
  opacity: 0.7;
}

.ts-wrapper.filter-select .ts-control.focus {
  border-color: var(--link);
  box-shadow: none;
}

.ts-wrapper.filter-select.focus {
  border-color: var(--link);
  box-shadow: none;
}

.ts-wrapper.filter-select .ts-dropdown {
  background: var(--bg-second);
  border: 1px solid var(--text-second);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin-top: 4px;
}

.ts-wrapper.filter-select .ts-dropdown-content {
  max-height: 250px;
  overflow-y: auto;
  background: var(--bg-second);
}

.ts-wrapper.filter-select .ts-dropdown [data-selectable] {
  padding: 0.5rem 0.75rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s;
  background: transparent;
  font-size: 0.9rem;
}

.ts-wrapper.filter-select .ts-dropdown [data-selectable]:hover,
.ts-wrapper.filter-select .ts-dropdown [data-selectable].active {
  background: rgba(151, 71, 255, 0.15);
  color: var(--text);
}

.ts-wrapper.filter-select .ts-dropdown [data-selectable].selected {
  background: rgba(151, 71, 255, 0.25);
  color: var(--link);

