/* CSS переменные для темной темы (по умолчанию) */
:root {
  --bg: #0D1014;
  --bg-second: #121212;
  --bg-third: #1a1a1a;
  --bg-hover: rgba(151, 71, 255, 0.1);
  --text: #F5F5F5;
  --text-second: #68727C;
  --link: #9747FF;
  --link-2: #7349AB;
  --red: #ab4949;
  --green: #49ab5a;
  --border-15: 15px;
  --border-24: 24px;
  --border-color: rgba(255, 255, 255, 0.1);
  --transition: 0.2s ease-in-out;
  --background-image: url('/assets/images/Background.webp');
}

/* Светлая тема */
:root.light {
  --text: #0D1014;
  --bg: #f5f5f5;
  --bg-second: #f0f0f0;
  --border-color: rgba(0, 0, 0, 0.1);
  --background-image: url('/assets/images/panda.svg');
}

/* Базовые стили */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Exo 2', sans-serif;
  scroll-behavior: smooth;
}

body {
  font-family: 'Exo 2', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Скроллбар */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background-color: var(--link-2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--link);
}

/* Типография */
h1 {
  color: var(--text);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: .5rem;
}

h2 {
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h3 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

p {
  color: var(--text-second);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

a {
  color: var(--text-second);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--text);
}

button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

ul {
  list-style: none;
}

/* Контейнер */
.body-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

/* Обертка для панели пользователя и header с бэкграундом */
.top-section-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 2em;
  padding-top: env(safe-area-inset-top);
}

.background-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image var(--transition);
}

.user-panel-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1em 2em;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Панель пользователя */
.login {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-log {
  display: flex;
  align-items: center;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--bg-second);
  border-radius: var(--border-24);
  box-shadow: 0 4px 8px 0px var(--link-2);
  margin-right: 1rem;
}

.userbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: all var(--transition);
  border-radius: 50%;
  background: var(--link-2);
  padding: 0.3rem;
}

.userbar a:hover {
  background: var(--link);
  transform: scale(1.1);
}

.userbar .anime-icon,
.userbar .bookmark,
.userbar .exit,
.userbar .admin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.userbar .anime-icon svg,
.userbar .bookmark svg,
.userbar .exit svg,
.userbar .admin-icon svg {
  width: 100%;
  height: 100%;
}

.userbar .anime-icon svg path,
.userbar .exit svg path {
  fill: var(--text);
}

.userbar .bookmark svg path {
  stroke: var(--text);
  fill: none;
}

.userbar .admin-icon svg path {
  stroke: var(--text);
  fill: none;
}

.userbar .admin-icon svg circle {
  fill: var(--text);
}

.login-button svg path,
.register-button svg path {
  fill: var(--text);
  stroke: var(--text);
}

.login-button svg path[stroke],
.register-button svg path[stroke] {
  fill: none;
}

.userbar .us-ic {
  color: var(--text);
  background-color: var(--link-2);
  line-height: 1rem;
  border-radius: var(--border-15);
  padding: 0.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  white-space: nowrap;
  text-transform: uppercase;
}

.avatar {
  border-radius: var(--border-24);
  overflow: hidden;
  border: 2px solid var(--link);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-second);
  box-shadow: -8px 0px 15px 0px var(--link);
}

.avatar img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.avatar .avatar-placeholder {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--link);
  color: var(--bg);
  font-weight: 600;
  font-size: 1.2rem;
}

/* Кнопки входа и регистрации */
.login-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.login-button,
.register-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-second);
  border-radius: var(--border-15);
  box-shadow: 0 4px 8px 0px var(--link-2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.login-button:hover,
.register-button:hover {
  background: var(--link);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px 0px rgba(115, 73, 171, 0.3);
}

.login-button svg,
.register-button svg {
  width: 28px;
  height: 28px;
}

.login-button span,
.register-button span {
  color: var(--text);
}


/* Шапка */
header {
  width: 100%;
  position: relative;
  z-index: 1;
}

.header-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 2em;
  padding: 1em 2em;
  border-radius: var(--border-24);
  box-shadow: 0 8px 12px 0px var(--link-2);
  background: var(--bg-second);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  max-width: 60px;
  min-width: 35px;
  width: 4vw;
  height: auto;
  vertical-align: middle;
}

.nav-menu {
  display: flex;
  gap: 2vw;
  flex-wrap: wrap;
}

.nav-menu a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--link);
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after,
.nav-menu a:focus::after {
  opacity: 1;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
}

.nav-link-text {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1rem;
}

/* Поиск */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Кнопка поиска для мобильных - скрыта на десктопе */
.search-trigger-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 2px solid rgba(245, 245, 245, 0.2);
  border-radius: 50%;
  color: var(--text-second);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.search-trigger-mobile:hover {
  border-color: var(--link);
  color: var(--link);
}

.search-trigger-mobile svg {
  width: 22px;
  height: 22px;
}

.search-input {
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 2px solid rgba(245, 245, 245, 0.2);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  width: 250px;
  transition: border-color var(--transition);
  cursor: pointer;
}

.search-input:focus {
  outline: none;
  border-color: var(--link);
}

.search-icon {
  position: absolute;
  right: 0.75rem;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* Переключатель темы */
.theme-toggle {
  display: flex;
  padding: 4px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background-color: var(--link-2);
  transition: all var(--transition);
  border-radius: 50%;
}

.theme-toggle:hover {
  background-color: var(--link);
  transform: scale(1.1);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
}

.theme-toggle .sun,
.theme-toggle .moon {
  fill: var(--text);
}

.theme-toggle .sun-beams {
  stroke: var(--text);
}

/* В тёмной теме показываем солнце (переключить на светлую), в светлой — луну (на тёмную) */
.theme-toggle .moon {
  display: none;
}
.theme-toggle .sun,
.theme-toggle .sun-beams {
  display: block;
}
:root.light .theme-toggle .sun,
:root.light .theme-toggle .sun-beams {
  display: none;
}
:root.light .theme-toggle .moon {
  display: block;
}

/* Бургер меню для мобильных */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
}

.burger-menu span {
  width: 25px;
  height: 3px;
  background-color: var(--text);
  transition: all var(--transition);
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Блок новинок */
.new-releases {
  display: flex;
  width: auto;
  height: min-content;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto 2em auto;
  border-radius: 24px;
  padding: 2.2em 2em 1.2em 2em;
  box-shadow: 0 8px 12px 0px var(--link-2);
  background: var(--bg-second);
  overflow: hidden;
}

.new-releases .swiper-container {
  width: 100%;
  padding: 10px 0 1rem;
  overflow: visible;
  margin: 0 -1rem;
  width: calc(100% + 2rem);
}

.new-releases .swiper-container::-webkit-scrollbar {
  display: none;
}

.new-releases .swiper-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.new-releases .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.new-releases .swiper-slide {
  width: auto;
  height: auto;
  display: flex;
}

.new-releases .swiper-slide .release-card {
  width: 100%;
  max-width: 200px;
  min-width: 0;
}

@media (min-width: 768px) {
  .new-releases .swiper-slide .release-card {
    width: 200px;
    min-width: 200px;
  }
}

/* Карточки релизов */
.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 200px));
  gap: 1.5rem;
  margin-bottom: 2rem;
  justify-content: start;
}

.release-card {
  position: relative;
  background: var(--bg-second);
  border-radius: var(--border-15);
  overflow: hidden;
  transition: all var(--transition);
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 200px;
  align-items: center;
  box-shadow: 0 2px 8px 0px var(--link-2);
  padding: 1rem;
  text-align: center;
  min-width: 0;
  margin: 0;
}

.release-card:hover {
  transform: translateY(-5px);
  background-color: var(--link-2);
}

.release-card a {
  display: block;
  text-decoration: none;
}

.release-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  height: auto;
  flex-shrink: 0;
}

.release-title {
  padding: 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 400;
  text-align: center;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.release-title h4 {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

/* Индикаторы статуса */
.release-status {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
}

.release-status.dubbed {
  background-color: var(--green);
}

.release-status.translated {
  background-color: var(--link-2);
}

.release-status.in-progress {
  background-color: var(--link);
}

/* Рейтинг с пандами */
.release-rating-container,
.catalog-rating-container {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.release-rating-under-poster {
  padding: 0.75rem;
  margin-top: 0.5rem;
  background: var(--bg-second);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.release-rating-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.release-rating-item strong {
  margin-right: 0.5rem;
}

.rating-pandas {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.2rem;
  line-height: 1;
}

.panda-icon {
  display: inline-block;
  cursor: default;
  transition: all var(--transition);
  user-select: none;
  filter: grayscale(100%);
  opacity: 0.4;
}

.panda-icon.panda-filled {
  filter: grayscale(0%);
  opacity: 1;
}

.panda-icon.panda-interactive {
  cursor: pointer;
}

.panda-icon.panda-interactive:hover {
  transform: scale(1.2);
  filter: grayscale(0%);
  opacity: 1;
}

.panda-icon.panda-hover {
  filter: grayscale(0%);
  opacity: 1;
}

.panda-icon.panda-user-rating {
  filter: grayscale(0%) drop-shadow(0 0 4px var(--link));
  opacity: 1;
}

.rating-info {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-second);
  white-space: nowrap;
}

/* Рейтинг в каталоге */
.release-card .catalog-rating-container {
  padding: 0.25rem 0.75rem 0.5rem;
  margin-top: -0.25rem;
}

.release-card .rating-pandas {
  font-size: 1rem;
  gap: 0.15rem;
}

.release-card .rating-info {
  display: none;
}

/* KinoPoisk и IMDb на карточках в «Популярное» — правый верхний угол */
.release-card:has(.catalog-card-ratings) .release-status {
  left: 0.5rem;
  right: auto;
}

.catalog-card-ratings {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  z-index: 2;
  flex-direction: column;
}

.catalog-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.6);
}

.catalog-rating-badge .catalog-rating-value {
  font-weight: 700;
}

.catalog-rating-badge.rating-kinopoisk {
  background-color: #ffa500;
  color: var(--text);
  text-shadow: 0 0 4px #a36900;
}

.catalog-rating-badge.rating-kinopoisk .catalog-rating-value {
  color: var(--text);
  text-shadow: 0 0 4px #a36900;
}

.catalog-rating-badge.rating-imdb {
  color: var(--text);
  background-color: #f5c518;
  text-shadow: 0 0 4px #7c640c;
}

.catalog-rating-badge.rating-imdb .catalog-rating-value {
  color: var(--text);
  text-shadow: 0 0 4px #7c640c;
}

/* Уведомления рейтинга */
.rating-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  background: var(--bg-second);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rating-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.rating-notification-success {
  border-left: 4px solid var(--green);
}

.rating-notification-error {
  border-left: 4px solid var(--red);
}

/* Универсальная система уведомлений */
.notifications-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  position: relative;
  padding: 1rem 1.5rem;
  background: var(--bg-second);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
  word-wrap: break-word;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-success {
  border-left: 4px solid var(--green, #4CAF50);
  background: var(--bg-second);
}

.notification-error {
  border-left: 4px solid var(--red, #f44336);
  background: var(--bg-second);
}

.notification-warning {
  border-left: 4px solid var(--yellow, #ff9800);
  background: var(--bg-second);
}

.notification-info {
  border-left: 4px solid var(--blue, #2196F3);
  background: var(--bg-second);
}

/* Табы */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--bg-second);
}

.tab-button {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-second);
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: all var(--transition);
}

.tab-button:hover,
.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--link);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Подвал */
footer {
  margin-top: auto;
  padding: 2rem 1rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  background: var(--bg-second);
  border-top: 1px solid rgba(245, 245, 245, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  transition: background var(--transition);
}

.social-link:hover {
  background: var(--link);
}

.social-link svg {
  width: 24px;
  height: 24px;
}

.social-link svg path {
  fill: var(--text-second);
  transition: fill var(--transition);
}

.social-link:hover svg path {
  fill: var(--text);
}

.footer-contact {
  margin-bottom: 1.5rem;
}

.footer-contact p {
  margin-bottom: 0.5rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-second);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copyright {
  color: var(--text-second);
  font-size: 0.85rem;
}

/* Хлебные крошки */
.breadcrumbs {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--text-second);
}

.breadcrumbs a:hover {
  color: var(--link);
}

.breadcrumbs span {
  color: var(--text-second);
}

/* Адаптивность - Mobile First */
@media (max-width: 768px) {
  .user-panel-container {
    padding: 0.75rem 1rem;
  }

  .userbar {
    gap: 1rem;
    padding: 0.6rem;
  }

  .userbar a {
    width: 38px;
    height: 38px;
  }

  .avatar img{
    width: 65px;
    height: 65px;
  }

  .login-button,
  .register-button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .login-button span,
  .register-button span {
    display: none;
  }

  .background-layer {
    background-position: center top;
  }

  .header-menu {
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.5rem;
    position: relative;
  }

  .header-menu .logo {
    order: 1;
  }

  .header-menu .search-wrapper {
    order: 2;
  }

  .header-menu .theme-toggle {
    order: 3;
  }

  .header-menu .burger-menu {
    order: 4;
  }

  .search-trigger-mobile {
    display: flex;
  }

  .search-input {
    display: none;
  }

  .search-icon {
    display: none;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
    margin-right: 0;
    order: 5;
    background: var(--bg-second);
    border-radius: var(--border-15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
    overflow: hidden;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu a {
    min-height: 44px;
    padding: 0.75rem 1rem;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu a:last-child {
    border-bottom: none;
  }

  .burger-menu {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .releases-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 160px));
    gap: 1rem;
    justify-content: start;
  }
  
  .release-card {
    max-width: 160px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .user-panel-container {
    padding: 0.5rem 0.75rem;
  }

  .userbar {
    gap: 1rem;
    padding: 0.5rem;
  }

  .userbar a {
    width: 28px;
    height: 28px;
  }

  .avatar {
    width: 50px;
    height: 50px;
  }

  .login-button,
  .register-button {
    padding: 0.4rem 0.75rem;
  }

  .login-button svg,
  .register-button svg {
    width: 16px;
    height: 16px;
  }

  .header-menu {
    padding: 0.75rem;
  }

  .logo img {
    min-width: 28px;
  }

  .releases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    justify-content: start;
  }
  
  .release-card {
    max-width: 100%;
  }

  .release-title {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
}

/* Страница релиза */
.release-full {
  margin-top: 2rem;
}

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

.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-second);
  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: 2rem;
}

.release-description {
  margin-top: 1rem;
  line-height: 1.8;
  color: var(--text-second);
}

.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;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.season-year {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-second);
  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-second);
}

.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;
}

/* Адаптивность для страницы релиза */
@media (max-width: 768px) {
  .release-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .release-poster-large {
    max-width: 250px;
    margin: 0 auto;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    font-size: 24px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    font-size: 28px;
  }

  .release-rating-item {
    gap: 0.25rem;
  }

  .rating-pandas {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Утилиты */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Страница входа */
.container.login-container {
  max-width: 500px;
  margin: 3rem auto;
}

.login-form-container h1 {
  text-align: center;
  margin-bottom: 2rem;
}

.login-form-container .alert-error {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--error-bg, #fee);
  border: 1px solid var(--error-border, #fcc);
  border-radius: 4px;
  color: var(--error-text, #c33);
}

.login-form-container form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form-container .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.login-form-container .form-group input[type="text"],
.login-form-container .form-group input[type="email"],
.login-form-container .form-group input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 4px;
  font-size: 16px;
}

.login-form-container button[type="submit"] {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: var(--link);
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form-container button[type="submit"]:hover {
  background: var(--link-2);
}

/* Страница профиля */
main.profile-main {
  padding: 2rem 0;
  max-width: 900px;
  margin: 0 auto;
}

.profile-container {
  padding: 0 1rem;
}

.profile-container h1 {
  margin-bottom: 2rem;
  color: var(--text);
}

.profile-container .alert-error {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(171, 73, 73, 0.2);
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--red);
}

.profile-container .alert-error ul {
  margin: 0;
  padding-left: 1.5rem;
}

.profile-container .alert-success {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(73, 171, 90, 0.2);
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green);
}

.profile-card-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.profile-card {
  background-color: var(--bg-second);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border: 1px solid var(--bg-second);
}

.profile-avatar-section {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.profile-avatar-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-second);
}

.profile-avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--link) 0%, var(--link-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--text);
  font-weight: bold;
  border: 3px solid var(--bg-second);
}

.profile-status-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--bg-second);
}

.profile-status-indicator.online {
  background-color: var(--green);
}

.profile-status-indicator.offline {
  background-color: var(--text-second);
}

.profile-status-badge {
  margin-top: 1rem;
}

.profile-status-badge span {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text);
}

.profile-status-badge span.online {
  background-color: var(--green);
}

.profile-status-badge span.offline {
  background-color: var(--text-second);
}

.profile-info {
  text-align: left;
}

.profile-info-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bg-second);
}

.profile-info-item:last-child {
  margin-bottom: 1.5rem;
  border-bottom: none;
}

.profile-info-item strong {
  color: var(--text-second);
  display: block;
  margin-bottom: 0.25rem;
}

.profile-info-item span {
  font-size: 1.1rem;
  color: var(--text);
}

.profile-roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-role {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-role.profile-role-admin {
  background-color: rgba(151, 71, 255, 0.2);
  color: var(--link);
}

.profile-role.profile-role-user {
  background-color: rgba(104, 114, 124, 0.2);
  color: var(--text-second);
}

.profile-role.profile-role-voice_actor {
  background-color: rgba(73, 171, 255, 0.2);
  color: #4BA5FF;
}

.profile-role.profile-role-timer {
  background-color: rgba(255, 171, 73, 0.2);
  color: #FFA049;
}

.profile-role.profile-role-translator {
  background-color: rgba(171, 255, 73, 0.2);
  color: #ABFF49;
}

.profile-actions {
  text-align: center;
}

.profile-edit-btn {
  padding: 0.75rem 2rem;
  background-color: var(--link);
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.profile-edit-btn:hover {
  opacity: 0.9;
}

/* Модальное окно редактирования профиля */
.edit-profile-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
}

.edit-profile-modal.active {
  display: block;
}

.edit-profile-modal-content {
  position: relative;
  max-width: 600px;
  margin: 2rem auto;
  background-color: var(--bg-second);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-second);
}

.edit-profile-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-second);
  padding: 0.5rem;
  line-height: 1;
  transition: var(--transition);
}

.edit-profile-modal-close:hover {
  color: var(--text);
}

.edit-profile-modal h2 {
  margin-bottom: 1.5rem;
  margin-top: 0;
  color: var(--text);
}

.edit-profile-modal form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edit-profile-modal .form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.edit-profile-modal .form-field input[type="file"],
.edit-profile-modal .form-field input[type="email"],
.edit-profile-modal .form-field input[type="password"] {
  padding: 0.75rem 1rem;
  min-height: 44px;
  border: 1px solid var(--bg-second);
  border-radius: 4px;
  width: 100%;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
}

.edit-profile-modal .form-field input[type="file"] {
  padding: 0.5rem;
}

.edit-profile-modal .form-field small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-second);
}

.edit-profile-modal .password-section {
  border-top: 1px solid var(--bg-second);
  padding-top: 1.5rem;
}

.edit-profile-modal .password-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text);
}

.edit-profile-modal .password-field {
  margin-bottom: 1rem;
}

.edit-profile-modal .password-field:last-child {
  margin-bottom: 0;
}

.edit-profile-modal .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.edit-profile-modal .btn-submit {
  padding: 0.75rem 2rem;
  background-color: var(--link);
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.edit-profile-modal .btn-submit:hover {
  opacity: 0.9;
}

.edit-profile-modal .btn-cancel {
  padding: 0.75rem 2rem;
  background-color: var(--bg-second);
  color: var(--text);
  border: 1px solid var(--bg-second);
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.edit-profile-modal .btn-cancel:hover {
  background-color: var(--bg);
}

/* Адаптивность: профиль, логин, модалка */
@media (max-width: 768px) {
  .container.login-container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  .profile-avatar-img,
  .profile-avatar-placeholder {
    width: 150px;
    height: 150px;
  }

  .profile-card {
    padding: 1.5rem;
  }

  .profile-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }

  .profile-tabs::-webkit-scrollbar {
    height: 4px;
  }

  .profile-tab {
    flex-shrink: 0;
  }

  .edit-profile-modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }

  .edit-profile-modal-close {
    min-width: 44px;
    min-height: 44px;
  }

  .edit-profile-modal .btn-submit,
  .edit-profile-modal .btn-cancel {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .profile-avatar-img,
  .profile-avatar-placeholder {
    width: 120px;
    height: 120px;
  }

  .profile-avatar-placeholder {
    font-size: 2.5rem;
  }
}

/* Каталог */
.catalog-main .container {
  margin-top: 2rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.catalog-filters h3 {
  margin-bottom: 1rem;
  margin-right: auto;
  font-size: 1.1rem;
  font-weight: 600;
}

.filter-group {
  margin-bottom: 0.75rem;
}

.filter-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

.filter-group:first-of-type label {
  margin-top: 0;
}

.filter-group .search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
}

.filter-group .filter-category-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.filter-select {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg-second);
  color: var(--text);
  border: 1px solid var(--text-second);
  border-radius: 8px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  background: var(--bg-second);
  border-radius: 12px;
  font-size: 0.85rem;
}

.tag-checkbox-label .tag-count {
  color: var(--text-second);
  font-size: 0.75rem;
}

.btn-reset {
  width: 100%;
  padding: 0.6rem;
  background: var(--link);
  color: var(--text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.btn-reset:hover {
  opacity: 0.9;
}

.catalog-results {
  /* Results area styles */
}

.catalog-sort-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.catalog-sort-controls label {
  color: var(--text);
}

.catalog-results-count {
  color: var(--text-second);
}

#pagination {
  margin-top: 2rem;
  text-align: center;
}

/* Главная страница - контейнеры */
.section-container {
  text-align: center;
  display: flex;
  width: auto;
  height: min-content;
  flex-direction: column;
  gap: var(--border-24);
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto 2em auto;
  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;
}

/* Лайтбокс скрыт по умолчанию */
.lightbox {
  display: none;
}

.lightbox.active {
  display: flex !important;
}

/* Кнопка "Применить" в фильтрах */
.btn-apply-filters {
  width: 100%;
  padding: 0.6rem;
  background: var(--link);
  color: var(--text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.btn-apply-filters:hover {
  opacity: 0.9;
}

/* Мобильный toggle для фильтров - скрыт на десктопе */
.catalog-filters-toggle {
  display: none;
}

.catalog-filters-content {
  display: block;
}

/* Адаптивность для каталога */
@media (max-width: 768px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  
  .catalog-filters {
    order: 2;
  }
  
  .catalog-results {
    order: 1;
  }

  .catalog-filters-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    min-height: 44px;
    background: var(--bg-second);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 0;
  }

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

  .catalog-filters-toggle[aria-expanded="true"] .catalog-filters-toggle-icon {
    transform: rotate(180deg);
  }

  .catalog-filters-content {
    display: none;
    padding-top: 1rem;
  }

  .catalog-filters-content.expanded {
    display: block;
  }

  .catalog-sort-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Страница 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;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.catalog-pagination button {
  padding: 0.5rem 1rem;
  background: var(--bg-second);
  color: var(--text);
  border: 1px solid var(--text-second);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.catalog-pagination button:hover:not(:disabled) {
  background: var(--link);
  border-color: var(--link);
}

.catalog-pagination button:disabled {
  background: var(--link);
  cursor: not-allowed;
}

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

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

/* 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);
  font-weight: 500;
}

/* Теги (chips) для множественного выбора - как в админке */
.ts-wrapper.filter-select.multi .ts-control [data-value] {
  background: var(--link) !important;
  color: white !important;
  border-radius: 4px !important;
  padding: 0.25rem 0.5rem !important;
  margin: 0.15rem 0.15rem 0.15rem 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  font-size: 0.8rem !important;
  border: none !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  box-shadow: 0 1px 3px rgba(151, 71, 255, 0.3) !important;
  transition: all 0.2s ease !important;
  line-height: 1.2 !important;
}

.ts-wrapper.filter-select.multi .ts-control [data-value]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(151, 71, 255, 0.4) !important;
}

.ts-wrapper.filter-select.multi .ts-control [data-value] .item {
  color: white !important;
}

.ts-wrapper.filter-select.multi .ts-control [data-value] .remove {
  color: white !important;
  border-left: 1px solid rgba(255, 255, 255, 0.25) !important;
  padding-left: 0.4rem !important;
  margin-left: 0.4rem !important;
  cursor: pointer !important;
  opacity: 0.9 !important;
  transition: opacity 0.2s, background-color 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 18px !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
}

.ts-wrapper.filter-select.multi .ts-control [data-value] .remove:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 4px !important;
}

/* Для множественного выбора - все элементы в одной строке */
.ts-wrapper.filter-select.multi .ts-control {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.25rem !important;
  padding: 0.4rem 0.6rem !important;
  min-height: 38px !important;
  flex-direction: row !important;
  align-content: center !important;
}

.ts-wrapper.filter-select.multi:not(.has-items) .ts-control {
  padding: 0.5rem 0.75rem !important;
}

.ts-wrapper.filter-select.multi.has-items .ts-control {
  padding: 0.4rem 0.6rem !important;
}

/* Теги не должны сжиматься */
.ts-wrapper.filter-select.multi .ts-control [data-value] {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
}

.ts-wrapper.filter-select.multi .ts-control input,
.ts-wrapper.filter-select.multi .ts-control .ts-control-input {
  color: var(--text) !important;
  background: transparent !important;
  margin: 0 !important;
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 120px !important;
  max-width: none !important;
  display: inline-block !important;
  height: auto !important;
  line-height: 1.4 !important;
  vertical-align: middle !important;
  padding: 0.2rem 0.4rem !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  align-self: center !important;
  flex-shrink: 1 !important;
  flex-grow: 0 !important;
  flex-basis: auto !important;
  font-size: 0.85rem !important;
}

/* Убираем ограничение размера от атрибута size */
.ts-wrapper.filter-select.multi .ts-control input[size] {
  width: auto !important;
  min-width: 120px !important;
}

/* Когда есть элементы, input должен быть на том же уровне */
.ts-wrapper.filter-select.multi.has-items .ts-control input {
  flex: 0 1 auto !important;
  min-width: 120px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  align-self: center !important;
}

/* Скрываем плейсхолдер если есть выбранные элементы - has-items на ts-wrapper */
.ts-wrapper.filter-select.multi.has-items .ts-control input[placeholder]::placeholder,
.ts-wrapper.filter-select.multi.has-items .ts-control input::placeholder {
  opacity: 0 !important;
  color: transparent !important;
  pointer-events: none !important;
  visibility: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Альтернативный способ - скрыть placeholder через атрибут */
.ts-wrapper.filter-select.multi.has-items .ts-control input[placeholder] {
  text-indent: 0 !important;
}

/* Убираем placeholder полностью когда есть элементы */
.ts-wrapper.filter-select.multi.has-items .ts-control input::placeholder {
  content: '' !important;
  display: none !important;
}

/* noUiSlider кастомные стили - упрощенный дизайн */
#filter-year-slider {
  margin: 10px 0;
  height: 6px;
}

.noUi-target {
  background: var(--bg-second);
  border: none;
  border-radius: 3px;
  box-shadow: none;
}

.noUi-connects {
  background: var(--text-second);
  border-radius: 3px;
}

.noUi-connect {
  background: var(--link);
  border-radius: 3px;
}

.noUi-handle {
  width: 14px;
  height: 14px;
  right: -7px;
  top: -4px;
  background: var(--link);
  border: 2px solid var(--bg-second);
  border-radius: 50% !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.noUi-handle::before,
.noUi-handle::after {
  display: none !important;
}

.noUi-handle:before,
.noUi-handle:after {
  display: none !important;
}

.noUi-handle.noUi-handle-lower,
.noUi-handle.noUi-handle-upper {
  width: 14px;
  height: 14px;
  right: -7px;
  top: -4px;
  border-radius: 50% !important;
}

.noUi-handle:hover {
  background: var(--link-2);
}

.noUi-handle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(151, 71, 255, 0.2);
}

.noUi-target {
  touch-action: none;
}

.noUi-tooltip {
  background: var(--link);
  color: white;
  border: none;
  border-radius: 3px;
  padding: 3px 6px;
  font-size: 0.75rem;
}

/* Светлая тема — общие переопределения для компонентов */
:root.light .ts-wrapper.filter-select .ts-control,
:root.light .ts-wrapper.filter-select .ts-dropdown,
:root.light .noUi-target {
  background: var(--bg-second);
  border-color: var(--text-second);
}

/* ========================================
   Модальное окно поиска
   ======================================== */

/* Overlay (затемнение фона) */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  z-index: 999;
}

.search-modal[aria-hidden="false"] .search-modal-overlay {
  opacity: 1;
}

/* Контейнер модального окна */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.search-modal[aria-hidden="false"] {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Контент модального окна */
.search-modal-content {
  position: relative;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: calc(100% - 2rem);
  margin: 0.25rem;
  padding: 0.5rem;
  max-height: calc(100vh - 0.5rem);
  overflow-y: auto;
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.2s ease-in-out;
  z-index: 1001;
  pointer-events: auto;
}

@media (min-width: 640px) {
  .search-modal-content {
    max-width: 42rem;
    margin: 1rem;
  }
}

@media (min-width: 768px) {
  .search-modal-content {
    margin-top: 1rem;
  }
}

.search-modal[aria-hidden="false"] .search-modal-content {
  transform: scale(1) translateY(0);
}

/* Заголовок (скрытый для accessibility) */
.search-modal-title.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Обертка поля ввода */
.search-modal-input-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.search-modal-input-container {
  background: var(--bg-second);
  border: 1px solid rgba(245, 245, 245, 0.2);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem;
  height: 3rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.search-modal-input-container:focus-within {
  border-color: var(--link);
  outline: none;
}

.search-modal-icon {
  width: 20px;
  height: 20px;
  margin-left: 0.5rem;
  color: var(--text-second);
  flex-shrink: 0;
}

.search-modal-input {
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.search-modal-input::placeholder {
  color: var(--text-second);
}

.search-modal-clear {
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  color: var(--text-second);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: background-color 0.2s;
}

.search-modal-clear:hover {
  background: var(--bg-second);
}

.search-modal-clear svg {
  width: 16px;
  height: 16px;
}

.search-modal-close {
  width: 3rem;
  height: 3rem;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  background: var(--bg-second);
  border: none;
  border-radius: 9999px;
  color: var(--text-second);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.search-modal-close:hover {
  background: rgba(151, 71, 255, 0.1);
}

.search-modal-close svg {
  width: 20px;
  height: 20px;
}

/* История поиска */
.search-modal-history {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 6px;
}

.search-modal-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border-radius: 9999px;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  max-width: 100%;
  border: none;
  text-align: left;
}

.search-modal-history-item:hover {
  background: var(--bg-second);
}

.search-modal-history-item-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.search-modal-history-item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-second);
}

.search-modal-history-item-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-modal-history-item-delete {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  aspect-ratio: 1;
  background: transparent;
  border: none;
  border-radius: 9999px;
  color: var(--text-second);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.search-modal-history-item-delete:hover {
  background: rgba(151, 71, 255, 0.2);
  color: var(--link);
}

.search-modal-history-item-delete svg {
  width: 14px;
  height: 14px;
}

/* Рекомендации */
.search-modal-recommendations {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
}

.search-modal-recommendations-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-left: 0.25rem;
  margin-bottom: 0;
}

.search-modal-recommendations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .search-modal-recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.search-modal-recommendation-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(245, 245, 245, 0.2);
  background: var(--bg-second);
  padding: 0.5rem;
  transition: border-color 0.2s, background-color 0.2s;
  text-decoration: none;
}

@media (min-width: 768px) {
  .search-modal-recommendation-item {
    flex-direction: row;
  }
}

.search-modal-recommendation-item:hover {
  border-color: var(--link);
  background: rgba(151, 71, 255, 0.05);
}

.search-modal-recommendation-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.search-modal-recommendation-item-poster {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 4px;
  width: 3rem;
  user-select: none;
}

@media (min-width: 768px) {
  .search-modal-recommendation-item-poster {
    width: 2.5rem;
  }
}

.search-modal-recommendation-item-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.search-modal-recommendation-item-info {
  flex: 1;
  min-width: 0;
}

.search-modal-recommendation-item-category {
  font-size: 0.75rem;
  color: var(--text-second);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1rem;
}

.search-modal-recommendation-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Табы */
.search-modal-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  background: var(--bg-second);
  border-radius: 9999px;
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.search-modal-tabs::-webkit-scrollbar {
  display: none;
}

.search-modal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 1rem;
  min-height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.search-modal-tab:hover {
  background: var(--bg);
}

.search-modal-tab.active {
  background: var(--link);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.search-modal-tab.active:hover {
  opacity: 0.85;
}

.search-modal-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Результаты поиска */
.search-modal-results-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  min-height: 40vh;
}

.search-modal-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .search-modal-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.search-modal-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(245, 245, 245, 0.2);
  background: var(--bg-second);
  padding: 0.5rem;
  transition: border-color 0.2s, background-color 0.2s;
  text-decoration: none;
}

@media (min-width: 768px) {
  .search-modal-result-item {
    flex-direction: row;
  }
}

.search-modal-result-item:hover {
  border-color: var(--link);
  background: rgba(151, 71, 255, 0.05);
}

.search-modal-result-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.search-modal-result-item-poster {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 4px;
  width: 3rem;
  user-select: none;
}

/* Круглые аватары для пользователей */
.search-modal-result-item[href*="profile.php"] .search-modal-result-item-poster {
  aspect-ratio: 1/1;
  border-radius: 50%;
}

@media (min-width: 768px) {
  .search-modal-result-item-poster {
    width: 2.5rem;
  }
}

.search-modal-result-item-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-modal-result-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--link);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 50%;
}

.search-modal-result-item-info {
  flex: 1;
  min-width: 0;
}

.search-modal-result-item-category {
  font-size: 0.75rem;
  color: var(--text-second);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-modal-result-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* Empty state */
.search-modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem;
  min-height: 40vh;
  border-radius: 6px;
  grid-column: 1 / -1;
}

.search-modal-empty-icon {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-modal-empty-icon svg {
  opacity: 0.8;
}

.search-modal-empty-icon svg circle[fill="white"] {
  fill: var(--text-second);
  opacity: 0.3;
}

.search-modal-empty-icon svg circle[fill="black"],
.search-modal-empty-icon svg ellipse[fill="black"],
.search-modal-empty-icon svg path[stroke="black"] {
  fill: var(--text-second);
  stroke: var(--text-second);
  opacity: 0.7;
}

.search-modal-empty-icon svg circle[fill="white"][cx="85"],
.search-modal-empty-icon svg circle[fill="white"][cx="125"] {
  fill: var(--bg);
  opacity: 1;
}

.search-modal-empty-icon img {
  opacity: 0.5;
  filter: grayscale(0.3);
}

.search-modal-empty-text {
  font-size: 0.875rem;
  text-align: center;
  color: var(--text-second);
}

/* Кнопка "Больше" */
.search-modal-more {
  display: flex;
  justify-content: flex-end;
  padding: 0.25rem;
  margin-top: 0.25rem;
}

.search-modal-more-button {
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  min-height: 2.25rem;
  font-size: 0.875rem;
  background: var(--bg-second);
  color: var(--text-second);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
  margin: 0 0.5rem;
}

.search-modal-more-button:hover {
  background: rgba(151, 71, 255, 0.1);
}

/* Стили для закладок */
.release-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.release-title-row h1 {
  flex: 1;
  margin: 0;
}

.bookmark-container {
  position: relative;
}

.bookmark-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-second);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  color: var(--text-second);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.bookmark-btn:hover {
  background: var(--bg-hover, rgba(151, 71, 255, 0.1));
  border-color: var(--link);
  color: var(--link);
}

.bookmark-btn.bookmarked {
  background: rgba(151, 71, 255, 0.15);
  border-color: var(--link);
  color: var(--link);
}

.bookmark-btn.bookmarked.watching {
  background: rgba(75, 165, 255, 0.15);
  border-color: #4BA5FF;
  color: #4BA5FF;
}

.bookmark-btn.bookmarked.watched {
  background: rgba(76, 175, 80, 0.15);
  border-color: #4CAF50;
  color: #4CAF50;
}

.bookmark-btn.bookmarked.plan-to-watch {
  background: rgba(151, 71, 255, 0.15);
  border-color: var(--link);
  color: var(--link);
}

.bookmark-btn.bookmarked.dropped {
  background: rgba(171, 73, 73, 0.15);
  border-color: var(--red);
  color: var(--red);
}

.bookmark-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.bookmark-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-second);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

.bookmark-menu.active {
  display: flex;
}

.bookmark-menu-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-second);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.875rem;
}

.bookmark-menu-item:hover {
  background: var(--bg-hover, rgba(151, 71, 255, 0.1));
  color: var(--text);
}

.bookmark-menu-item.active {
  background: rgba(151, 71, 255, 0.2);
  color: var(--link);
  font-weight: 600;
}

.bookmark-menu-item.bookmark-remove {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--red);
}

.bookmark-menu-item.bookmark-remove:hover {
  background: rgba(171, 73, 73, 0.15);
  color: var(--red);
}

@media (max-width: 768px) {
  .release-title-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .bookmark-container {
    width: 100%;
  }
  
  .bookmark-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  
  .bookmark-menu {
    right: auto;
    left: 0;
    width: 100%;
  }
}

/* Вкладки профиля */
.profile-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.profile-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-second);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-bottom: -2px;
}

.profile-tab:hover {
  color: var(--text);
  background: var(--bg-second);
}

.profile-tab.active {
  color: var(--link);
  border-bottom-color: var(--link);
  background: transparent;
}

.profile-tab-content {
  display: none;
}

.profile-tab-content.active {
  display: block;
}

/* Стили для секции закладок в профиле */
.profile-bookmarks-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.profile-bookmarks-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.bookmarks-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.bookmark-filter {
  padding: 0.5rem 1.25rem;
  background: var(--bg-second);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
  display: inline-block;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  color: var(--text-second);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.bookmark-filter:hover {
  background: var(--bg-hover, rgba(151, 71, 255, 0.1));
  border-color: var(--link);
  color: var(--link);
}

.bookmark-filter.active {
  background: rgba(151, 71, 255, 0.2);
  border-color: var(--link);
  color: var(--link);
  font-weight: 600;
}

.bookmarks-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-second);
}

.bookmarks-loading p {
  margin: 0;
  font-size: 1rem;
}

.bookmarks-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-second);
}

.bookmarks-empty p {
  margin-bottom: 1rem;
}

.bookmarks-empty a {
  color: var(--link);
  text-decoration: none;
}

.bookmarks-empty a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .bookmarks-filters {
    gap: 0.5rem;
  }
  
  .bookmark-filter {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
}

/* ========================================
   Страница "О нас"
   ======================================== */

.about-section {
  padding: 2rem 0;
}

.about-content {
  margin-top: 2rem;
}

.about-description h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-description p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: var(--text-second);
}

.about-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.about-social .social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-second);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-second);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  width: auto;
}

.about-social .social-link:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.about-social .social-link svg {
  flex-shrink: 0;
}

.team-section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.team-section h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.team-role-group {
  margin-bottom: 2.5rem;
}

.team-role-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

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

.team-member {
  padding: 1rem;
  background: var(--bg-second);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.team-member:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.team-member-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.team-member-link:hover {
  color: var(--link);
}

.team-member-link svg {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.team-member-link:hover svg {
  opacity: 1;
}

.team-member-name {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 768px) {
  .team-members {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .about-social {
    flex-direction: column;
  }
  
  .about-social .social-link {
    width: 100%;
    justify-content: center;
  }
}

