@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);
}

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

.movie-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  height: fit-content;
}
 
.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: all 0.3s;
  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.5s;
}

.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;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 40;
}

.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);
  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;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
}

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

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

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

/* Бордеры в зависимости от роли */
.profile-avatar.admin {
  border: 3px solid #ef4444;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.profile-avatar.vip {
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.3);
  border: 3px solid #a78bfa;
}

.profile-avatar.premium {
  border: 3px solid #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.profile-avatar.moder {
  border: 3px solid #ff3cbe;
  box-shadow: 0 0 15px rgba(246, 92, 228, 0.3);
}

.profile-avatar.user {
  border: 3px solid #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.profile-avatar.architect {
  border: 3px solid #9acd32;
  box-shadow: 0 0 15px rgba(162, 246, 59, 0.3);
}


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

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

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

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

.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: all 0.2s;
}

.search-header-input:focus {
  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-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-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;
}

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

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

.role-badge-admin {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.role-badge-vip {
  background: rgba(251, 191, 36, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.role-badge-premium {
  background: rgba(139, 92, 246, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}


/* ===== КАСТОМНЫЙ СЕЛЕКТ ===== */
.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;
}

/* Стилизация скроллбара */
.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;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  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 0.2s;
  text-decoration: none;
  color: inherit;
}

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

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

.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 {
    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.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.player-switch:hover {
  background: rgba(255, 255, 255, 0.1);
}

.player-switch.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

/* ───── Лоадер поверх 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;
}

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

@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: max-content;
  height: 28px;
  display: block;
}

/* ========== ПОИСК ПО АКТЁРАМ ========== */
.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-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;
}

/* ========== ПЛИТОЧНЫЙ ВЫБОР АКТЁРОВ ========== */
.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 {
    width: 100%;
    padding-bottom: 4px !important;
}

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

/* ===== ЛОАДЕР ===== */

#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

#page-loader.loader-done {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Катушки + плёнка */
.loader-film {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loader-reel {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: reel-spin 1.4s linear infinite;
}

.loader-reel-right {
    animation-direction: reverse;
}

.loader-reel-inner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.loader-reel-hole {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0a0a0f;
    border: 1px solid rgba(255,255,255,0.15);
}

.loader-reel-hole:nth-child(1) { transform: translateY(-8px); }
.loader-reel-hole:nth-child(2) { transform: translateX(7px) translateY(4px); }
.loader-reel-hole:nth-child(3) { transform: translateX(-7px) translateY(4px); }

/* Плёнка между катушками */
.loader-strip {
    display: flex;
    gap: 3px;
    overflow: hidden;
}

.loader-frame {
    width: 20px;
    height: 28px;
    border-radius: 3px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    animation: frame-pulse 1.4s ease-in-out infinite;
}

.loader-frame:nth-child(1) { animation-delay: 0s; }
.loader-frame:nth-child(2) { animation-delay: 0.14s; }
.loader-frame:nth-child(3) { animation-delay: 0.28s; }
.loader-frame:nth-child(4) { animation-delay: 0.42s; }
.loader-frame:nth-child(5) { animation-delay: 0.56s; }

/* Прогресс-бар */
.loader-bar-wrap {
    width: 180px;
    height: 2px;
    background: rgba(255,255,255,0.07);
    border-radius: 9999px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    animation: loader-progress 1.6s ease-in-out infinite;
}

.loader-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@keyframes reel-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes frame-pulse {
    0%, 100% { background: rgba(255,255,255,0.05); }
    50%       { background: rgba(255,255,255,0.18); }
}

@keyframes loader-progress {
    0%   { width: 0%;    margin-left: 0; }
    50%  { width: 70%;   margin-left: 0; }
    100% { width: 0%;    margin-left: 100%; }
}

/* ===== СЕЗОНЫ И СЕРИИ ===== */

.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: 0 0.25rem;
}

.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);
    will-change: opacity, transform;
}

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

/* Кнопка удаления поверх стандартной карточки фильма в коллекции */
.collection-film-wrap {
    position: relative;
}
.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;
}
.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: baseline;
    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;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.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 */
.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; }

/* Студии (TMDB) */
.studio-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 14px;
    gap: 5px;
}
.studio-badge img {
    max-height: 28px;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.9;
}
.studio-name {
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.2;
}

/* Видео (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; }
.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; }
.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); }

/* Поповер "кто поставил реакцию" */
.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; }
