@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');


* {

  margin: 0;
  padding: 0;
  box-sizing: border-box;

}

body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0a;
  color: white;

}

.glass-nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 40;
  padding: 1rem 1.5rem;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

/* Logo */
.nav-logo img {
  width: 40px;
}

.nav-logo span {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 0.875rem;
  position: relative;
  color: #9ca3af;
}

.nav-link .new-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

/* Бейдж уровня геймификации рядом с именем в шапке (см. gamHeaderBadge()
   в templates/header.php) — небольшой контрастный чип, не перетягивающий
   внимание с самого имени, но заметный на любом фоне карточки/шапки.
   Цвет/фон/рамка заданы инлайн (меняются по диапазону уровня, см.
   LEVEL_BADGES в app/gamification.php) — здесь только форма. */
.gam-header-badge {
  height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.55rem;
  font-weight: 700;
  border-style: solid;
  border-width: 1px;
  border-radius: 6px;
  margin-right: 0.2rem;
  vertical-align: middle;
  justify-content: center;
  width: 20px;
}

.nav-link-active {
  background: rgba(59, 130, 246, 0.3);
  color: white;
}

.movie-card {
  /* Раньше карточка (0.2s ease), .movie-card-inner (all 0.3s) и
     .movie-poster img (0.5s, линейно, без easing) двигались на одном hover
     тремя разными таймингами — из-за рассинхронизации эффект ощущался как
     резкий рывок вместо плавного увеличения. Синхронизировано на 0.25s с
     одним и тем же easing everywhere ниже. */
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  color: inherit;
  display: block;
  height: fit-content;
  border-radius: 0.75rem;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 40px -12px rgba(0, 0, 0, 0.2);
}

.movie-card-inner {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s cubic-bezier(.4,0,.2,1);
  position: relative;
}

.movie-card:hover .movie-card-inner {
  border-color: rgba(59, 130, 246, 0.3);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2/3;
  background: #1f2937;
  overflow: hidden;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}

.movie-card:hover .movie-poster img {
  transform: scale(1.05);
}

.movie-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  z-index: 40;
  padding: 1rem;
}

.movie-card:hover .movie-overlay {
  opacity: 1;
}

.watch-badge {
  background: #3b82f6;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.rating-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  /* backdrop-filter: blur() убран — на страницах с сеткой из десятков
     карточек (movies.php, index.php) каждый такой бейдж заставляет GPU
     пересчитывать блюр фона на КАЖДЫЙ кадр скролла (позиция элемента
     относительно viewport постоянно меняется), что ощутимо грузит GPU и
     ноутбук греется при простом скролле ленты. На бейдже 24-32px разница
     визуально незаметна — просто чуть более тёмный сплошной фон вместо blur. */
  background: rgba(0, 0, 0, 0.55);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 40;
}

/* Обёртка для пары бейджей КП+IMDb в карточке фильма (renderMovieCard) —
   сама позиционируется в углу постера как раньше позиционировался одиночный
   .rating-badge, а бейджи внутри идут в потоке flex (слева КП, справа IMDb),
   не наследуя каждый свой absolute. Одиночные .rating-badge вне этой обёртки
   (watchlist.php, templates/movie-card.php и т.д.) не затронуты. */
.rating-badges {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.375rem;
  z-index: 40;
}

.rating-badges .rating-badge {
  position: static;
  top: auto;
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.0625rem;
  padding: 0.25rem 0.4rem;
  font-size: 0.7rem;
  line-height: 1.1;
}

.rating-badge-source {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.75;
  line-height: 1;
}

.rating-badge--imdb {
  opacity: 0.92;
}

.movie-info {
  padding: 1rem;
}

.movie-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  transition: color 0.2s;
}

.movie-card:hover .movie-title {
  color: #60a5fa;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.65rem;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #9ca3af;
}

.movie-year {
  background: rgba(255, 255, 255, 0.05) !important;
}

.movie-genre {
  background: rgba(255, 255, 255, 0.05) !important;
}

.movie-duration {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
}

.movie-country {
  background: rgba(59, 130, 246, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.movie-description {
  color: #6b7280;
  font-size: 0.7rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.5rem;
}

.watch-button {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
  text-decoration: none;
}

.watch-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-2px);
}

.genre-tag {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.genre-tag:hover {
  background: rgba(255, 255, 255, 0.12);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem;
  backdrop-filter: blur(4px);
}

.login-container {
  min-height: 100vh;
  width: 100%;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.login-card {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(24px);
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 28rem;
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: white;
}

.login-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.login-button {
  width: 100%;
  background: #3b82f6;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.2s;
  color: white;
  border: none;
  cursor: pointer;
}

.login-button:hover {
  background: #2563eb;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: white;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

.search-button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: #3b82f6;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  color: white;
}

.search-button:hover {
  background: #2563eb;
}

@keyframes fadeIn {

  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

::-webkit-scrollbar {
  width: 4px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #3b82f6;
}

::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}


/* ========== PLAYER INFO BAR ========== */
.player-info-bar {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(15, 25, 35, 0.8));
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.player-info-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.player-info-year {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    color: #9ca3af;
}

.player-info-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 9999px;
}

.player-info-rating i {
    font-size: 0.7rem;
}

.player-info-rating-text {
    font-weight: 400;
    opacity: 0.8;
}

.player-info-kp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    color: #60a5fa;
    transition: all 0.2s ease;
    text-decoration: none;
}

.player-info-kp-link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    transform: translateY(-1px);
}

/* Шедевр (9.0-10.0) - золотой */
.rating-masterpiece,
.rating-masterpiece-legend {
  background: linear-gradient(135deg, #fef08a 0%, #eab308 100%);
  color: #1a1a1a;
  text-shadow: none;
}

/* Отлично (8.0-8.9) - насыщенный зелёный */
.rating-excellent {
  color: #fff;
  border: 2px solid #00ff1d;
}

/* Хорошо (7.0-7.9) - светло-зелёный */
.rating-good {
  border: 2px solid #66dc22;
  color: #fff;
}

/* Норм (6.0-6.9) - жёлто-зелёный */
.rating-fine {
  border: 2px solid #a3e635;
  color: #fff;
}

/* Средняк (5.0-5.9) - жёлтый */
.rating-okay {
  border: 2px solid #ca8a04;
  color: #fff;
}

/* Так себе (4.0-4.9) - оранжевый */
.rating-meh {
  border: 2px solid #ff7300;
  color: white;
}

/* Плохо (3.0-3.9) - оранжево-красный */
.rating-bad {
  border: 2px solid #ff6c17;
  color: white;
}

/* Ужасно (2.0-2.9) - красный */
.rating-terrible {
  border: 2px solid #f84023;
  color: white;
}

/* Дно (1.0-1.9) - тёмно-красный */
.rating-shit {
  border: 2px solid #ff0000;
  color: white;
}

/* Абсолютное дно (0.0-0.9) - почти чёрный с красной каймой */
.rating-ultimate-shit {
  color: #fff;
  border: 2px solid #900000;
}

.rating-default {
  border: 2px solid #3b82f6;
  color: white;
}

.rating-badge-large {
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  font-weight: bold;
  font-size: 1.125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  max-height: 50px;
  animation: ratingGlow 2s ease infinite;
}

.rating-badge-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

a.rating-badge-large {
  cursor: pointer;
}

.detail-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-top: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.film-facts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.film-fact-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.film-fact-row:last-child {
  border-bottom: none;
}

.film-fact-label {
  flex-shrink: 0;
  width: 140px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.film-fact-value {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.detail-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 10px;
  color: white;
}
#studiosList {
    margin-top: 0.75rem;
}

.studios-section-title {
  justify-content: space-between;
}
.studios-toggle-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #9ca3af;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.2s;
}
.studios-toggle-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #e5e7eb;
}
.studios-toggle-btn.collapsed i {
  transform: rotate(180deg);
}
.studios-toggle-btn i {
  transition: transform 0.2s;
}

.reviews-section {
  margin-top: 3rem;
}

/* ЗВЕЗДЫ ДЛЯ ОТЗЫВОВ С ПОЛОВИНКАМИ */
.rating-stars-input {
  user-select: none;
  display: flex;
  gap: 0.25rem;
  cursor: pointer;
  direction: ltr;
  position: relative;
}

.star-rating {
  font-size: 2rem;
  transition: all 0.1s;
  color: #4b5563;
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.star-rating.active {
  color: #fbbf24;
}

.star-rating .half-star {
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #fbbf24;
  font-size: 2rem;
}

.star-rating.half {
  position: relative;
}

.star-rating.half::before {
  content: '★';
  position: absolute;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: #fbbf24;
}

/* Отображение текущего значения */
.rating-value-display {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #fbbf24;
  font-weight: 600;
}



/* ===== КНОПКА ОТПРАВКИ ОТЗЫВА ===== */
.submit-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-decoration: none;
}


.submit-review-btn:hover {
  transform: translateY(-2px);
}

.submit-review-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Отключаем анимацию для мгновенного отображения */
.chat-panel.no-transition {
  transition: none !important;
  transform: translateX(0) !important;
}

/* ===== КАРТОЧКА ОТЗЫВА ===== */
.review-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.review-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-author-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.review-author-name {
  font-weight: 600;
  color: white;
}

.review-author-login {
  font-size: 0.7rem;
  color: #6b7280;
}

a.review-author-namelink {
  display: block;
  text-decoration: none;
  transition: color 0.15s;
}
a.review-author-namelink.review-author-name:hover {
  color: #818cf8;
}
a.review-author-namelink.review-author-login:hover {
  color: #a5b4fc;
}

.review-rating-stars {
  display: flex;
  gap: 0.125rem;
  margin-bottom: 0.25rem;
}

.review-star {
  font-size: 0.9rem;
  color: #fbbf24;
}

.review-date {
  font-size: 0.7rem;
  color: #6b7280;
  text-align: right;
}

.review-text-wrapper {
  position: relative;
}

.review-text {
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.8;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ===== Прикрепление картинок к рецензии (форма ввода) ===== */
.review-attach-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.review-attach-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.review-attach-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.review-attach-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== Спойлер в тексте рецензии (как в Telegram) ===== */
.review-spoiler-inline {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.25rem;
  padding: 0 0.15rem;
}

.review-spoiler {
  cursor: pointer;
  border-radius: 0.3rem;
  padding: 0 0.2rem;
  filter: blur(5px);
  background: rgba(255, 255, 255, 0.1);
  transition: filter 0.15s;
  user-select: none;
}

.review-spoiler:hover {
  filter: blur(4px);
}

.review-spoiler.revealed {
  filter: none;
  cursor: text;
  background: transparent;
  user-select: text;
}

.review-attach-hint {
  font-size: 0.72rem;
  color: #6b7280;
}

.review-attach-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.review-attach-previews:empty {
  margin-top: 0;
}

.review-attach-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.review-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-attach-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 0.65rem;
  cursor: pointer;
}

.review-attach-remove:hover {
  background: rgba(239, 68, 68, 0.85);
}

/* ===== Картинки в опубликованной рецензии (карточка списка) ===== */
.review-images-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.6rem;
  max-width: 360px;
}

.review-images-grid--1 {
  grid-template-columns: minmax(0, 160px);
}

.review-images-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 240px;
}

.review-images-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 320px;
}

.review-image-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
}

.review-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.15s;
}

.review-image-thumb:hover img {
  transform: scale(1.05);
}

/* ===== Лайтбокс просмотра картинки рецензии ===== */
.review-image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.review-image-lightbox.open {
  display: flex;
}

.review-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

.review-lightbox-close,
.review-lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.review-lightbox-close:hover,
.review-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.review-lightbox-close {
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
}

.review-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.2rem;
}

.review-lightbox-prev {
  left: 20px;
}

.review-lightbox-next {
  right: 20px;
}

@media (max-width: 640px) {
  .review-images-grid {
    max-width: 100%;
  }

  .review-lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

.read-more-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
  margin-left: 10px;
}

.read-more-btn:hover {
  color: #60a5fa;
}

.review-footer {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.review-like-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.review-like-btn:hover {
  color: #ef4444;
}

.review-like-btn.liked i {
  color: rgb(239, 68, 68);
}

.review-likes-label {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.4rem;
  padding: 0 0.25rem;
  line-height: 1.5;
}

/* Дублирует .wall-likes-label из profile.php (там локальный <style>) —
   нужен и здесь, глобально, для того же лейбла лайков поста стены в
   ленте активности (app/activity.php). */
.wall-likes-label {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.likes-label-name {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.likes-label-name:hover {
  color: #e5e7eb;
}

.likes-label-more {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  transition: color 0.15s;
}

.likes-label-more:hover {
  color: #9ca3af;
}

.likers-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.likers-modal {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  width: 100%;
  max-width: 360px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.likers-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.likers-modal-header button {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}

.likers-modal-header button:hover {
  color: #e5e7eb;
}

.likers-modal-body {
  overflow-y: auto;
  padding: 0.5rem 0;
}

.likers-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  transition: background 0.15s;
}

.likers-modal-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.likers-modal-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.likers-modal-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e5e7eb;
}

.likers-modal-login {
  font-size: 0.72rem;
  color: #6b7280;
}

.review-edit-btn {
  background: none;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.review-edit-btn:hover {
  color: #60a5fa;
}

.review-edited-badge {
  font-size: 0.6rem;
  color: #6b7280;
  font-style: italic;
}

.history-section {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.history-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clear-history-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
}

.clear-history-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

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

.history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.history-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateX(4px);
}

.history-poster {
  width: 50px;
  height: 75px;
  object-fit: cover;
  border-radius: 0.375rem;
  background: #1f2937;
  flex-shrink: 0;
}

.history-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-title-text {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.remove-history {
  color: #ef4444;
  text-decoration: none;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.history-item:hover .remove-history {
  opacity: 1;
}

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

.search-tag {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  text-decoration: none;
  color: #60a5fa;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.search-tag:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.remove-search {
  color: #ef4444;
  text-decoration: none;
  font-size: 0.875rem;
  cursor: pointer;
}

.empty-history {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.top-header {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.top-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: black;
  font-weight: bold;
  font-size: 0.7rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  z-index: 40;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.collections-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  overflow-y: auto;
}

.collection-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.collection-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.collection-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.shalun-text {
  display: inline-block;
  font-weight: bold;
  background: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shalunRainbow 3s linear infinite;
}

@keyframes shalunRainbow {

  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }

}

.shalun-bg {
  position: relative;
  overflow: hidden;
}

.profile-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #3b82f6;
  background: #1f2937;
}

/* Рамка/тень аватара по роли теперь задаются inline-стилем прямо в profile.php
   (цвет берётся из таблицы roles через getRoleStyle()) — раньше были
   фиксированные классы .profile-avatar.admin/vip/... для 6 захардкоженных
   ролей, что не позволяло админу создавать новые роли или менять их цвет. */


.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--profile-text, #3b82f6);
}

.stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-date {
  font-size: 0.7rem;
  color: #6b7280;
}

.review-film {
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.review-rating {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.collection-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  display: block;
}

.collection-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.edit-profile-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
  color: #93c5fd;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.edit-profile-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.55);
  transform: translateY(-1px);
}

.edit-form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

.form-input.disabled,
.form-input:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: #6b7280;
  cursor: not-allowed;
}

.form-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

.error-message {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.success-message {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #86efac;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-align: center;
  cursor: pointer;
  border: none;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  justify-content: center;
}

.btn-save:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
  display: inline-block;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.password-hint {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

@keyframes slideConfetti {

  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }

}

.trailer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.trailer-modal-container {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: #0a0a0a;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

.trailer-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trailer-modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.trailer-modal-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.75rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.trailer-modal-close:hover {
  color: white;
}

.trailer-modal-body {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.trailer-modal-body iframe,
.trailer-modal-body .trailer-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.rating-shalun {
  background: linear-gradient(135deg, #fff 0%, #fff 100%);
  color: #222;
  box-shadow: 0 0 20px #fff;
}

@keyframes ratingGlow {

  0% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.05);
  }

  100% {
    filter: brightness(1);
  }

}

.player-rating-masterpiece-legend {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: black;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-masterpiece {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: black;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-excellent {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-good {
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-fine {
  background: #a3e635;
  color: black;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-okay {
  background: linear-gradient(135deg, #fef08a 0%, #eab308 100%);
  color: black;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-meh {
  background: linear-gradient(135deg, #6d4b27 0%, #a06235 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-bad {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-terrible {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-shit {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-ultimate-shit {
  background: linear-gradient(135deg, #450a0a 0%, #2c0a0a 100%);
  color: #991b1b;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.player-rating-default {
  background: #3b82f6;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.875rem;
}

.collections-filter::-webkit-scrollbar {
  height: 4px;
}

.collections-filter::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.collections-filter::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 4px;
}

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 60;
}

.burger-btn span {
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger-btn.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

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

.burger-btn.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s;
}

.mobile-nav-link i {
  width: 24px;
  font-size: 1.2rem;
  color: #6b7280;
}

.mobile-nav-link:hover {
  background: rgba(59, 130, 246, 0.2);
  color: white;
}

.mobile-nav-link:hover i {
  color: #3b82f6;
}

.mobile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.random-film-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  /* ← меняем с flex на none */
  align-items: center;
  justify-content: center;
}

.random-film-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}


.random-film-container {
  position: relative;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  transform: translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* На широких экранах модалка шире и фильтры идут в 2 колонки —
   иначе узкая колонка фильтров растягивает окно по высоте без нужды */
@media (min-width: 900px) {
  .random-film-container {
    max-width: 760px;
  }

  .random-film-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
  }

  .random-film-filters-grid .filter-group--full {
    grid-column: 1 / -1;
  }
}

.random-film-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.random-film-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.random-film-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.75rem;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.random-film-close:hover {
  color: white;
}

.random-film-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

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

.filter-group label {
  display: block;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.filter-select,
.filter-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: white;
  font-size: 0.875rem;
}

.year-range {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.year-range input {
  flex: 1;
}

/* Своя длительность (оператор + минуты) — появляется при выборе "Указать своё время" */
.custom-length-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.custom-length-operator {
  flex: 0 0 auto;
  width: auto;
  min-width: 130px;
}

.custom-length-minutes-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.custom-length-minutes {
  width: 100%;
  padding-right: 2.75rem;
}

.custom-length-suffix {
  position: absolute;
  right: 0.75rem;
  color: #6b7280;
  font-size: 0.8rem;
  pointer-events: none;
}

.filter-group--custom-length {
  animation: customLengthFadeIn 0.2s ease;
}

@keyframes customLengthFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.rating-range {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rating-range input {
  flex: 1;
}

.try-luck-btn {
  width: 100%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.try-luck-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.random-film-result {
  margin-top: 1rem;
  text-align: center;
}

/* ===== Анимация поиска случайного фильма — плоский orbit-spinner ===== */
.orbit-search {
  position: relative;
  width: 45px;
  height: 45px;
  margin: 1.5rem auto;
  animation: orbitSearchRotate 2.4s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.75);
  animation: orbitDotPulse 1.1s ease-in-out infinite;
}

@keyframes orbitSearchRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitDotPulse {
  0%, 100% { opacity: 0.25; transform: rotate(var(--a, 0deg)) translateX(19px) scale(0.7); }
  50% { opacity: 1; transform: rotate(var(--a, 0deg)) translateX(19px) scale(1.15); }
}

.result-loading {
  color: #60a5fa;
}

.result-error {
  color: #ef4444;
}

.result-film {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.result-film-poster {
  width: 110px;
  height: 165px;
  object-fit: cover;
  border-radius: 0.625rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.result-film-info {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .result-film {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .result-film-poster {
    width: 140px;
    height: 210px;
  }
}

.result-film a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: rgb(0 0 0 / 0%);
  border: 1px solid rgb(198 198 198 / 30%);
  color: #bababa;
  text-decoration: none;
}

.search-header {
  margin-left: auto;
  margin-right: 1rem;
}

.search-header form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-header-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  color: white;
  font-size: 0.875rem;
  width: 200px;
  transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1), background 0.2s, border-color 0.2s;
}

.search-header-input:focus,
.search-header-input.search-header-input--expanded {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.12);
  width: 250px;
}

.search-header-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
}

.search-header-btn:hover {
  color: #3b82f6;
}

/* Autocomplete выпадашка */
.search-header-form { position: relative; }

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    max-height: 420px;
    overflow-y: auto;
}
.search-dropdown--open { display: block; }

.search-drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #e5e7eb;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.search-drop-item:last-child { border-bottom: none; }
.search-drop-item:hover { background: rgba(255,255,255,0.07); }

.search-drop-poster {
    width: 34px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}
.search-drop-poster--person {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.search-drop-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.search-drop-title {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-drop-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.search-drop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 6px;
    font-size: 0.75rem;
    color: #6b7280;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.search-drop-clear {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.search-drop-clear:hover { color: #ef4444; }

.search-drop-history-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.search-drop-history-item:last-child { border-bottom: none; }

.search-drop-history-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    text-decoration: none;
    color: #d1d5db;
    font-size: 0.88rem;
    transition: background 0.12s;
}
.search-drop-history-link:hover { background: rgba(255,255,255,0.05); }

.search-drop-history-icon {
    color: #4b5563;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.search-drop-remove {
    background: none;
    border: none;
    color: #4b5563;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.15s;
    flex-shrink: 0;
}
.search-drop-remove:hover { color: #ef4444; }

.mobile-search {
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.mobile-search form {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  color: white;
  font-size: 0.875rem;
}

.mobile-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 380px;
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(400px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
}

.toast.hide {
  transform: translateX(400px);
}

.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  animation: toastProgress 3s linear forwards;
}

.toast.toast-success::before {
  background: #22c55e;
}

.toast.toast-error::before {
  background: #ef4444;
}

.toast.toast-info::before {
  background: #3b82f6;
}

.toast.toast-warning::before {
  background: #f59e0b;
}

@keyframes toastProgress {

  0% {
    width: 100%;
  }

  100% {
    width: 0%;
  }

}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.toast-icon svg {
  width: 100%;
  height: 100%;
}

.toast-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 20px;
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-content {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #e5e7eb;
}

.toast-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.toast-close:hover {
  color: white;
}

.parents-guide-wrapper {
  margin-top: 1.5rem;
}

.parents-guide-toggle {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  gap: 0.5rem;
  padding: 0.75rem 0;
  user-select: none;
}

.parents-guide-toggle:hover {
  color: #3b82f6;
}

.parents-guide-arrow {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
}

.parents-guide-arrow.rotated {
  transform: rotate(180deg);
}

.parents-guide-collapsible {
  overflow: hidden;
  transition: all 0.3s ease;
}

.parents-guide-collapsible.show {
  display: block !important;
}

.parents-guide-loading {
  text-align: center;
  padding: 1rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.parents-guide-category {
  margin-top: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.parents-guide-category-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fbbf24;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  animation: gentlePulse 0.25s ease-out;
}

.parents-guide-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.parents-guide-items li {
  font-size: 0.8rem;
  color: #d1d5db;
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.parents-guide-items li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #6b7280;
}

.severity-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.severity-сильно {
  background: #ef4444;
  color: white;
}

.severity-умеренно {
  background: #f59e0b;
  color: black;
}

.severity-фигня {
  background: #22c55e;
  color: black;
}

.severity-отсутствует {
  background: #6b7280;
  color: white;
}

.spoiler-warning {
  background: #ef4444;
  color: white;
  font-size: 0.6rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
  display: inline-block;
}

.parents-guide-empty {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.25rem;
}

.parents-guide-category-title,
.parents-guide-items li {
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.parents-guide-translate-btn {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  color: #60a5fa;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.parents-guide-translate-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
}

.parents-guide-translate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.parents-guide-section {
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {

  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

.translating-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

.section-title a {
  font-size: 0.875rem;
  font-weight: 400;
  color: #3b82f6;
  text-decoration: none;
  margin-left: auto;
}

.section-title a:hover {
  text-decoration: underline;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.empty-section {
  text-align: center;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Skeleton-заглушки для блоков главной, которые грузятся фоном через
   /api/home-block.php (см. index.php) — видны сразу, пока страница не ждёт
   внешние API (kinopoisk/poiskkino/TMDB), которые могут отвечать медленно
   или лежать. home-block-skeleton убирается с контейнера сразу после того,
   как реальный HTML вставлен на его место. */
@keyframes homeSkelPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 0.9; }
}
.home-skel-card {
  aspect-ratio: 2 / 3.6;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  animation: homeSkelPulse 1.4s ease-in-out infinite;
}
.home-skel-continue {
  aspect-ratio: unset;
  height: 220px;
}
.home-skel-schedule-row {
  height: 78px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  animation: homeSkelPulse 1.4s ease-in-out infinite;
}

@keyframes spin {

  to {
    transform: rotate(360deg);
  }

}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  color: #e5e7eb;
  text-decoration: none;
}

.action-btn-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.action-btn-purple {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

.action-btn-purple:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.action-btn-blue {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.action-btn-blue:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.action-btn-red {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.action-btn-red:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-2px);
}

.action-btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.action-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-width: 2.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  cursor: pointer;
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.pagination-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.pagination-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-width: 2.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.result-film-title {
  font-size: 16px;
  margin-bottom: 15px;
}

.result-film-genres {
  font-size: 12px;
  margin-bottom: 10px;
}

/* Когда модалка открыта — показываем */
.random-film-modal.active {
  display: flex;
}

/* Если хочешь анимацию, добавь */
.random-film-modal.active .random-film-container {
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.filter-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: white;
  font-size: 0.875rem;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.1);
}

.custom-select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 0.7rem;
  pointer-events: none;
}

/* Стили для поиска в кастомном селекте */
.custom-select-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.8rem;
  outline: none;
  box-sizing: border-box;
}

.custom-select-search:focus {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.custom-select-search::placeholder {
  color: #6b7280;
}

.custom-select-options {
  max-height: 200px;
  overflow-y: auto;
}

/* Стилизация скроллбара для опций */
.custom-select-options::-webkit-scrollbar {
  width: 4px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 4px;
}

.no-results {
  padding: 0.5rem 0.75rem;
  color: #6b7280;
  text-align: center;
  font-size: 0.8rem;
}

.filter-label {
  display: block;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: white;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.filter-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

.year-sep {
  color: #6b7280;
}

.rating-range-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rating-range-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rating-range-label {
  width: 1.5rem;
  color: #9ca3af;
  font-size: 0.875rem;
}

.rating-range-input {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.rating-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  transition: all 0.2s;
}

.rating-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #60a5fa;
}

/* IMDb-ползунок — тот же виджет, фирменный жёлтый акцент вместо синего */
.rating-range-input--imdb::-webkit-slider-thumb {
  background: #f5c518;
}

.rating-range-input--imdb::-webkit-slider-thumb:hover {
  background: #f8d347;
}

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

.rating-range-value {
  width: 2rem;
  text-align: right;
  color: #60a5fa;
  font-size: 0.875rem;
  font-weight: 600;
}

.try-luck-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.review-delete-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.review-delete-btn:hover {
  color: #dc2626;
}

/* Модальное окно подтверждения */
.delete-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.delete-modal-container {
  position: relative;
  background: #1f1f2e;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.delete-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.delete-modal-header h3 {
  color: #f87171;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.delete-modal-close {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.delete-modal-close:hover {
  color: white;
}

.delete-modal-body {
  margin-bottom: 1.5rem;
}

.delete-modal-body p {
  color: #d1d5db;
  margin: 0 0 0.5rem 0;
}

.delete-modal-warning {
  color: #f87171 !important;
  font-size: 0.8rem;
}

.delete-modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.delete-modal-cancel {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.delete-modal-confirm {
  padding: 0.5rem 1rem;
  background: #ef4444;
  border: none;
  border-radius: 0.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-modal-confirm:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Бейджи ролей в профиле */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Цвет/фон бейджа роли теперь задаётся inline-стилем из getRoleStyle()
   (см. profile.php, users.js, chat.v3.js) — раньше были фиксированные
   классы .role-badge-admin/vip/premium/user под 6 захардкоженных ролей. */


/* ===== КАСТОМНЫЙ СЕЛЕКТ ===== */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  font-size: 0.875rem;
}

.custom-select-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
}

.custom-select-trigger.open {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.custom-select-trigger .arrow {
  transition: transform 0.2s;
  color: #9ca3af;
  font-size: 0.7rem;
}

.custom-select-trigger.open .arrow {
  transform: rotate(180deg);
}

.custom-select-trigger .selected-value {
  flex: 1;
  text-align: left;
}

/* Выпадающий список */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: #1f1f2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.custom-select-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Элемент списка */
.custom-select-item {
  padding: 0.625rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #d1d5db;
  font-size: 0.875rem;
}

.custom-select-item:hover {
  background: rgba(59, 130, 246, 0.2);
  color: white;
}

.custom-select-item.selected {
  background: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* MultiCheckSelect — вариант custom-select с чекбоксами (множественный выбор,
   напр. "исключить студию/тип") */
/* Специфичность .multi-check-select-wrapper .multi-check-item (2 класса)
   намеренно выше, чем у .filter-group label (класс+тег) — .multi-check-item
   тоже <label>, вложенный в .filter-group, и без этого перевеса
   .filter-group label { display: block } перебивал бы display: flex ниже
   (раньше здесь стоял !important, из-за чего JS не мог скрывать пункты
   через inline style.display при поиске — см. историю фикса). */
.multi-check-select-wrapper .multi-check-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
  color: #d1d5db;
  font-size: 0.875rem;
}

.multi-check-item:hover {
  background: rgba(59, 130, 246, 0.2);
  color: white;
}

.multi-check-item.selected {
  color: #60a5fa;
}

/* Нативный чекбокс визуально спрятан (но остаётся в DOM/доступным для
   клавиатуры и скринридеров) — вместо него рисуем свой квадрат через
   .multi-check-box, чтобы он не выглядел голым браузерным виджетом. */
.multi-check-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.multi-check-box {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s, border-color 0.15s;
}

.multi-check-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.multi-check-item:hover .multi-check-box {
  border-color: rgba(59, 130, 246, 0.6);
}

.multi-check-item input[type="checkbox"]:checked ~ .multi-check-box,
.multi-check-item.selected .multi-check-box {
  background: #3b82f6;
  border-color: #3b82f6;
}

.multi-check-item input[type="checkbox"]:checked ~ .multi-check-box::after,
.multi-check-item.selected .multi-check-box::after {
  transform: rotate(45deg) scale(1);
}

.multi-check-item input[type="checkbox"]:focus-visible ~ .multi-check-box {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* Стилизация скроллбара */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 3px;
}

.result-film-country {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 15px;
}

.result-film-rating {
  font-size: 0.8rem;
  margin-bottom: 15px;
}

/* Кнопка избранного */
.favorite-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  /* backdrop-filter убран — та же причина, что у .rating-badge выше:
     десятки таких кнопок на сетке карточек грузят GPU на каждый кадр
     скролла. Фон и так достаточно тёмный (0.6 альфы) без blur. */
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 41;
  transition: all 0.2s;
  /* opacity: 0; */
}

.movie-card:hover .favorite-btn {
  opacity: 1;
}

.favorite-btn i {
  font-size: 1rem;
  color: white;
  transition: all 0.2s;
}

.favorite-btn:hover {
  transform: scale(1.1);
}

.favorite-btn.active {
  opacity: 1;
}

.favorite-btn.active i {
  color: #ef4444;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  content: '\f004';
}

/* Кнопка "Более ранние" */
.load-more-btn {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 2rem;
  padding: 0.5rem 1.5rem;
  color: #60a5fa;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.load-more-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

.load-more-btn.loading {
  opacity: 0.6;
  cursor: wait;
}

input[type="range"] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #fbbf24;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #f59e0b;
}

#ratingSliderContainer {
  transition: background 0.05s linear;
  -webkit-tap-highlight-color: transparent;
}

#ratingTooltip {
  white-space: nowrap;
  z-index: 10;
}

#ratingStarsContainer {
  position: relative;
  cursor: grab;
}

#ratingStarsContainer:active {
  cursor: grabbing;
}

#ratingColorMask {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  transition: width 0.02s linear;
  white-space: nowrap;
}

.watched-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: rgb(0 0 0 / 60%);
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  z-index: 15;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.watched-badge svg {
  width: 12px;
  height: 12px;
}

#watchlistBtn {
  transition: display 0.2s, opacity 0.2s;
}

/* Анимации для смены вопросов */
.quiz-content-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.quiz-fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Анимация для смены контента */
#quizContent,
#resultState,
#loadingState {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.review-text-compact.short-text {
  max-height: 6rem;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.review-text-compact.expanded {
  max-height: none;
}

.read-more-btn .fa-chevron-down {
  transition: transform 0.2s;
}

.read-more-btn.active .fa-chevron-down {
  transform: rotate(180deg);
}


.premiere-date {
  font-size: 1rem;
  font-weight: 300;
  color: #60a5fa;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  display: inline-block;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.1);
  padding: 10px 20px;
}

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

.premiere-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  /* transition: all — раньше пересчитывал ВСЕ свойства на каждый hover,
     включая box-shadow (дорого при много карточек на экране разом).
     Явно перечисляем только то, что реально меняется, и синхронизируем
     длительность/easing с .premiere-poster img ниже — раньше у карточки
     было 0.2s linear, а у постера внутри 0.3s без easing, из-за
     рассинхронизации hover ощущался как резкий рывок вместо плавного зума. */
  transition: transform 0.25s cubic-bezier(.4,0,.2,1),
              border-color 0.25s cubic-bezier(.4,0,.2,1),
              box-shadow 0.25s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  color: inherit;
  height: fit-content;
}

.premiere-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.premiere-poster {
  aspect-ratio: 2/3;
  background: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.premiere-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}

.premiere-card:hover .premiere-poster img {
  transform: scale(1.05);
}

.premiere-info {
  padding: 0.75rem;
}

.premiere-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.premiere-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

.premiere-genre {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.premiere-country {
  background: rgba(59, 130, 246, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #60a5fa;
}

.premiere-duration {
  background: rgba(34, 197, 94, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #4ade80;
}

.premiere-year {
  background: rgba(168, 85, 247, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: #d8b4fe;
}

.empty-premieres {
  text-align: center;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1rem;
  color: #6b7280;
}

.premiere-date-header {
  margin-top: 1.5rem;
}

.premiere-date-header:first-of-type {
  margin-top: 0;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

}

/* Мобильное меню - исправление прокрутки */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(16px);
  z-index: 55;
  transition: right 0.3s ease;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu::-webkit-scrollbar {
  width: 4px;
}

.mobile-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.5);
  border-radius: 4px;
}

.mobile-menu-inner {
  padding: 80px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100%;
}

/* Уменьшаем отступы на маленьких экранах */
@media (max-height: 600px) {
  .mobile-menu-inner {
    padding: 70px 20px 30px;
    gap: 0.25rem;
  }

  .mobile-nav-link {
    padding: 8px 16px;
  }
}

/* Предпоследний элемент не прижимается к низу */
.mobile-divider:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .profile-header h1 {
    justify-content: center;
    margin-bottom: 10px;
  }

  .profile-header p {
    font-size: 14px;
  }

  .profile-header .flex.flex-wrap.gap-4 {
    justify-content: center;
  }

  .movies-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
  }

  .toast {
    width: auto;
    max-width: none;
  }
}

@media (max-width: 1024px) {
  .search-header-input {
    width: 150px;
  }

  .search-header-input:focus,
  .search-header-input.search-header-input--expanded {
    width: 180px;
  }
}

@media (max-width: 991px) {
  .desktop-menu {
    display: none;
  }

  .burger-btn {
    display: flex;
  }

  .nav-container {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .search-header {
    display: none;
  }
}

@media (max-width: 768px) {}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .movie-title {
    font-size: 0.875rem;
  }

  .watch-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 540px) {
  .star-rating {
    font-size: 1.15rem;
  }

  .random-film-container {
    overflow: auto;
    height: inherit;
    transform: unset;
  }

  .random-film-modal {
    align-items: flex-start;
  }

  .random-film-modal.active {
    padding: 20px 0;
  }
}

/* ───── Nav Dropdown ───── */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-dropdown-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(15, 15, 20, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  min-width: 160px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.nav-dropdown:hover .nav-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.5rem 1rem;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.nav-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* ───── Search & Loading ───── */

.search-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  padding: 1rem 2rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  font-size: 0.875rem;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInScale 0.2s ease;
}

.search-loading .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.htmx-request .movies-grid,
.htmx-request .history-section {
  opacity: 0.6;
  transition: opacity 0.2s;
}

html {
  scroll-behavior: smooth;
}

/* ───── Movie Detail ───── */

.overlay-gif {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.1;
}

.overlay-gif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  overflow: hidden;
}

.raindrop {
  position: absolute;
  bottom: 100%;
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(100, 150, 255, 0.6));
  animation: fall linear infinite;
  opacity: 0.6;
}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(5deg);
    opacity: 0.6;
  }

  100% {
    transform: translateY(100vh) rotate(15deg);
    opacity: 0;
  }
}

.player-switch {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 140px;
}

.player-switch:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.player-switch.active {
  background: rgba(99, 102, 241, 0.85);
  border-color: rgba(99, 102, 241, 0.95);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.player-switch.active:hover {
  background: rgba(99, 102, 241, 0.95);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* ───── Лоадер поверх iframe плеера ───── */
.iframe-loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  background: #000;
  border-radius: 1rem;
  transition: opacity 0.35s ease;
}

.iframe-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.iframe-loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: iframe-loader-spin 0.8s linear infinite;
}

.iframe-loader-text {
  color: #9ca3af;
  font-size: 0.85rem;
}

.iframe-loader.error .iframe-loader-spinner {
  display: none;
}

.iframe-loader.error .iframe-loader-text {
  color: #f87171;
  text-align: center;
  max-width: 80%;
  line-height: 1.5;
}

@keyframes iframe-loader-spin {
  to { transform: rotate(360deg); }
}

/* ───── Theatre mode ───── */

body.theatre-mode #theatreOverlay {
    display: block !important;
}

body.theatre-mode main {
    max-width: 92rem !important;
}

/* Плееры и панели поверх оверлея */
body.theatre-mode #playerDdbb,
body.theatre-mode #playerKinobd,
body.theatre-mode #filterBar,
body.theatre-mode .player-info-bar,
body.theatre-mode .mb-4 {
    position: relative;
    z-index: 999;
}

/* ───── Profile ───── */

.review-card-compact {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.review-card-compact:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.review-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-film-title {
  font-weight: 600;
  color: #60a5fa;
  font-size: 0.9rem;
}

.review-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.review-rating-badge.review-legend {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.review-rating-badge.review-good {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.review-rating-badge.review-fine {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.review-rating-badge.review-bad {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.review-date-compact {
  font-size: 0.65rem;
  color: #6b7280;
}

.review-text-compact {
  color: #d1d5db;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.5rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ───── Quiz ───── */

.quiz-option {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease forwards;
  opacity: 0;
  transform: translateX(-10px);
}

.quiz-option:hover:not(.disabled) {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3b82f6;
  transform: translateX(4px);
}

.quiz-option.disabled {
  cursor: not-allowed;
}

.quiz-option.correct {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #4ade80;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.quiz-option.wrong {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.quiz-option:nth-child(1) {
  animation-delay: 0.05s;
}

.quiz-option:nth-child(2) {
  animation-delay: 0.1s;
}

.quiz-option:nth-child(3) {
  animation-delay: 0.15s;
}

.quiz-option:nth-child(4) {
  animation-delay: 0.2s;
}

#resetScoreBtn {
  background: none;
  border: none;
  cursor: pointer;
}

.quiz-frame-container {
  position: relative;
  width: 100%;
  min-height: 300px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.quiz-frame-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #475569;
}

.quiz-frame-placeholder p {
  font-size: 0.875rem;
}

.quiz-frame-image {
  width: 100%;
  object-fit: contain;
  max-height: 500px;
  transition: opacity 0.3s;
}

.quiz-frame-image.loading {
  opacity: 0;
}

.quiz-frame-image.loaded {
  opacity: 1;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.75rem;
  transition: all 0.2s;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.leaderboard-rank {
  width: 32px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #6b7280;
}

.leaderboard-rank.top-1 {
  color: #fbbf24;
  font-size: 1.125rem;
}

.leaderboard-rank.top-2 {
  color: #9ca3af;
  font-size: 1rem;
}

.leaderboard-rank.top-3 {
  color: #cd7f32;
  font-size: 1rem;
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #374151;
  flex-shrink: 0;
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.7rem;
  color: #6b7280;
}

.leaderboard-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.leaderboard-correct {
  color: #4ade80;
}

.leaderboard-accuracy {
  color: #60a5fa;
}

.leaderboard-current-user {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.leaderboard-stats .leaderboard-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.65rem;
}

.leaderboard-stats .leaderboard-streak i {
  font-size: 0.6rem;
}

@keyframes streakPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

.streak-pop {
  animation: streakPop 0.3s ease;
}

#streakDisplay {
  transition: all 0.2s ease;
}

#streakIcon {
  transition: all 0.2s ease;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Подиум топ-3 рецензентов (страница /rating) ===== */
.rating-podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.rating-podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  padding: 1.5rem 1rem 1.25rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.rating-podium-slot:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.rating-podium-empty {
  background: transparent;
  border: none;
  pointer-events: none;
}

.rating-podium-place-1 {
  order: 2;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(251, 191, 36, 0.35);
  animation: ratingGlow 2.5s ease infinite;
}

.rating-podium-place-2 {
  order: 1;
  margin-bottom: -0.5rem;
}

.rating-podium-place-3 {
  order: 3;
  margin-bottom: -1rem;
}

.rating-podium-avatar-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.rating-podium-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #374151;
  border: 3px solid rgba(255, 255, 255, 0.12);
}

.rating-podium-place-1 .rating-podium-avatar {
  width: 92px;
  height: 92px;
  border-color: #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}

.rating-podium-place-2 .rating-podium-avatar {
  border-color: #9ca3af;
}

.rating-podium-place-3 .rating-podium-avatar {
  border-color: #cd7f32;
}

.rating-podium-crown {
  position: absolute;
  top: -34px;
  right: -5px;
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(251, 191, 36, 0.5));
  transform: rotate(-4deg);
  z-index: 2;
}

.rating-podium-rank {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f0f1a;
  background: #9ca3af;
  border: 2px solid #0f0f1a;
}

.rating-podium-place-1 .rating-podium-rank {
  background: #fbbf24;
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
}

.rating-podium-place-3 .rating-podium-rank {
  background: #cd7f32;
}

.rating-podium-name {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.rating-podium-place-1 .rating-podium-name {
  font-size: 1.1rem;
}

.rating-podium-count {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.rating-podium-avg {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Победитель прошлого месяца — показывается вместо подиума, когда новый
   месяц ещё пуст (никто не успел написать рецензию с 1 числа). */
.rating-prev-winner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0;
}

.rating-prev-winner-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rating-prev-winner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  padding: 1.75rem 2rem;
  border-radius: 1.25rem;
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(251, 191, 36, 0.35);
  animation: ratingGlow 2.5s ease infinite;
  transition: transform 0.2s;
}

.rating-prev-winner-card:hover {
  transform: translateY(-4px);
}

.rating-prev-winner-card .rating-podium-avatar {
  width: 92px;
  height: 92px;
  border-color: #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.35);
}

.rating-prev-winner-card .rating-podium-name {
  font-size: 1.1rem;
}

.rating-prev-winner-note {
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
  max-width: 340px;
}

/* Компактная плашка победителя прошлого месяца над уже заполненным подиумом */
.rating-prev-winner-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: 720px;
  margin: 0 auto 1rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.75rem;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s;
}

.rating-prev-winner-bar:hover {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.4);
}

.rating-prev-winner-bar > i.fa-crown {
  color: #fbbf24;
}

.rating-prev-winner-bar-label {
  color: #9ca3af;
}

.rating-prev-winner-bar-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #374151;
  border: 2px solid #fbbf24;
}

.rating-prev-winner-bar-name {
  font-weight: 700;
}

.rating-prev-winner-bar-count {
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 640px) {
  .rating-prev-winner-bar {
    flex-wrap: wrap;
    padding: 0.6rem 0.85rem;
  }

  .rating-prev-winner-bar-label {
    display: none;
  }
}

@media (max-width: 640px) {
  .rating-podium {
    gap: 0.5rem;
  }

  .rating-podium-slot {
    padding: 1rem 0.5rem;
  }

  .rating-podium-avatar {
    width: 56px;
    height: 56px;
  }

  .rating-podium-place-1 .rating-podium-avatar {
    width: 72px;
    height: 72px;
  }

  .rating-podium-name {
    font-size: 0.8rem;
  }

  .rating-podium-crown {
    width: 30px;
    height: 30px;
    top: -16px;
    right: -6px;
  }
}

/* ===== Переключатель периода (месяц / всё время) на странице /rating ===== */
.rating-period-switch {
  display: flex;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  padding: 0.25rem;
}

.rating-period-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.rating-period-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.rating-period-btn.active {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}

/* ===== Награда месяца — пицца (страница /rating) ===== */
.pizza-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(220, 38, 38, 0.06) 60%, rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
}

.pizza-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 50%, rgba(249, 115, 22, 0.15), transparent 55%);
  pointer-events: none;
}

.pizza-banner-icon {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: radial-gradient(circle at 35% 30%, rgba(251, 191, 36, 0.35), rgba(249, 115, 22, 0.15) 70%);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.25);
  position: relative;
  z-index: 1;
}

.pizza-banner-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.pizza-banner-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.6rem;
}

.pizza-banner-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.pizza-banner-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
  line-height: 1;
}

.pizza-banner-amount span {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: #fff !important;
  margin-top: 0.2rem;
}

.pizza-banner-terms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #d1d5db;
}

.pizza-banner-terms i {
  color: #fdba74;
  margin-right: 0.35rem;
  font-size: 0.75rem;
}

.pizza-banner-dot {
  color: rgba(255, 255, 255, 0.2);
}

.pizza-honesty-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 2rem;
  padding-left: 0.25rem;
}

.pizza-honesty-note i {
  color: #f87171;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pizza-banner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
    padding: 1.25rem;
  }

  .pizza-banner-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .pizza-banner-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@keyframes gentlePulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

#nextBtn,
#playAgainBtn {
  animation: gentlePulse 0.4s ease;
}

/* ───── Reviews ───── */

.filter-btn {
  padding: 0.375rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2rem;
  font-size: 0.8rem;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.3);
  color: white;
}

.filter-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

.review-film-info {
  margin: 0.5rem 0;
}

.review-film-link {
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 10px;
  background: #ffffff14;
  padding: 5px 10px;
  display: inline-block;
  margin: 0 10px;
  border: 1px solid #ffffff24;
}

.review-movie-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.review-movie-link:hover {
  color: #60a5fa;
}

.review-star-full {
  color: #fbbf24;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
}

.review-star-partial {
  position: relative;
  display: inline-block;
}

/* ───── Changelog ───── */

.change-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  animation: fadeIn 0.3s ease;
}

.change-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateX(4px);
}

.change-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.change-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.change-type-new {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.change-type-update {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.change-type-fix {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.change-type-remove {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.change-version {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9ca3af;
}

.change-date {
  font-size: 0.7rem;
  color: #6b7280;
}

.change-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.change-description {
  color: #d1d5db;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn.active {
  color: #60a5fa;
  border-bottom-color: #3b82f6;
}

.tab-btn:hover {
  color: white;
}

.suggestion-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  animation: fadeIn 0.3s ease;
}

.suggestion-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.suggestion-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.status-pending {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}

.status-reviewing {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.status-planned {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.status-completed {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.status-declined {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.suggestion-like-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.suggestion-like-btn:hover {
  color: #ef4444;
}

.suggestion-like-btn.liked {
  color: #ef4444;
}

.suggestion-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.suggestion-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.admin-response {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  padding: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

.status-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.status-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.status-filter-btn.active {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.5);
  color: #60a5fa;
}

/* ───── Music Roulette ───── */

.roulette-card {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
}

.roulette-card.active {
  border-color: #fbbf24;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.roulette-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #1f2937;
  overflow: hidden;
}

.roulette-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out;
}

.roulette-thumb-img.fade-out {
  opacity: 0;
}

.roulette-thumb-img.fade-in {
  opacity: 1;
}

.roulette-info {
  padding: 1rem;
  text-align: center;
}

.roulette-title {
  font-weight: 700;
  font-size: 1rem;
  color: white;
  margin-bottom: 0.25rem;
}

.roulette-author {
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.roulette-number {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  color: #fbbf24;
  z-index: 10;
}

.spinning-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.spinning-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner-icon {
  font-size: 3rem;
  color: #fbbf24;
  animation: spin 1s linear infinite;
}

.roulette-pointer {
  width: 0;
  height: 0;
  margin: 0 auto 20px;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 35px solid #fbbf24;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.track-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: all 0.2s;
}

.track-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.05);
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
  }

  50% {
    box-shadow: 0 0 0 20px rgba(251, 191, 36, 0);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 1.5s ease-out;
}

.chat-emotes-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-emotes-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.chat-emotes-panel {
  position: fixed;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid #ffffff22;
  border-radius: 0.75rem;
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.4rem;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10002;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.chat-emote {
  cursor: pointer;
  transition: transform 0.1s;
  width: 30px;
  object-fit: contain;
}

.chat-emote:hover {
  transform: scale(1.2);
}

.inline-emote {
  display: inline-block;
  border-radius: 3px;
  margin: 0 5px;
  max-height: 32px;
  height: auto;
  vertical-align: middle;
}

.review-emotes-panel {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.review-emote-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.review-emote-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: scale(1.1);
}

.review-emote-img {
  width: 28px;
  height: 28px;
  max-width: 28px;
  object-fit: contain;
  display: block;
}

.review-text-editor {
  word-break: break-word;
  overflow-wrap: break-word;
}

.review-text-editor:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
  display: block;
}

/* ===== Переключатель текст/голос ===== */
.review-type-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.review-type-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.review-type-btn:hover {
  color: #e5e7eb;
}

.review-type-btn.active {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

/* ===== Рекордер голосовой рецензии ===== */
.voice-recorder {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  min-height: 88px;
  display: flex;
  align-items: center;
}

.voice-recorder-idle {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.voice-record-btn {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  transition: transform 0.15s;
}

.voice-record-btn:hover {
  transform: scale(1.06);
}

.voice-record-btn:active {
  transform: scale(0.96);
}

.voice-recorder-hint {
  color: #9ca3af;
  font-size: 0.875rem;
}

.voice-recorder-active {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.voice-recorder-bars {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 44px;
  overflow: hidden;
}

.voice-recorder-bar {
  flex-shrink: 0;
  width: 3px;
  min-height: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #a5b4fc, #6366f1);
  transition: height 0.08s ease-out;
}

.voice-recorder-time {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: #a5b4fc;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.voice-recorder-time::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #818cf8;
  animation: voiceRecPulse 1.1s ease-in-out infinite;
}

@keyframes voiceRecPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.voice-stop-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.voice-stop-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.voice-recorder-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.voice-waveform-preview {
  flex: 1;
  min-width: 0;
}

.voice-preview-remove {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.voice-preview-remove:hover {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.15);
}

/* ===== Плеер воспроизведения голосовой рецензии (карточка отзыва) ===== */
.voice-review-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
}

.voice-review-playbtn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: transform 0.15s;
}

.voice-review-playbtn:hover {
  transform: scale(1.06);
}

.voice-review-waveform {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.voice-review-duration {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: #9ca3af;
  min-width: 34px;
  text-align: right;
}

/* Кнопка "Расшифровать в текст" (по аналогии с Telegram) */
.voice-review-transcribe-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
}

.voice-review-transcribe-btn:hover {
  background: rgba(129, 140, 248, 0.15);
  color: #c7d2fe;
}

.voice-review-transcribe-btn.is-active {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.voice-review-transcribe-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Текст расшифровки голосовой рецензии — под плеером */
.voice-review-transcript {
  margin-top: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #d1d5db;
  white-space: pre-wrap;
}

/* Текст, дополняющий голосовую рецензию — под плеером в карточке */
.voice-review-extra-text {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Чекбокс "Дополнить голосовую рецензию текстом" */
.voice-add-text-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #9ca3af;
  cursor: pointer;
  user-select: none;
}

.voice-add-text-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
  cursor: pointer;
}

.voice-add-text-toggle:hover {
  color: #d1d5db;
}

.voice-add-text-toggle i {
  color: #818cf8;
}

.review-emote-inline {
  user-select: none;
}

.review-emote-inline img {
  pointer-events: none;
}

/* ========== ПОИСК ПО АКТЁРАМ ========== */
.selected-actors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.selected-actor {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    font-size: 0.875rem;
    height: 40px;
    margin-bottom: 1rem;
}

.selected-actor-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.selected-actor-name {
    color: #60a5fa;
}

.remove-actor {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    margin-left: 0.25rem;
}

.no-actors-message {
    color: #6b7280;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

.actor-autocomplete-container {
    position: relative;
}

.actor-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 60;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.actor-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.actor-suggestion:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.suggestion-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.suggestion-name-en {
    font-size: 0.7rem;
    color: #6b7280;
}

.no-suggestions {
    padding: 0.75rem;
    text-align: center;
    color: #6b7280;
}


/* ========== ПОИСК ПО АКТЁРАМ (дополнение) ========== */

/* Контейнер всего блока поиска по актёрам */
.actors-search-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    padding: 1rem;
}

/* Поле ввода актёра */
.actor-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.actor-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Плейсхолдер для аватара в предложениях */
.suggestion-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Заголовок результатов поиска по актёрам */
.actor-search-results {
    margin-top: 2rem;
}

/* Счётчик в тегах поиска */
.search-tag-count {
    color: #6b7280;
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

/* Пустое состояние истории */
.empty-history {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-history-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.example-searches {
    margin-top: 1.5rem;
}

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

/* Карточка истории */
.history-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.history-item {
    position: relative;
}

.history-item-remove {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(17, 17, 27, 0.75);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
    z-index: 2;
}

.history-item:hover .history-item-remove {
    opacity: 1;
}

.history-item-remove:hover {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
}

.history-item-remove:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (hover: none) {
    .history-item-remove {
        opacity: 1;
    }
}

.history-poster {
    aspect-ratio: 2/3;
    position: relative;
    overflow: hidden;
}

.history-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-poster-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.history-info {
    padding: 0.5rem;
}

.history-title-text {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Сетка истории */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Секция истории */
.history-section {
    margin-bottom: 2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.clear-history-btn {
    font-size: 0.75rem;
    color: #ef4444;
    text-decoration: none;
}

.clear-history-btn:hover {
    color: #f87171;
}

/* Теги истории поиска */
.search-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-tag {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.2s;
}

.search-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Для ссылок без подчёркивания */
.no-underline {
    text-decoration: none;
    color: inherit;
}

/* ========== ПЕРЕКЛЮЧАТЕЛЬ РЕЖИМОВ ПОИСКА ========== */
.search-mode-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-mode-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search-mode-btn i {
    font-size: 0.875rem;
}

.search-mode-btn:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.05);
}

.search-mode-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* ========== КАТАЛОГ: ПАНЕЛЬ ФИЛЬТРОВ (movies.php) ========== */
.catalog-filters-toggle-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.5rem;
}

.catalog-filters-label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #d1d5db;
    font-size: .85rem;
    font-weight: 600;
}

.catalog-filters-label--btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color .2s;
}

.catalog-filters-label--btn:hover {
    color: #fff;
}

.catalog-filters-chevron {
    font-size: .7rem;
    color: #6b7280;
    transition: transform .25s ease;
}

.catalog-filters-panel--collapsed .catalog-filters-chevron,
[aria-expanded="false"] .catalog-filters-chevron {
    transform: rotate(-90deg);
}

.catalog-filters-count {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.catalog-filters-reset {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: .8rem;
    cursor: pointer;
    padding: .5rem .25rem;
    transition: color .2s;
}

.catalog-filters-reset:hover {
    color: #f87171;
}

.catalog-filters-panel {
    display: grid;
    grid-template-rows: 1fr;
    margin-top: 1rem;
    opacity: 1;
    transition: grid-template-rows .25s ease, opacity .2s ease, margin-top .25s ease;
}

.catalog-filters-panel > * {
    min-height: 0;
    overflow: hidden;
}

.catalog-filters-panel--collapsed {
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
}

.catalog-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.25rem;
}

.catalog-filters-grid .filter-group--full {
    grid-column: 1 / -1;
}

.catalog-filters-grid .rating-range-value {
    min-width: 3.2rem;
    text-align: right;
    color: #c4b5fd;
    font-weight: 600;
    font-size: .8rem;
}

@media (max-width: 640px) {
    .catalog-filters-grid { grid-template-columns: 1fr; }
}

/* ========== ПЛИТОЧНЫЙ ВЫБОР АКТЁРОВ ========== */
.actors-search-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.actors-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.actors-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 0.25rem;
}

.actors-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
}

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

.actor-tile {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    aspect-ratio: 1 / 1.2;
    max-width: 140px;
    width: 100%;
}

.actor-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

/* Пустая плитка */
.actor-tile-empty {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 2px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.actor-tile-empty:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
}

.actor-tile-empty-icon {
    text-align: center;
    font-size: 2.5rem;
    color: #ffffff;
    opacity: 0.1;
    transition: transform 0.2s ease;
}

.actor-tile-empty-text {
  text-align: center;
  font-size: 12px;
  opacity: 0.5;
  color: #fff;
}
 
.actor-tile-empty:hover .actor-tile-empty-icon {
    transform: scale(1.1);
}
/* ========== КНОПКА ПОИСКА АКТЁРОВ ========== */
.actors-search-action {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.actors-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #60a5fa;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.actors-search-button i {
    font-size: 0.875rem;
}

.actors-search-button:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.actors-search-button:active {
    transform: translateY(0);
}

/* Адаптация для мобильных */
@media (max-width: 640px) {
    .actors-search-button {
        padding: 0.6rem 1.25rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .actors-search-button span {
        display: inline;
    }
}

/* Заполненная плитка */
.actor-tile-filled {
    position: relative; 
}

.actor-tile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.actor-tile-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), transparent);
    padding: 0.5rem;
    text-align: center;
}

.actor-tile-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-tile-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f87171;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.actor-tile-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Модальное окно для выбора актёра */
.actor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}

.actor-modal.active {
    visibility: visible;
    opacity: 1;
}

.actor-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.actor-modal-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: #121212;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.actor-modal.active .actor-modal-container {
    transform: scale(1);
}

.actor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.actor-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.actor-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.actor-modal-close:hover {
    color: #f87171;
}

.actor-modal-body {
    padding: 1.5rem;
}

.actor-modal-search {
    position: relative;
    margin-bottom: 1rem;
}

.actor-modal-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
}

.actor-modal-search input:focus {
    outline: none;
    border-color: #3b82f6;
}

.actor-modal-results {
    max-height: 300px;
    overflow-y: auto;
}

.actor-modal-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.actor-modal-result:hover {
    background: rgba(59, 130, 246, 0.15);
}

.actor-modal-result-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #374151;
}

.actor-modal-result-info {
    flex: 1;
}

.actor-modal-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.actor-modal-result-name-en {
    font-size: 0.7rem;
    color: #6b7280;
}

/* Адаптивность */
@media (max-width: 640px) {
    .actors-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .actor-tile-name {
        font-size: 0.65rem;
    }
    
    .actor-modal-container {
        width: 95%;
    }
}

/* Медиа-запрос для мобильных */
@media (max-width: 640px) {
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .history-title-text {
        font-size: 0.7rem;
    }
    
    .selected-actors {
        gap: 0.35rem;
    }
    
    .selected-actor {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem 0.2rem 0.35rem;
    }
    
    .selected-actor-avatar {
        width: 18px;
        height: 18px;
    }
} 

/* Маячок для новых изменений */
.changelog-badge {
    position: relative;
}

.changelog-badge::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
    right: 50px;
    width: 5px;
    height: 5px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.changelog-badge-dropdown {
  position: relative;
}

.changelog-badge-dropdown::after {
    content: '';
    position: absolute;
    bottom: 0;
    top: 0;
    margin: auto;
    right: 0px;
    height: 5px;
    width: 5px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Для мобильного меню */
.mobile-nav-link .changelog-badge-mobile {
    position: relative;
}

.mobile-nav-link .changelog-badge-mobile::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -8px;
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
}

.movie-type {
    font-size: 0.65rem;
    padding: 0.125rem 0.375rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== СЛАЙДЕР АКТЁРОВ ===== */

.actors-swiper,
.dubbing-swiper {
    width: 100%;
    padding-bottom: 4px !important;
    overflow: hidden;
}

/* До инициализации Swiper .swiper-slide не имеет ширины (её проставляет JS
   по числу slidesPerView) — без этого на долю секунды при загрузке страницы
   первая карточка актёра растягивается на всю ширину контейнера (FOUC).
   Ширина ниже совпадает с slidesPerView:2 на самом узком брейкпоинте —
   после инициализации Swiper сразу переопределяет её инлайн-стилем. */
.actors-swiper .swiper-slide,
.dubbing-swiper .swiper-slide {
    width: calc(50% - 6px);
}
@media (min-width: 480px) {
    .actors-swiper .swiper-slide,
    .dubbing-swiper .swiper-slide { width: calc(100% / 3 - 8px); }
}
@media (min-width: 640px) {
    .actors-swiper .swiper-slide,
    .dubbing-swiper .swiper-slide { width: calc(25% - 10.5px); }
}
@media (min-width: 900px) {
    .actors-swiper .swiper-slide,
    .dubbing-swiper .swiper-slide { width: calc(20% - 12.8px); }
}
@media (min-width: 1100px) {
    .actors-swiper .swiper-slide,
    .dubbing-swiper .swiper-slide { width: calc(100% / 6 - 13.3px); }
}
@media (min-width: 1280px) {
    .actors-swiper .swiper-slide,
    .dubbing-swiper .swiper-slide { width: calc(100% / 7 - 13.7px); }
}

.actors-swiper .swiper-button-prev,
.actors-swiper .swiper-button-next {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    top: 38%;
    transition: background 0.2s;
}

.actors-swiper .swiper-button-prev:hover,
.actors-swiper .swiper-button-next:hover {
    background: rgba(255, 255, 255, 0.16);
}

.actors-swiper .swiper-button-prev::after,
.actors-swiper .swiper-button-next::after {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.actor-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
 
.actor-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
}

.actor-photo {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.actor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.actor-photo--fallback {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.actor-photo--fallback::after {
    content: '🎭';
    font-size: 2rem;
    opacity: 0.3;
}

.actor-info {
    padding: 0.5rem 0.6rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.actor-name-ru {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-name-en {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actor-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================== */

.staff-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.1rem;
    align-items: center;
}

.staff-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.15s, color 0.15s;
}

.staff-link:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.7);
}

/* ===== СТРАНИЦА ПЕРСОНЫ ===== */

.person-films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
}

.person-film-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.75rem;
    padding: 0.625rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
}

.person-film-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
}

.person-film-title {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
}

.person-film-rating {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4ade80;
}

.person-facts-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding-left: 0;
    list-style: none;
}

.person-facts-list li {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
}

.person-facts-list li::before {
    content: '·';
    position: absolute;
    left: 0.25rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.25rem;
    line-height: 1;
    top: 0.1rem;
}

.filmography-table {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filmography-row {
    display: grid;
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background 0.15s;
}

.filmography-thumb {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    display: block;
}

.filmography-row:last-child {
    border-bottom: none;
}

.filmography-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.filmography-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filmography-year {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.filmography-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: right;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filmography-rating {
    font-size: 0.8125rem;
    font-weight: 600;
    min-width: 2.5rem;
    text-align: right;
}

/* ===== Фильтр ролей и сортировка фильмографии (страница персоны) ===== */
.filmography-role-filter,
.filmography-sort {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 0.25rem;
}

.filmography-role-btn,
.filmography-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.filmography-role-btn:hover,
.filmography-sort-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

.filmography-role-btn.active,
.filmography-sort-btn.active {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

/* ===== ЛОАДЕР ===== */

/* ===== PROGRESS BAR (замена полноэкранного лоадера) ===== */
#page-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    z-index: 9999;
    transition: width 0.2s ease, opacity 0.3s ease;
    pointer-events: none;
}
#page-progress-bar.done {
    opacity: 0;
}

/* ===== SKELETON ===== */
@keyframes skeleton-shine {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 800px 100%;
    animation: skeleton-shine 1.4s ease-in-out infinite;
    border-radius: 0.5rem;
}

/* Карточки похожих фильмов */
.skeleton-movie-card {
    width: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.skeleton-movie-poster {
    width: 140px;
    height: 200px;
    border-radius: 0.75rem;
}
.skeleton-movie-title {
    height: 12px;
    width: 80%;
}
.skeleton-movie-year {
    height: 10px;
    width: 40%;
}

/* Строки видео */
.skeleton-video-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.skeleton-video-thumb {
    width: 160px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 0.5rem;
}
.skeleton-video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.skeleton-video-title  { height: 13px; width: 70%; }
.skeleton-video-sub    { height: 10px; width: 40%; }

/* ===== СЕЗОНЫ И СЕРИИ ===== */

.seasons-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.season-tab {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.18s;
}

.season-tab:hover {
    background: rgba(255,255,255,0.09);
    color: rgba(255,255,255,0.9);
}

.season-tab.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: white;
    font-weight: 600;
}

.season-tab-progress {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.06);
    border-radius: 9999px;
    padding: 0.05rem 0.4rem;
}

.season-tab-progress.done {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
}

.season-panel {
    display: none;
}

.season-panel.active {
    display: block;
}

.season-panel-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.season-watch-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 0.875rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0.5rem;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.season-watch-all-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
    color: #e5e7eb;
}

.season-watch-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.episode-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.18s;
    user-select: none;
}

.episode-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.13);
    transform: translateY(-1px);
}

.episode-card.watched {
    background: rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.2);
}

.episode-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

.episode-card.upcoming {
    opacity: 0.55;
    cursor: default;
    border-style: dashed;
    border-color: rgba(255,255,255,0.08);
}

.episode-card.upcoming:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.08);
    transform: none;
}

.episode-card.upcoming .episode-num {
    background: rgba(255,255,255,0.04);
}

.episode-card.upcoming .episode-check {
    color: rgba(255,255,255,0.2);
    font-size: 0.95rem;
}

.episode-title--unknown {
    color: rgba(255,255,255,0.35);
    font-weight: 400;
    font-style: italic;
}

.episode-date--unknown {
    color: rgba(255,255,255,0.2);
    font-style: italic;
}

.episode-soon-badge {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #facc15;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 9999px;
    padding: 0.05rem 0.4rem;
    vertical-align: middle;
    letter-spacing: 0.02em;
}

.episode-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin-top: 0.1rem;
}

.episode-card.watched .episode-num {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.episode-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.episode-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    line-height: 1.3;
}

.episode-title-en {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
}

.episode-date {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    margin-top: 0.15rem;
}

.episode-date i {
    margin-right: 0.2rem;
}

.episode-synopsis {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.4;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.episode-check {
    flex-shrink: 0;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.15);
    margin-top: 0.1rem;
    transition: color 0.18s;
}

.episode-card.watched .episode-check {
    color: #4ade80;
}

/* ── Greeting quote ──────────────────────────────────────── */
.greeting-quote {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.35);
    max-width: 520px;
    line-height: 1.5;
    min-height: 1.3em;
    text-align: center;
    display: flex;
    align-items: center;
}

.greeting-quote--typing::after {
    content: '|';
    color: rgba(255,255,255,0.4);
    animation: quote-cursor 0.6s step-end infinite;
}

@keyframes quote-cursor {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.greeting-quote-author {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
    margin-top: 0.4rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.greeting-quote-author--visible {
    opacity: 1;
}

/* ── Widgets row ──────────────────────────────────────────── */
.widgets-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 700px) {
    .widgets-row { grid-template-columns: 1fr; }
}

/* Film of the day widget */
.widget-film-day {
    display: flex;
    gap: 1.1rem;
    align-items: stretch;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 1.25rem;
    padding: 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
    overflow: hidden;
    align-items: center;
    position: relative;
}

.widget-film-day::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(251,146,60,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.widget-film-day:hover {
    border-color: rgba(251,146,60,0.4);
    transform: translateY(-2px);
}

.widget-film-day__poster {
    width: 72px;
    min-width: 72px;
    border-radius: 0.6rem;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.widget-film-day__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.widget-film-day__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fb923c;
    font-weight: 700;
}

.widget-film-day__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.widget-film-day__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
}

.widget-film-day__rating {
    color: #facc15;
    font-weight: 600;
}

.widget-film-day__desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.45;
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

/* Quote widget */
.widget-quote {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 1.25rem;
    padding: 1.4rem 1.4rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.widget-quote::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139,92,246,0.07) 0%, transparent 60%);
    pointer-events: none;
}

.widget-quote__icon {
    font-size: 1.8rem;
    color: rgba(139,92,246,0.5);
    line-height: 1;
}

.widget-quote__text {
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    flex: 1;
}

.widget-quote__author {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
}

.widget-quote__date {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.1rem;
}

/* ── Continue watching ────────────────────────────────────── */
.continue-watching-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.continue-card-wrap {
    position: relative;
}

.continue-card-wrap:hover .continue-remove-btn {
    opacity: 1;
    pointer-events: auto;
}

.continue-remove-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 10;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.75);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.continue-remove-btn:hover {
    background: rgba(239,68,68,0.85);
    color: #fff;
}

.continue-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s;
}

.continue-card:hover {
    transform: translateY(-4px);
}

.continue-poster-wrap {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: rgba(255,255,255,0.05);
}

.continue-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.continue-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 2rem;
}

.continue-ep-badge {
    position: absolute;
    bottom: 0.4rem;
    right: 0.4rem;
    background: rgba(0,0,0,0.75);
    border-radius: 0.4rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #c084fc;
    line-height: 1.4;
}

.continue-ep-badge span {
    font-weight: 400;
    color: rgba(255,255,255,0.5);
}

.continue-info {
    padding: 7px;
}
main .continue-card {
  border-radius: 0.75rem;
}

.continue-title {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.continue-year {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.15rem;
}

/* ── Quiz catalog ─────────────────────────────────────────── */
.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.quiz-catalog-card {
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 1.25rem;
    padding: 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}

.quiz-catalog-card:hover {
    border-color: rgba(168,85,247,0.5);
    transform: translateY(-3px);
}

.quiz-catalog-poster {
    position: relative;
    flex-shrink: 0;
    width: 72px;
}

.quiz-catalog-poster img {
    width: 72px;
    border-radius: 0.6rem;
    object-fit: cover;
    display: block;
}

.quiz-catalog-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 1.4rem;
    line-height: 1;
}

.quiz-catalog-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.quiz-catalog-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.quiz-catalog-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.quiz-catalog-meta {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    margin-top: 0.15rem;
}

.quiz-diff {
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 600;
}

.quiz-diff--easy   { background: rgba(74,222,128,0.15); color: #4ade80; }
.quiz-diff--medium { background: rgba(250,204,21,0.15);  color: #facc15; }
.quiz-diff--hard   { background: rgba(248,113,113,0.15); color: #f87171; }

.quiz-catalog-play {
    font-size: 0.78rem;
    color: #a855f7;
    font-weight: 600;
    margin-top: auto;
    padding-top: 0.3rem;
}

/* ── Quiz series poster ───────────────────────────────────── */
.quiz-series-poster {
    width: 90px;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.quiz-series-poster img {
    width: 100%;
    display: block;
}

/* ── Quiz progress ────────────────────────────────────────── */
.quiz-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}

.quiz-score-live {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.quiz-progress-bar-bg {
    height: 5px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #7c3aed);
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* ── Quiz question card ───────────────────────────────────── */
.quiz-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quiz-opt-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: left;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    font-size: 0.9rem;
    width: 100%;
}

.quiz-opt-btn:hover:not(:disabled) {
    background: rgba(168,85,247,0.12);
    border-color: rgba(168,85,247,0.4);
    transform: translateX(3px);
}

.quiz-opt-letter {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
}

.quiz-opt-text {
    flex: 1;
}

.quiz-opt-btn.quiz-opt--correct {
    background: rgba(74,222,128,0.15);
    border-color: #4ade80;
}

.quiz-opt-btn.quiz-opt--correct .quiz-opt-letter {
    background: #4ade80;
    color: #000;
}

.quiz-opt-btn.quiz-opt--wrong {
    background: rgba(248,113,113,0.15);
    border-color: #f87171;
}

.quiz-opt-btn.quiz-opt--wrong .quiz-opt-letter {
    background: #f87171;
    color: #000;
}

.quiz-opt-btn.quiz-opt--dim {
    opacity: 0.4;
}

@keyframes pulse-correct {
    0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(74,222,128,0); }
    100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

@keyframes pulse-wrong {
    0%   { box-shadow: 0 0 0 0 rgba(248,113,113,0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(248,113,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); }
}

.quiz-opt--pulse-correct { animation: pulse-correct 0.5s ease; }
.quiz-opt--pulse-wrong   { animation: pulse-wrong   0.5s ease; }

/* ── Quiz fact ────────────────────────────────────────────── */
.quiz-fact {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.5;
    border: 1px solid;
    background: rgba(255,255,255,0.03);
}

.quiz-fact--correct {
    border-color: rgba(74,222,128,0.3);
    color: rgba(255,255,255,0.7);
}

.quiz-fact--wrong {
    border-color: rgba(248,113,113,0.3);
    color: rgba(255,255,255,0.7);
}

/* ── Quiz result ──────────────────────────────────────────── */
.quiz-result-emoji {
    font-size: 4rem;
    line-height: 1;
}

.quiz-result-score {
    font-size: 3rem;
    font-weight: 800;
    margin: 0.5rem 0 0.75rem;
}

.quiz-result-bar-wrap {
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 99px;
    overflow: hidden;
    max-width: 280px;
    margin: 0 auto 0.5rem;
}

.quiz-result-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.8s cubic-bezier(.4,0,.2,1);
}

/* ── Quiz answers review ──────────────────────────────────── */
.quiz-answers-review {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.quiz-review-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
}

.quiz-review--ok   { background: rgba(74,222,128,0.07); }
.quiz-review--fail { background: rgba(248,113,113,0.07); }

.quiz-review-icon {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.85rem;
}

.quiz-review--ok   .quiz-review-icon { color: #4ade80; }
.quiz-review--fail .quiz-review-icon { color: #f87171; }

.quiz-review-q {
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
}

.quiz-review-ans {
    color: #4ade80;
    margin-top: 0.2rem;
    font-size: 0.75rem;
}

.quiz-q-counter {
    font-size: 0.8rem;
}

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(.4,0,.2,1), transform 0.55s cubic-bezier(.4,0,.2,1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* stagger for grid children */
.movies-grid .movie-card,
.continue-watching-grid .continue-card-wrap {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1), transform 0.4s cubic-bezier(.4,0,.2,1);
    will-change: opacity, transform;
}

.movies-grid.grid-revealed .movie-card,
.continue-watching-grid.grid-revealed .continue-card-wrap {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── Card shimmer on hover ─────────────────────────────────── */
.movie-card-inner {
    overflow: hidden;
}

.movie-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255,255,255,0.055) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    background-position: -100% 0;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    border-radius: inherit;
}

.movie-card:hover .movie-card-inner::after {
    opacity: 1;
    animation: card-shimmer 0.6s ease-out forwards;
}

@keyframes card-shimmer {
    from { background-position: -100% 0; }
    to   { background-position: 180% 0; }
}

/* ── Section title slide-in ───────────────────────────────── */
.section-title {
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: 1px;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

.section-title.title-revealed::after {
    width: 100%;
}

.watch-party-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #1f2937;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    border: 1px solid #374151;
}
.watch-party-header {
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid #374151;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}
.watch-party-close {
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 20px;
}
.watch-party-body { padding: 12px; }
.watch-party-room { margin-bottom: 12px; }
.watch-party-copy { background: none; border: 1px solid #3b82f6; color: #60a5fa; padding: 2px 8px; border-radius: 6px; margin-left: 8px; cursor: pointer; }
.watch-party-users { margin-bottom: 12px; color: #9ca3af; }
.watch-party-host-badge { background: #fbbf24; color: #000; padding: 4px 8px; border-radius: 6px; display: inline-block; margin-bottom: 12px; font-size: 12px; }
.watch-party-chat { margin-top: 12px; }
.watch-party-chat-messages { height: 150px; overflow-y: auto; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 8px; font-size: 12px; margin-bottom: 8px; }
.watch-party-chat-input { width: 100%; padding: 8px; background: #374151; border: none; border-radius: 8px; color: white; }

/* ── Action buttons subtle pulse on idle ─────────────────── */
@keyframes btn-idle-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168,85,247,0); }
    50%       { box-shadow: 0 0 18px 2px rgba(168,85,247,0.18); }
}

.action-btn-purple {
    animation: btn-idle-glow 3.5s ease-in-out infinite;
}

/* ── Greeting block entrance ──────────────────────────────── */
.hero-entrance {
    animation: hero-drop 0.7s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes hero-drop {
    from { opacity: 0; transform: translateY(-18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal, .movies-grid .movie-card,
    .continue-watching-grid .continue-card-wrap,
    .movie-card-inner::after,
    .section-title::after,
    .hero-entrance { animation: none !important; transition: none !important; }
    .reveal, .movies-grid .movie-card,
    .continue-watching-grid .continue-card-wrap { opacity: 1; transform: none; }
}

/* ── Цифровые премьеры ──────────────────────────────────────── */
.dp-swiper { overflow: visible; }

.dp-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    border-radius: 50%;
    font-size: .5625rem;
    color: #fff;
    margin-right: .4rem;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Бейдж «Цифровой релиз» поверх постера */
.dp-badge {
    position: absolute;
    bottom: .5rem;
    left: .5rem;
    background: linear-gradient(90deg, #7c3aed, #2563eb);
    color: #fff;
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .2rem .5rem;
    border-radius: .375rem;
    z-index: 41;
}

/* Кнопки навигации слайдера */
.dp-prev,
.dp-next {
    width: 36px !important;
    height: 36px !important;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    top: 33% !important;
    border: 1px solid rgba(255,255,255,.12);
    transition: background .2s;
}

.dp-prev:hover, .dp-next:hover { background: rgba(255,255,255,.2); }

.dp-prev::after,
.dp-next::after { font-size: .75rem !important; color: #fff; font-weight: 700; }

.dp-prev { left: -12px !important; }
.dp-next { right: -12px !important; }

@media (max-width: 640px) {
    .dp-prev { left: 0 !important; }
    .dp-next { right: 0 !important; }
}

/* ===== ФУТЕР ===== */
.site-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 1.5rem 1.5rem;
    margin-top: 2rem;
}

.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
    flex-shrink: 0;
}

.site-footer-logo img {
    width: 22px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.site-footer-logo:hover {
    color: rgba(255,255,255,0.8);
}

.site-footer-logo:hover img {
    opacity: 0.9;
}

.site-footer-copy {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
    flex: 1;
}

.site-footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.site-footer-link {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}

.site-footer-link:hover {
    color: rgba(255,255,255,0.6);
}

.site-footer-sep {
    color: rgba(255,255,255,0.15);
    font-size: 0.75rem;
}

@media (max-width: 640px) {
    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }
    .site-footer-right {
        margin-left: 0;
    }
    .site-footer-copy {
        flex: none;
    }
}

/* ── Glow background animation ── */
.glow-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 15% 20%, rgba(10, 63, 255, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 50% 45% at 85% 75%, rgba(245, 95, 10, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 40% 35% at 60% 10%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
}

.ball { display: none; }


/* ── Collections ─────────────────────────────────────────────────────────── */

/* Сетка карточек на /collections */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* Сетка в профиле (меньше) */
.profile-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* Карточка коллекции */
.collection-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.collection-card:hover {
    transform: translateY(-3px);
    border-color: rgba(139,92,246,0.4);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Обложка карточки */
.collection-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,0.04);
    flex-shrink: 0;
}

/* Мозаика из постеров */
.collection-mosaic {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.collection-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Если один постер — на всю обложку */
.collection-mosaic[style*="--count:1"] {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
/* Если два — в ряд */
.collection-mosaic[style*="--count:2"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}
/* Если три — первый широкий */
.collection-mosaic[style*="--count:3"] img:first-child {
    grid-column: span 2;
}

/* Заглушка без постеров */
.collection-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(59,130,246,0.15));
}
.collection-cover-empty span {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}

/* Тело карточки */
.collection-card-body {
    padding: .75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.collection-card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.collection-card-desc {
    font-size: .75rem;
    color: #9ca3af;
    line-height: 1.4;
}
.collection-card-meta {
    margin-top: auto;
    padding-top: .5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.collection-card-author {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}
.collection-card-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.collection-card-author span {
    font-size: .7rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.collection-card-stats {
    display: flex;
    gap: .6rem;
    font-size: .7rem;
    color: #6b7280;
    flex-shrink: 0;
}
.collection-card-stats i { margin-right: .2rem; }

/* ── Страница одной коллекции ── */
.collection-cover-large {
    width: 160px;
    height: 100px;
    border-radius: .75rem;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.collection-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.collection-cover-mosaic {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.collection-cover-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.collection-cover-title-fallback {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .5rem;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    font-size: .85rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(59,130,246,0.15));
}

/* Сетка фильмов внутри коллекции */
.collection-films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}
.collection-film-card {
    position: relative;
    border-radius: .75rem;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 0.2s, border-color 0.2s;
}
.collection-film-card:hover { transform: translateY(-2px); border-color: rgba(139,92,246,0.3); }
.collection-film-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}
.collection-film-poster--empty {
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-size: 2rem;
    background: rgba(255,255,255,0.03);
}
.collection-film-title {
    padding: .4rem .5rem;
    font-size: .7rem;
    color: #d1d5db;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.collection-film-remove {
    position: absolute;
    top: .3rem;
    right: .3rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #f87171;
    font-size: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.collection-film-card:hover .collection-film-remove { opacity: 1; }

/* Кнопки подписки */
.btn-subscribe {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.25rem;
    border-radius: .5rem;
    border: 1px solid rgba(139,92,246,0.5);
    background: rgba(139,92,246,0.1);
    color: #a78bfa;
    font-size: .875rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.btn-subscribe:hover { background: rgba(139,92,246,0.2); border-color: #a78bfa; }
.btn-subscribed {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.25rem;
    border-radius: .5rem;
    border: 1px solid rgba(139,92,246,0.3);
    background: rgba(139,92,246,0.15);
    color: #c4b5fd;
    font-size: .875rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-subscribed:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }

/* Попап выбора коллекции на странице фильма */
.collection-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .75rem;
    border-radius: .5rem;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    transition: background 0.15s;
}
.collection-picker-item.has-film {
    border-color: rgba(139,92,246,0.3);
    background: rgba(139,92,246,0.07);
}
.collection-picker-title {
    font-size: .875rem;
    color: #d1d5db;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.collection-picker-btn {
    flex-shrink: 0;
    padding: .3rem .75rem;
    border-radius: .4rem;
    font-size: .75rem;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.collection-picker-btn:hover { background: rgba(255,255,255,0.12); color: #f3f4f6; }
.collection-picker-btn.in {
    border-color: rgba(139,92,246,0.5);
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
}
.collection-picker-btn.in:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); color: #fca5a5; }

/* Инпут */
.glass-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: .5rem;
    padding: .5rem .75rem;
    color: #f3f4f6;
    font-size: .875rem;
    transition: border-color 0.15s;
}
.glass-input:focus {
    outline: none;
    border-color: rgba(139,92,246,0.5);
}
textarea.glass-input { resize: vertical; }

/* ── Generic modal ───────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-box {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f3f4f6;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.07);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.14); color: #f3f4f6; }

/* Кнопка удаления поверх стандартной карточки фильма в коллекции.
   .movie-card:hover поднимает карточку на translateY(-8px) — курсор при
   наведении на нижний край карточки оказывался за её пределами (там, где
   она была до сдвига), hover слетал, карточка возвращалась на место,
   курсор снова попадал внутрь — зацикленное дрожание (постер зумился
   туда-сюда, крестик мигал), и клик по кнопке становился лотереей. Здесь
   эффект подъёма отключаем — крестик остаётся стабильным. */
.collection-film-wrap {
    position: relative;
}
.collection-film-wrap .movie-card:hover {
    transform: none;
}
.collection-film-wrap .collection-film-remove {
    position: absolute;
    top: .4rem;
    right: .4rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.75);
    border: none;
    color: #f87171;
    font-size: .7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
}
.collection-film-wrap:hover .collection-film-remove { opacity: 1; }

/* ── Custom file input ───────────────────────────────────────────────────── */
.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.file-input-label {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1rem;
    border-radius: .5rem;
    border: 1px dashed rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
    color: #9ca3af;
    font-size: .875rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    width: 100%;
}
.file-input-label:hover {
    border-color: rgba(139,92,246,0.5);
    background: rgba(139,92,246,0.07);
    color: #c4b5fd;
}
.file-input-label i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Collection film search modal ────────────────────────────────────────── */
.col-search-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .6rem;
    border-radius: .5rem;
    transition: background 0.15s;
}
.col-search-item:hover { background: rgba(255,255,255,0.05); }
.col-search-item img {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: .35rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}
.col-search-info {
    flex: 1;
    min-width: 0;
}
.col-search-title {
    font-size: .875rem;
    color: #f3f4f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.col-search-meta {
    font-size: .75rem;
    color: #6b7280;
    margin-top: .15rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.col-search-rating {
    color: #fbbf24;
    font-weight: 600;
}
.col-search-add-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-size: .8rem;
}
.col-search-add-btn:hover:not(:disabled) {
    background: rgba(139,92,246,0.2);
    border-color: rgba(139,92,246,0.5);
    color: #a78bfa;
}
.col-search-add-btn:disabled { cursor: default; }

/* ── Лента активности ───────────────────────────────────────────── */
.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Бесконечный скролл (assets/js/activity-feed.js) — sentinel пустой,
   наблюдается через IntersectionObserver; loading/end видны по мере
   догрузки следующих порций. */
.activity-feed-sentinel { height: 1px; }
.activity-feed-loading { display: flex; justify-content: center; padding: 1.25rem 0; color: #8b7cf6; font-size: 1.1rem; }
.activity-feed-end { text-align: center; color: #6b7280; font-size: 0.85rem; padding: 1rem 0; }
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 16px;
    transition: background 0.15s;
    position: relative;
}
.activity-item:hover { background: rgba(255,255,255,0.07); }

/* Левый цветной акцент */
.activity-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 14px 0 0 14px;
}
.activity-item--review::before        { background: #fbbf24; }
.activity-item--collection_created::before { background: #8b5cf6; }
.activity-item--collection_sub::before { background: #ec4899; }
.activity-item--quiz_streak::before   { background: #f97316; }

.activity-avatar-link { flex-shrink: 0; }
.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}
.activity-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.activity-meta {
    font-size: 0.9rem;
    line-height: 1.4;
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #d1d5db;
}
.activity-username {
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}
.activity-username:hover { text-decoration: underline; }
.activity-action { color: #9ca3af; }
.activity-link {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 500;
}
.activity-link:hover { text-decoration: underline; }
.activity-highlight {
    color: #fb923c;
    font-weight: 600;
}
.activity-preview {
    font-size: 0.82rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}
/* Компактная версия для карточек на главной — одна строка с многоточием */
.activity-preview--compact {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-read-more-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 0.35rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}
.activity-read-more-btn:hover {
    color: #60a5fa;
}
.activity-rating {
    font-size: 0.8rem;
    color: #fbbf24;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.activity-time {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}
.activity-icon-wrap {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.activity-type-icon { font-size: 1.1rem; }
.activity-icon--review        { color: #fbbf24; }
.activity-icon--collection    { color: #8b5cf6; }
.activity-icon--sub           { color: #ec4899; }
.activity-icon--streak        { color: #f97316; }
.activity-icon--wall_post     { color: #60a5fa; }

.activity-wall-attachment {
    max-width: 500px;
    max-height: 500px;
    border-radius: 0.625rem;
    margin-top: 0.5rem;
    display: block;
    object-fit: cover;
}
/* Видео — не картинка, cover его обрезал бы (видна только середина кадра,
   тот же обрезанный вид сохранялся и в полноэкранном режиме, т.к. video
   наследует те же object-fit/object-position). Тот же лимит 500px, что и у
   .activity-wall-attachment, чтобы горизонтальные ролики не разъезжались
   на всю ширину карточки — но с width:auto, иначе <video> растягивается по
   умолчанию на всю доступную ширину, и вертикальные ролики (формат
   reels/сторис) вписываются по высоте с широкими чёрными полями по бокам;
   ширина сама подстраивается под реальные пропорции файла. */
.activity-wall-video {
    max-width: max-content;
    max-height: 360px;
    width: auto;
    border-radius: 0.625rem;
    margin-top: 0.5rem;
    display: block;
}
.activity-preview-deleted {
    font-style: italic;
    color: #6b7280;
}
.activity-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-top: 0.4rem;
    transition: color 0.15s;
}
.activity-like-btn:hover { color: #f87171; }
.activity-like-btn.liked { color: #ef4444; }
.activity-like-btn i { font-size: 0.85rem; }

/* Постер на странице /activity */
.activity-poster-link { flex-shrink: 0; }
.activity-film-poster {
    width: 44px;
    height: 62px;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.activity-film-poster:hover { opacity: 1; }

/* Пагинация */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.pagination-btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.pagination-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.pagination-info { font-size: 0.85rem; color: #6b7280; }

/* Студии (poiskkino /v1.5/studio) */
.studio-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 14px;
    position: relative;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.studio-badge:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
.studio-badge-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.studio-name {
    font-size: 0.8rem;
    color: #e5e7eb;
    line-height: 1.2;
}
.studio-type {
    font-size: 0.68rem;
    line-height: 1.2;
}
.studio-type.studio-type--production { color: #93c5fd; }
.studio-type.studio-type--distribution { color: #fbbf24; }
.studio-type.studio-type--other { color: #9ca3af; }

/* Риск-бейдж — студия, за чей контент реально банят на Twitch (DMCA) */
.studio-badge--risky {
    border-color: rgba(239,68,68,0.45);
    background: rgba(239,68,68,0.08);
}
.studio-risk-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(239,68,68,0.2);
    color: #f87171;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
    cursor: help;
}
.studio-risk-icon .studio-risk-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1f2937;
    border: 1px solid rgba(239,68,68,0.3);
    color: #fecaca;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 8px;
    width: max-content;
    max-width: 220px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    z-index: 20;
}
.studio-risk-icon .studio-risk-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}
.studio-risk-icon:hover .studio-risk-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Страница студии (studio.php) ───────────────────────────────────── */
.studio-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    border: 1px solid rgba(255,255,255,0.08);
}
.studio-hero-poster-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}
.studio-hero-poster {
    background-size: cover;
    background-position: center;
    filter: saturate(0.7) brightness(0.55);
}
.studio-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,15,0.35) 0%, rgba(10,10,15,0.75) 60%, rgba(10,10,15,0.95) 100%);
}
.studio-hero--risky {
    border-color: rgba(239,68,68,0.4);
}
.studio-hero-content {
    position: relative;
    z-index: 1;
    padding: 32px;
    width: 100%;
}
.studio-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #93c5fd;
    margin-bottom: 14px;
}
.studio-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 14px;
}
.studio-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.studio-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #e5e7eb;
}
.studio-hero-badge--rating {
    color: #fde047;
    border-color: rgba(253,224,71,0.3);
    background: rgba(253,224,71,0.1);
}
.studio-hero-badge--risky {
    color: #fca5a5;
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.12);
}
@media (max-width: 640px) {
    .studio-hero-title { font-size: 1.6rem; }
    .studio-hero-content { padding: 20px; }
}

/* Видео (IMDB) */
.videos-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.videos-scroll::-webkit-scrollbar { height: 4px; }
.videos-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.video-card {
    flex-shrink: 0;
    width: 220px;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s, border-color 0.2s;
}
.video-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); }

.video-card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #111;
}
.video-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 1.8rem;
    color: #fff;
}
.video-card:hover .video-card-play { opacity: 1; }

.video-card-duration {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 0.72rem;
    color: #fff;
    background: rgba(0,0,0,0.65);
    padding: 1px 5px;
    border-radius: 4px;
}
.video-card-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.video-card-type {
    font-size: 0.68rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.video-card-name {
    font-size: 0.8rem;
    color: #d1d5db;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Картинки из фильма ── */
.film-images-swiper { width: 100%; padding-bottom: 4px !important; }
.film-images-swiper .swiper-slide { width: 280px; }
.film-images-swiper .swiper-button-prev,
.film-images-swiper .swiper-button-next {
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.film-images-swiper .swiper-button-prev:hover,
.film-images-swiper .swiper-button-next:hover { background: rgba(255,255,255,0.16); }
.film-images-swiper .swiper-button-prev::after,
.film-images-swiper .swiper-button-next::after {
    font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.8);
}
.film-image-card {
    display: block; width: 280px; aspect-ratio: 16 / 9;
    border-radius: 12px; overflow: hidden; cursor: pointer;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.2s, transform 0.2s;
}
.film-image-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-2px); }
.film-image-card img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.4s; }
.film-image-card img.loaded { opacity: 1; }

/* ── Lightbox ── */
#filmLightbox {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.92);
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
#filmLightbox.open { display: flex; }
#filmLightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 8px; }
#filmLightbox .lb-close {
    position: absolute; top: 20px; right: 24px;
    color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
    opacity: 0.7; transition: opacity 0.2s;
}
#filmLightbox .lb-close:hover { opacity: 1; }
#filmLightbox .lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 2.5rem; cursor: pointer; padding: 0 1rem;
    opacity: 0.6; transition: opacity 0.2s; user-select: none;
}
#filmLightbox .lb-nav:hover { opacity: 1; }
#filmLightbox .lb-prev { left: 8px; }
#filmLightbox .lb-next { right: 8px; }
@media (max-width: 640px) {
    .film-images-swiper .swiper-slide,
    .film-image-card { width: 220px; }
}

/* ── Треды и реакции рецензий ── */
.review-reply-btn, .review-react-btn {
  background: none; border: none; color: #9ca3af; cursor: pointer;
  font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.5rem; border-radius: 0.4rem; transition: color 0.15s, background 0.15s;
}
.review-reply-btn:hover, .review-react-btn:hover { color: #c4b5fd; background: rgba(139,92,246,0.1); }

.rt-emote { height: 18px; width: auto; vertical-align: middle; }

.review-reactions, .rt-reactions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.review-reactions:empty, .rt-reactions:empty { display: none; }

/* Лента активности: лайк → уже поставленные реакции → кнопка "добавить
   реакцию" — всё в одном горизонтальном ряду вместо отдельных строк
   (см. renderActivityItem() в app/activity.php). Реакции здесь встроены
   в общий flex-ряд, поэтому свой margin-top им не нужен — только у
   .review-reactions внутри movie-detail.php/reviews.php, где блок
   реакций остаётся отдельной строкой под кнопками. */
.review-reactions-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}
.review-reactions-row .activity-like-btn { margin-top: 0; }
.review-reactions-row .review-reactions { margin-top: 0; gap: 0.35rem; }
.review-reactions-row .review-react-btn { padding: 0.25rem 0.4rem; }
.rt-react-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem; padding: 0.1rem 0.5rem; cursor: pointer; font-size: 0.8rem;
  color: #d1d5db; transition: all 0.15s;
}
.rt-react-chip:hover { background: rgba(139,92,246,0.15); }
.rt-react-chip.mine { background: rgba(139,92,246,0.25); border-color: rgba(139,92,246,0.5); color: #c4b5fd; }

/* Палитра выбора реакции */
.rt-palette {
  position: absolute; z-index: 9999; display: flex; gap: 0.25rem;
  background: rgba(15,12,25,0.98); border: 1px solid rgba(179,157,219,0.3);
  border-radius: 0.625rem; padding: 0.4rem; box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
}
.rt-palette button { background: none; border: none; cursor: pointer; padding: 0.25rem; border-radius: 0.4rem; transition: background 0.1s; }
.rt-palette button:hover { background: rgba(139,92,246,0.25); }
.rt-palette .rt-emote { height: 26px; }

/* Тред */
.review-thread { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(255,255,255,0.07); }
.rt-loading, .rt-empty { color: #6b7280; font-size: 0.85rem; padding: 0.5rem 0; }
.rt-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }
.rt-reply { display: flex; gap: 0.625rem; }
.rt-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rt-body { flex: 1; min-width: 0; background: rgba(255,255,255,0.03); border-radius: 0.625rem; padding: 0.5rem 0.75rem; }
.rt-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.2rem; }
.rt-name { font-size: 0.82rem; font-weight: 600; color: #c4b5fd; text-decoration: none; }
.rt-name:hover { text-decoration: underline; }
.rt-date { font-size: 0.7rem; color: #6b7280; }
.rt-text { font-size: 0.875rem; color: #d1d5db; line-height: 1.5; word-break: break-word; }
.rt-reply-actions { display: flex; gap: 0.25rem; margin-top: 0.3rem; }
.rt-mini-btn { background: none; border: none; color: #6b7280; cursor: pointer; font-size: 0.75rem; padding: 0.15rem 0.35rem; border-radius: 0.3rem; transition: color 0.15s; }
.rt-mini-btn:hover { color: #c4b5fd; }
.rt-mini-btn.rt-del:hover { color: #f87171; }
.wall-reply-like-btn:hover,.wall-reply-like-btn.liked { color: #f43f5e; }
.rt-form { display: flex; gap: 0.5rem; }
.rt-input { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.5rem; color: #fff; padding: 0.45rem 0.7rem; font-size: 0.85rem; outline: none; }
.rt-input:focus { border-color: rgba(139,92,246,0.5); }
.rt-send { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; border: none; border-radius: 0.5rem; padding: 0.45rem 1rem; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.rt-send:hover { filter: brightness(1.1); }

/* Ответ на ответ — один уровень вложенности (review_replies.parent_id).
   Визуально: небольшой отступ + пометка "в ответ @имя" над текстом, а не
   полноценное вложенное дерево — вся ветка остаётся в общем списке треда. */
.rt-reply--nested { margin-left: 2.25rem; }
.rt-reply-to { font-size: 0.72rem; color: #8b7cf6; display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.2rem; }
.rt-reply-to i { font-size: 0.65rem; }

/* Картинка/граффити внутри ответа на пост стены — переиспользуется тем же
   классом .wall-reply-img, что и на самой стене (profile.php), но там он
   объявлен только в <style> profile.php, а wall-thread.js рендерит те же
   реплаи ещё и в ленте активности (главная, /activity) — эти страницы
   profile.php не подключают, стиль был бы не виден. Дублируем правило
   здесь, в глобальном CSS. */
.wall-reply-img { margin-top: .5rem; border-radius: .375rem; max-width: 140px; max-height: 140px; object-fit: cover; display: block; cursor: pointer; }

/* Тред ответов на пост стены в ленте активности — виден сразу под постом
   (без сворачивания/кнопки "Ответить", см. wall-thread.js), поэтому нужен
   заметный отступ сверху, отделяющий его от лайка/подписи "Нравится...". */
.wall-thread { margin-top: .75rem; }

/* Подсказка "Ответ для @имя" в форме — появляется когда отвечаешь не на
   саму рецензию, а на конкретный ответ внутри треда (_showReplyForm). */
.rt-replying-hint {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.3);
  border-radius: 0.5rem; padding: 0.35rem 0.6rem; margin-bottom: 0.5rem;
  font-size: 0.78rem; color: #c4b5fd; width: 100%;
}
.rt-replying-hint button { background: none; border: none; color: #9ca3af; cursor: pointer; padding: 0.1rem 0.3rem; }
.rt-replying-hint button:hover { color: #f87171; }
.rt-form { flex-wrap: wrap; }

/* Поповер "кто поставил реакцию" */
.rt-users-pop {
  position: absolute; z-index: 10000; max-width: 240px;
  background: rgba(15,12,25,0.98); border: 1px solid rgba(179,157,219,0.3);
  border-radius: 0.5rem; padding: 0.45rem 0.7rem; font-size: 0.8rem; color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6); backdrop-filter: blur(8px); line-height: 1.4;
}
.rt-react-chip { position: relative; }

/* AI Analysis Modal Styles */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes textFlow {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
  }
}

#aiAnalysisModal {
  animation: modalFadeIn 0.3s ease-out;
}

.ai-modal-content {
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ai-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1rem;
}

.ai-loading-text {
  font-size: 1rem;
  color: #9ca3af;
  text-align: center;
}

.ai-analysis-content {
  padding: 2rem;
  line-height: 1.8;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.ai-analysis-content p {
  margin-bottom: 1rem;
}

.ai-analysis-content p:last-child {
  margin-bottom: 0;
}

/* Клавиатурная навигация в поиске хедера */
.search-drop-item.kb-active { background: rgba(255,255,255,0.07); }
.search-drop-history-link.kb-active { background: rgba(255,255,255,0.05); }

/* ========== ПОИСК НА ГЛАВНОЙ ========== */
.home-search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 60;
}

.home-search-form {
  width: min(580px, 100%);
}

.home-search-icon {
  position: absolute;
  left: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #6b7280;
  pointer-events: none;
  transition: color 0.2s;
}

.home-search-form:focus-within .home-search-icon {
  color: #a78bfa;
}

.home-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.95rem 6.5rem 0.95rem 3.1rem;
  font-size: 0.95rem;
  color: #fff;
  outline: none;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.home-search-input::placeholder {
  color: #6b7280;
}

.home-search-input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-search-key {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  color: #6b7280;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 0.28rem 0.55rem;
  pointer-events: none;
  transition: opacity 0.2s;
}

.home-search-form:focus-within .home-search-key {
  opacity: 0.5;
}

@media (max-width: 640px) {
  .home-search-key { display: none; }
  .home-search-input { padding-right: 1.2rem; }
}

/* ========== SHIMMER-ПЛЕЙСХОЛДЕР ДЛЯ КАРТИНОК ========== */
.img-shimmer-wrap {
  position: relative;
  overflow: hidden;
  /* background: rgba(255, 255, 255, 0.04); */
}

.img-shimmer-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
    pointer-events: none; /* оверлей никогда не должен перехватывать клики */
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.07) 40%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.07) 60%,
    rgba(255, 255, 255, 0) 80%
  );
  background-size: 200% 100%;
  animation: imgShimmer 1.4s ease-in-out infinite;
}

@keyframes imgShimmer {
  0%   { background-position: 150% 0; }
  100% { background-position: -150% 0; }
}

/* Пока не загрузилось — прячем саму картинку, показываем shimmer */
img.img-shimmer-loading {
  opacity: 0;
}

/* Когда загрузилось — проявляем. Раньше здесь был свой
   transition: opacity 0.45s ease — но shimmer навешивается ГЛОБАЛЬНО на
   любую <img> сайта (img-shimmer.js), а transition — shorthand-свойство:
   объявление transition: opacity ... у элемента ПОЛНОСТЬЮ заменяет любой
   ранее заданный transition, включая transform у постеров карточек
   (.premiere-poster img, .movie-poster img задают transition: transform
   ... для hover-зума). Из-за этого зум по наведению переставал быть
   плавным сразу после того, как картинка догружалась. Раз у shimmer нет
   способа узнать про transform каждой конкретной картинки — здесь
   сознательно НЕТ transition вообще, проявление мгновенное вместо fade-in;
   это безопаснее, чем ломать hover-эффекты по всему сайту.
   Плавный fade-in при желании стоит делать через @keyframes-анимацию — она
   не трогает свойство transition и не конфликтует ни с чем. */
img.img-shimmer-done {
  opacity: 1;
}

/* Убираем shimmer после загрузки — полностью, чтобы оверлей не мешал кликам */
.img-shimmer-wrap.img-shimmer-ready::before {
  animation: none;
  opacity: 0;
  display: none;
  content: none;
}

@media (prefers-reduced-motion: reduce) {
  .img-shimmer-wrap::before { animation: none; }
}

/* ========== ФОН ИЗ ПОСТЕРОВ ЗА ПРИВЕТСТВИЕМ ========== */
/* Блок-герой на всю ширину страницы (лежит вне .max-w-7xl контейнера).
   overflow:hidden обрезает стену постеров по краям и по высоте блока.
   Верхний паддинг уводит контент из-под фикс-хедера (распорка pt-20 убрана). */
.hero-block {
  position: relative;
  width: 100%;
  padding: 6rem 0 10.5rem;
  overflow: hidden;
  isolation: isolate;
}

/* Внутренний контейнер центрирует контент (класс px-6 max-w-7xl mx-auto) */
.hero-block-inner {
  position: relative;
  z-index: 1;
}

.hero-poster-wall {
  position: absolute;
  inset: -8% -2% auto -2%;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 8px;
  transform: perspective(1300px) rotateX(18deg) scale(1.06);
  transform-origin: top center;
  opacity: 0.32;
  pointer-events: none;
  animation: heroWallFloat 40s ease-in-out infinite alternate;
}

@keyframes heroWallFloat {
  from { transform: perspective(1300px) rotateX(18deg) scale(1.06) translateY(0); }
  to   { transform: perspective(1300px) rotateX(18deg) scale(1.06) translateY(-24px); }
}

.hero-poster-cell {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.hero-poster-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Затемнение, чтобы приветствие читалось поверх постеров */
.hero-poster-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 78% at 50% 40%, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.6) 55%, transparent 100%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.55) 0%, transparent 20%, transparent 45%, #0a0a0a 88%, #0a0a0a 100%);
}

@media (prefers-reduced-motion: reduce) {
  .hero-poster-wall { animation: none; }
}

@media (max-width: 900px) {
  .hero-poster-wall { grid-template-columns: repeat(8, 1fr); opacity: 0.26; }
}

@media (max-width: 560px) {
  .hero-poster-wall { grid-template-columns: repeat(5, 1fr); opacity: 0.22; }
}

/* ===== Виджет "Онлайн" ===== */
.online-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9997;
  font-size: 0.875rem;
}

.online-widget-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #e5e7eb;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.online-widget-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(24, 24, 30, 0.92);
}

.online-widget-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
  flex-shrink: 0;
  animation: onlineWidgetPulse 2s ease-in-out infinite;
}

@keyframes onlineWidgetPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.online-widget-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f3f4f6;
}

.online-widget.invisible-active .online-widget-dot {
  background: #9ca3af;
  box-shadow: none;
  animation: none;
}

.online-widget-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 260px;
  max-height: 360px;
  background: rgba(18, 18, 22, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.online-widget-panel.open {
  display: flex;
}

.online-widget-panel-header {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d1d5db;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.online-widget-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 40px;
}

.online-widget-loading,
.online-widget-empty {
  padding: 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.8rem;
}

.online-widget-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.6rem;
  text-decoration: none;
  color: #e5e7eb;
  transition: background 0.15s;
}

.online-widget-user:hover {
  background: rgba(255, 255, 255, 0.06);
}

.online-widget-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.online-widget-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.05rem;
}

.online-widget-user-name {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-widget-user-activity {
  font-size: 0.72rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-widget-user-activity.is-idle {
  color: #6b7280;
}

.online-widget-user.is-me .online-widget-user-name {
  color: #a5b4fc;
}

.online-widget-user.is-me .online-widget-user-name::after {
  content: ' (вы)';
  color: #6b7280;
  font-weight: 400;
}

.online-widget-invisible-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  color: #9ca3af;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.online-widget-invisible-toggle:hover {
  color: #d1d5db;
}

.online-widget-invisible-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.online-widget-invisible-label i {
  color: #818cf8;
  font-size: 0.85rem;
}

/* Кастомный switch-переключатель */
.online-widget-switch {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 22px;
}

.online-widget-switch input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.online-widget-switch-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.online-widget-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
}

.online-widget-switch input[type="checkbox"]:checked ~ .online-widget-switch-track {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  border-color: rgba(129, 140, 248, 0.6);
}

.online-widget-switch input[type="checkbox"]:checked ~ .online-widget-switch-track .online-widget-switch-thumb {
  transform: translateX(16px);
  background: #fff;
}

.online-widget-switch input[type="checkbox"]:focus-visible ~ .online-widget-switch-track {
  outline: 2px solid rgba(129, 140, 248, 0.6);
  outline-offset: 2px;
}

.online-widget-switch input[type="checkbox"]:disabled ~ .online-widget-switch-track {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 768px) {
  .online-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .online-widget-panel {
    width: 220px;
  }
}

/* ===== Раздел "Стримеры" (как на Twitch) ===== */
.streamers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.streamer-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.streamer-card:hover {
  transform: translateY(-4px);
  border-color: rgba(145, 71, 255, 0.4);
}

.streamer-card-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #18181b;
  overflow: hidden;
}

.streamer-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.streamer-card-preview img.streamer-offline-avatar {
  object-fit: cover;
  transform: scale(1.4);
  filter: grayscale(0.5) brightness(0.45) blur(2px);
}

.streamer-live-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: #eb0400;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.streamer-live-badge i {
  font-size: 0.5rem;
}

.streamer-viewers {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.streamer-offline-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.streamer-card-info {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem;
}

.streamer-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.streamer-card-text {
  min-width: 0;
  flex: 1;
}

.streamer-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streamer-card-title {
  font-size: 0.8rem;
  color: #d1d5db;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.streamer-card-title-offline {
  color: #6b7280;
}

.streamer-card-game {
  font-size: 0.75rem;
  color: #9147ff;
  margin-top: 0.1rem;
}

.streamer-card.is-offline .streamer-card-preview {
  opacity: 0.85;
}

/* ── Дубляж (dubbing.php / dubbing-play.php) ──────────────────────────── */
.dubbing-clip-card {
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.dubbing-clip-card:hover {
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.dubbing-clip-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: rgba(255, 255, 255, 0.04);
}

.dubbing-clip-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dubbing-clip-poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #4b5563;
}

.dubbing-clip-difficulty {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.2rem 0.55rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.dubbing-clip-info {
  padding: 0.875rem 1rem;
}

.dubbing-clip-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #f3f4f6;
  margin-bottom: 0.2rem;
}

.dubbing-clip-source {
  font-size: 0.8125rem;
  color: #9ca3af;
}

.dubbing-clip-attempts {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.4rem;
}

.dubbing-step-label {
  font-weight: 600;
  font-size: 1.0625rem;
  color: #f3f4f6;
  margin-bottom: 0.5rem;
}

.dubbing-recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fca5a5;
  font-weight: 600;
  font-size: 0.9375rem;
}

.dubbing-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: dubbingRecPulse 1.2s ease-in-out infinite;
}

@keyframes dubbingRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Таймлайн участков под видео на dubbing-play.php */
.dubbing-timeline {
  position: relative;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.dubbing-segment {
  position: absolute;
  top: 0;
  height: 100%;
  min-width: 3px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.55);
  transition: background 0.2s;
}

.dubbing-segment--done {
  background: #34d399;
}

.dubbing-line-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s;
}

.dubbing-line-card--active {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.06);
}

.dubbing-line-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dubbing-line-info {
  min-width: 0;
}

/* Волновое превью записанного участка (WaveSurfer.js) — тот же паттерн
   элементов, что у .voice-review-player на movie-detail.php */
.dubbing-line-wave {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

.dubbing-wave-playbtn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: transform 0.15s;
}

.dubbing-wave-playbtn:hover {
  transform: scale(1.06);
}

.dubbing-wave-container {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

/* Живой индикатор уровня микрофона во время записи участка */
.dubbing-line-level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 40px;
  padding: 0.4rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.dubbing-level-bar {
  flex-shrink: 0;
  width: 3px;
  min-height: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fca5a5, #ef4444);
  transition: height 0.08s ease-out;
}

/* Крупная подсказка-субтитр поверх видео во время записи участка */
.dubbing-video-wrap {
  position: relative;
}

.dubbing-hint-overlay {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
}

@media (max-width: 640px) {
  .dubbing-hint-overlay {
    font-size: 0.9375rem;
    padding: 0.6rem 0.9rem;
  }
}

/* Переключатель "Список" / "По одному" */
.dubbing-mode-switch {
  display: inline-flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.25rem;
}

.dubbing-mode-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dubbing-mode-btn:hover {
  color: #e5e7eb;
}

.dubbing-mode-btn.active {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Линейный режим — один участок в фокусе */
.dubbing-linear-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.dubbing-linear-progress {
  font-size: 0.8125rem;
  color: #9ca3af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dubbing-linear-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f3f4f6;
}

.dubbing-linear-hint {
  font-size: 1rem;
  color: #d1d5db;
  max-width: 32rem;
}

.dubbing-linear-card .dubbing-line-level,
.dubbing-linear-card .dubbing-line-wave {
  width: 100%;
  max-width: 24rem;
}

.dubbing-linear-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.dubbing-line-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #f3f4f6;
}

.dubbing-line-hint {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}

.dubbing-line-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dubbing-line-badge {
  color: #34d399;
  font-size: 0.9375rem;
}

/* Вкладка «Результаты» на dubbing-play.php */
.dubbing-results-count {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.1rem;
}

.dubbing-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dubbing-result-author {
  font-weight: 600;
  color: #f3f4f6;
  text-decoration: none;
  font-size: 0.9375rem;
}

.dubbing-result-author:hover {
  color: #f87171;
}

.dubbing-result-meta {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin-top: 0.1rem;
}
