.info-modal {
  max-width: 640px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.info-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.info-title {
  margin: 0;
  padding: 16px 20px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.info-body {
  padding: 16px 20px;
  color: #333;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* КРИТИЧЕСКОЕ: Принудительное удаление всех фонов у video-card */
.video-card,
.video-card *:not(.video-thumbnail):not(.video-thumbnail *):not(.video-badge):not(.video-badge *) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
}

/* Удаление фонов у псевдоэлементов */
.video-card::before,
.video-card::after,
.video-card *::before,
.video-card *::after {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  content: none !important;
  border: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 80px;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #1e3c72;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 50px;
  /* Фиксированная высота для точного позиционирования табов */
  box-sizing: border-box;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
}

/* Promotional Banner */
.promo-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 1rem;
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  transition: all 0.3s ease;
}

.promo-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.promo-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.promo-text h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.promo-text p {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Navigation Tabs */
.nav-tabs {
  background: white;
  padding: 0 1rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  margin-top: 0;
  transition: all 0.3s ease;
  position: sticky;
  top: 0;
  /* закрепляем в верху экрана (для главной страницы) */
  z-index: 900;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  -webkit-overflow-scrolling: touch;
  /* Плавная прокрутка на iOS */
}

/* На странице фильмов табы закреплены под header и НЕ ПРОКРУЧИВАЮТСЯ */
/* Базовые стили для ВСЕХ разрешений - ВАЖНО: применяется везде */
body.movies-page .nav-tabs {
  top: 50px !important;
  /* под header (50px высота) - ВСЕГДА на всех разрешениях */
  position: fixed !important;
  /* fixed - элемент НЕ прокручивается */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 899 !important;
  /* чуть ниже header (z-index: 1000) */
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  margin-top: 0 !important;
  /* Убираем любые отступы сверху */
}

.nav-tab {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-tab.active {
  color: #1e3c72;
  border-bottom-color: #1e3c72;
  font-weight: 600;
}

.nav-tab:hover {
  color: #1e3c72;
}

/* Main Content - базовые стили для всех экранов */
.main-content {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  margin-bottom: 80px;
  background: #ffffff;
  min-height: calc(100vh - 160px);
  box-sizing: border-box;
}

/* Стили для фиксированной ширины применяются только в десктопной версии через медиа-запрос */


.page {
  display: none;
}

.page.active {
  display: block;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 0;
}

/* Отступ для видео когда показана навигация категорий */
.movies-page .video-grid {
  margin-top: 40px;
}

.video-card {
  background: transparent !important;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: transform 0.3s ease;
  cursor: pointer;
  border: none !important;
}

.video-card .video-info {
  background: transparent !important;
}

.video-card .video-title {
  background: transparent !important;
}

.video-card .video-date {
  background: transparent !important;
}

.video-card .video-overlay {
  background: transparent !important;
}

.video-card:hover {
  transform: translateY(-2px);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 56.25vw;
  /* 16:9 aspect ratio from edge to edge */
  background: #f0f0f0;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #f0f0f0;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.play-button {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3c72;
  font-size: 1.5rem;
}

.video-badge {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  padding: 0.3rem 0.6rem !important;
  border-radius: 16px !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  z-index: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2px !important;
  box-shadow: none !important;
  transition: all 0.3s ease !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 45px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  /* Базовый фон по умолчанию */
  background: #ff6b35 !important;
  color: #ffffff !important;
}

.video-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: none !important;
}

/* Базовые стили бейджей (без цветов) */
.badge-free {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-buy {
  text-shadow: none;
  font-weight: 800;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

/* Отдельные CSS классы для цветов бейджей */
.badge-free-color {
  background: #8e44ad !important;
  /* Fallback для старых браузеров */
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%) !important;
  color: #ffffff !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.badge-buy-color {
  background: #ff6b35 !important;
  /* Fallback для старых браузеров */
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* Максимально специфичные селекторы */
.video-card .video-badge.badge-buy-color {
  background: #ff6b35 !important;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  color: #ffffff !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

.video-card .video-badge.badge-free-color {
  background: #8e44ad !important;
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%) !important;
  color: #ffffff !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

.video-badge i {
  margin-right: 0.3rem;
  font-size: 0.8em;
}

/* Увеличенная иконка для бейджа на главной странице */
#homePage .video-card-home .video-thumbnail .video-badge i {
  font-size: 1em !important;
  margin-right: 0.5rem !important;
}

/* Глобальное правило для отключения uppercase на главной странице */
#homePage .video-card-home .video-thumbnail .video-badge,
#homePage .video-card-home .video-thumbnail .video-badge * {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Принудительное применение стилей */
[class*="video-badge"][class*="badge-buy"] {
  background: #ff6b35 !important;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[class*="video-badge"][class*="badge-free"] {
  background: #8e44ad !important;
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Заголовок и бейдж в одной строке */
.video-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-bottom: 4px !important;
}

/* Заголовок видео */
.video-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #333 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
  word-wrap: break-word !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  line-clamp: 2 !important;
  /* Standard property */
  flex: 1 !important;
  min-width: 0 !important;
}

/* Анимация для бейджа с ценой */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 6px 20px rgba(255, 159, 0, 0.5), 0 0 0 rgba(255, 111, 0, 0.3);
  }

  100% {
    box-shadow: 0 8px 25px rgba(255, 159, 0, 0.7), 0 0 30px rgba(255, 111, 0, 0.5);
  }
}

/* Красивое модальное окно для недостатка баланса */
.insufficient-balance-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.insufficient-balance-content {
  max-width: 400px;
  width: 90%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.4s ease-out;
  transform: scale(1);
}

.insufficient-balance-header {
  text-align: center;
  padding: 2rem;
  color: #212529;
}

.balance-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ffffff;
}

.insufficient-balance-header h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #212529;
}

.insufficient-balance-header p {
  margin: 0.5rem 0;
  color: #495057;
  font-size: 1rem;
}

.insufficient-balance-header strong {
  color: #212529;
  font-weight: 700;
}

.balance-actions {
  padding: 1.5rem 2rem;
  background: rgba(248, 249, 250, 0.5);
  border-radius: 0 0 20px 20px;
  display: flex;
  gap: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.balance-actions .btn {
  flex: 1;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.balance-actions .btn-secondary {
  background: #e9ecef;
  color: #495057;
  border: 1px solid #dee2e6;
}

.balance-actions .btn-secondary:hover {
  background: #dee2e6;
  transform: translateY(-2px);
  color: #212529;
}

.balance-actions .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  border: none;
}

.balance-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
  color: #ffffff;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }

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

.video-logo {
  display: none;
}

.video-title-overlay {
  display: none;
}

.video-title-main {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #ffd700;
}

.video-subtitle {
  font-size: 0.8rem;
  opacity: 0.9;
}

.video-info {
  padding: 0.25rem 1rem;
  background: transparent !important;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #333 !important;
  background: transparent !important;
}

.video-date {
  font-size: 0.8rem;
  color: #666 !important;
  background: transparent !important;
}

/* Notifications */
.notifications-container {
  max-width: 600px;
  margin: 0 auto;
}

.notification-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.notification-card h3 {
  color: #333;
  margin-bottom: 0.5rem;
}

.notification-meta {
  color: #666;
  font-size: 0.9rem;
}

/* Account Page */
.profile-section {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: left;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  background: #e9eefb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px 0;
}

.avatar-text {
  font-size: 24px;
  font-weight: 800;
  color: #1e3c72;
}

.profile-title {
  color: #1e3c72;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 800;
}

.account-card {
  background: #f9fbff;
  border: 1px solid #e8eef9;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.account-row i {
  color: #1e3c72;
  width: 18px;
  text-align: center;
}

.account-row span {
  color: #666;
}

.account-row strong {
  margin-left: auto;
  color: #111;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 14px 16px;
  font-size: 1rem;
}

.btn-success {
  background: #2eaf56;
  color: #fff;
}

.btn-success:hover {
  background: #279a4a;
}

.list-menu {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: #fff;
  cursor: pointer;
}

.list-item+.list-item {
  border-top: 1px solid #f1f1f5;
}

.list-item .icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f3f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e3c72;
}

.list-item .text {
  flex: 1;
  text-align: left;
  color: #222;
  font-weight: 600;
}

.list-item .chevron {
  color: #c5c9d3;
}

/* Theme Toggle */
.theme-toggle {
  margin-left: auto;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  background: #ccc;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-switch.active {
  background: #1e3c72;
}

/* =================================== */
/* ФИНАЛЬНОЕ КРИТИЧЕСКОЕ ПРАВИЛО ДЛЯ VIDEO-CARD */
/* Максимальная специфичность для удаления фона */
/* =================================== */
html body .main-content .video-grid .video-card,
html body .main-content .video-grid .video-card *:not(.video-badge):not(.video-badge *) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Исключения для thumbnail чтобы оставить фон */
html body .main-content .video-grid .video-card .video-thumbnail,
html body .main-content .video-grid .video-card .video-thumbnail * {
  background: inherit;
  background-color: inherit;
}

/* Исключения для бейджей - они должны иметь цветной фон */
html body .main-content .video-grid .video-card .video-badge,
html body .main-content .video-grid .video-card .video-badge * {
  background: #ff6b35 !important;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  background-color: #ff6b35 !important;
  background-image: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  border: none !important;
  box-shadow: none !important;
}

/* Уменьшенный отступ для video-info */
html body .main-content .video-grid .video-card .video-info {
  padding: 0.25rem 1rem !important;
}

/* Псевдоэлементы тоже убираем */
html body .main-content .video-grid .video-card::before,
html body .main-content .video-grid .video-card::after,
html body .main-content .video-grid .video-card *::before,
html body .main-content .video-grid .video-card *::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Цвета текста для заголовков */
html body .main-content .video-grid .video-card .video-title {
  color: #333 !important;
}

html body .main-content .video-grid .video-card .video-date {
  color: #666 !important;
}

/* Цвета текста для заголовков в темной теме */
html body.dark-theme .main-content .video-grid .video-card .video-title {
  color: #ffffff !important;
}

html body.dark-theme .main-content .video-grid .video-card .video-date {
  color: #cccccc !important;
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
  transform: translateX(24px);
}

.social-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
}

.social-btn.disabled {
  opacity: .5;
  pointer-events: none;
}

.social-btn.instagram {
  background: #fce4ec;
  color: #c2185b;
}

.social-btn.telegram {
  background: #e1f5fe;
  color: #0288d1;
}

.social-btn.whatsapp {
  background: #e8f5e9;
  color: #2e7d32;
}

.warning-box {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  color: #333;
}

.warning-title {
  color: #c62828;
  font-weight: 800;
  margin-bottom: 8px;
}

.warning-box ul {
  padding-left: 16px;
}

.profile-id,
.profile-email,
.profile-phone,
.profile-balance {
  margin-bottom: 0.5rem;
  color: #666;
}

.phone-number {
  color: #28a745;
  font-weight: 600;
}

.balance {
  color: #28a745;
  font-weight: 600;
}

.phone-section,
.account-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-header i {
  color: #666;
}

.section-header h3 {
  color: #333;
  font-size: 1.1rem;
}

.section-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.phone-status {
  margin-bottom: 1rem;
}

.status-text {
  color: #666;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  margin: 0.5rem 0.5rem 0.5rem 0;
}

.btn-primary {
  background: #1e3c72;
  color: white;
}

.btn-primary:hover {
  background: #152a5c;
}

.btn-warning {
  background: #ffc107;
  color: #333;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  color: #666;
  font-size: 0.8rem;
}

.nav-item.active {
  color: #1e3c72;
}

.nav-item i {
  font-size: 1.2rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  margin: 5% auto;
  background: white;
  /* сплошной белый фон попапа */
  border-radius: 12px;
  overflow: hidden;
}

.close {
  position: absolute;
  right: 15px;
  top: 15px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-player-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

#videoPlayer {
  width: 100%;
  height: 100%;
}

/* Loading Spinner */
.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1e3c72;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
  max-width: 400px;
}

.toast {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  border-left: 4px solid #1e3c72;
}

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

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.toast-content i {
  font-size: 1.2rem;
}

.toast-success {
  border-left-color: #28a745;
}

.toast-success .toast-content i {
  color: #28a745;
}

.toast-error {
  border-left-color: #dc3545;
}

.toast-error .toast-content i {
  color: #dc3545;
}

.toast-warning {
  border-left-color: #ffc107;
}

.toast-warning .toast-content i {
  color: #ffc107;
}

.toast-info {
  border-left-color: #17a2b8;
}

.toast-info .toast-content i {
  color: #17a2b8;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
}

.toast-close:hover {
  color: #333;
}

/* No Content State */
.no-content {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1.1rem;
  grid-column: 1 / -1;
}

/* User Menu Styles */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.user-menu {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.user-info:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.user-name {
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 15px;
  min-width: 200px;
  z-index: 1000;
  display: none;
  margin-top: 10px;
}

.user-dropdown.show {
  display: block;
}

.user-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #333;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.dropdown-item:hover {
  color: #667eea;
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Payment modal – redesigned */
.payment-modal {
  max-width: 460px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.payment-modal .close {
  right: 10px;
  top: 10px;
  background: rgba(0, 0, 0, .35);
  color: #fff;
}

.payment-card {
  background: #ffffff;
  backdrop-filter: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.payment-topbar {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-topbar h3 {
  font-size: 18px;
  font-weight: 700;
}

.payment-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.payment-label {
  font-weight: 700;
  color: #2b2b2b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-amount-wrapper {
  display: flex;
  justify-content: center;
}

.payment-amount-wrapper .form-input {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  max-width: 260px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
}

.payment-gateways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bank-btn {
  height: 110px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.bank-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.12);
}

.bank-alif .bank-logo-text {
  font-size: 26px;
  font-weight: 800;
  color: #00A870;
  letter-spacing: .4px;
}

.bank-dcnext .bank-logo-text {
  font-size: 26px;
  font-weight: 900;
  color: #0C6CF2;
  letter-spacing: .4px;
}

.bank-korti .bank-logo-text {
  font-size: 26px;
  font-weight: 800;
  color: #FF6B00;
  letter-spacing: .4px;
}

/* Selected gateway visual state */
.bank-btn.selected {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.bank-dcnext.selected {
  border-color: #0C6CF2;
  box-shadow: 0 12px 36px rgba(12, 108, 242, 0.25);
}

.bank-alif.selected {
  border-color: #00A870;
  box-shadow: 0 12px 36px rgba(0, 168, 112, 0.25);
}

.bank-korti.selected {
  border-color: #FF6B00;
  box-shadow: 0 12px 36px rgba(255, 107, 0, 0.25);
}

.bank-btn.selected .bank-logo-text {
  opacity: 1;
}

#paymentSubmitBtn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: #1e3c72;
  color: #fff;
  border: 1px solid #1e3c72;
}

#paymentSubmitBtn:hover {
  background: #152a5c;
}

#paymentCancelBtn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: #f5f6f7;
  color: #333;
  border: 1px solid #e6e8eb;
}

#paymentCancelBtn:hover {
  background: #eef0f2;
}

@media (max-width: 480px) {
  .payment-topbar h3 {
    font-size: 16px;
  }

  .bank-btn {
    height: 96px;
  }

  .payment-amount-wrapper .form-input {
    font-size: 24px;
  }
}

/* Старые медиа-запросы удалены - используется новая умная адаптивная система ниже */

/* ============================================ */
/* УМНАЯ АДАПТИВНАЯ СИСТЕМА */
/* ============================================ */

/* МОБИЛЬНАЯ ВЕРСИЯ: до 560px - 1 колонка, полная ширина */
@media (max-width: 560px) {
  .main-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* На странице фильмов добавляем отступ сверху, чтобы первый фильм не прятался под табами */
  /* header (50px) + табы (примерно 50px с padding) - небольшой отступ = 90px */
  body.movies-page .main-content {
    padding-top: 90px !important;
    margin-top: 0 !important;
  }

  /* Убеждаемся, что видео сетка на странице фильмов имеет правильный отступ */
  body.movies-page .video-grid,
  body.movies-page #moviesGrid {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Табы на мобильных устройствах - убеждаемся что они закреплены правильно */
  body.movies-page .nav-tabs {
    top: 50px !important;
    /* под header */
    position: fixed !important;
    z-index: 899 !important;
  }

  .promo-banner {
    border-radius: 0 !important;
  }

  /* Бейдж в центре thumbnail для главной страницы - МОБИЛЬНАЯ ВЕРСИЯ */
  #homePage .video-card-home .video-thumbnail .video-badge.badge-buy.badge-buy-color,
  #homePage .video-card-home .video-thumbnail .video-badge {
    position: absolute !important;
    top: calc(50% + 20px) !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    border-radius: 100px !important;
    background: rgba(255, 107, 53, 0.90) !important;
    background: linear-gradient(135deg, rgba(127, 53, 255, 0.90) 0%, rgba(30, 30, 247, 0.90) 100%) !important;
  }

  .nav-tabs {
    padding: 0 8px !important;
  }

  .video-grid,
  #videoGrid,
  #moviesGrid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
  }

  /* На странице фильмов добавляем отступ между карточками - 15px */
  body.movies-page .video-grid,
  body.movies-page #moviesGrid {
    gap: 15px !important;
    padding: 0 0.5rem !important;
    /* Небольшой отступ по бокам */
  }

  .video-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    flex-direction: column !important;
    display: flex !important;
  }

  .video-thumbnail {
    width: 100% !important;
    height: 56.25vw !important;
    border-radius: 0 !important;
  }

  .video-info {
    padding: 4px 12px !important;
  }
}

/* АДАПТИВНАЯ СЕТКА: 561px - 767px - 2 колонки, вертикальный layout */
@media (min-width: 561px) and (max-width: 767px) {
  .main-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 1rem !important;
  }

  .video-grid,
  #videoGrid,
  #moviesGrid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
  }

  /* Для главной страницы - 1 колонка */
  #homePage .video-grid,
  #homePage #videoGrid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  .video-card {
    flex-direction: column !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    width: 100% !important;
  }

  .video-thumbnail {
    width: 100% !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    position: relative !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  .video-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .video-info {
    padding: 12px 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
  }

  .video-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
  }

  .video-date {
    font-size: 12px !important;
    margin-top: 4px !important;
  }

  /* Бейдж в центре thumbnail для главной страницы - ПЛАНШЕТЫ */
  #homePage .video-card-home .video-thumbnail .video-badge.badge-buy.badge-buy-color,
  #homePage .video-card-home .video-thumbnail .video-badge {
    position: absolute !important;
    top: calc(50% + 25px) !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    padding: 10px 20px !important;
    margin: 0 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
    border-radius: 100px !important;
    background: rgba(255, 107, 53, 0.90) !important;
    background: linear-gradient(135deg, rgba(127, 53, 255, 0.90) 0%, rgba(30, 30, 247, 0.90) 100%) !important;
  }
}

/* БОЛЬШИЕ ПЛАНШЕТЫ: 768px - 1023px - 3 колонки, вертикальный layout */
@media (min-width: 768px) and (max-width: 1023px) {

  /* На странице фильмов табы закреплены под header */
  body.movies-page .nav-tabs {
    top: 50px !important;
    /* под header (50px высота) - ВСЕГДА */
    position: fixed !important;
    z-index: 899 !important;
  }

  .main-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 1.5rem !important;
  }

  /* Видео сетка для всех страниц - 3 колонки */
  .video-grid,
  #videoGrid,
  #moviesGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    padding: 16px !important;
  }

  /* Для страницы фильмов - 3 колонки */
  body.movies-page .video-grid,
  body.movies-page #moviesGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    padding: 16px !important;
  }

  /* Для главной страницы - 1 колонка (одна большая карточка) */
  #homePage .video-grid,
  #homePage #videoGrid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  .video-card {
    flex-direction: column !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    width: 100% !important;
  }

  .video-thumbnail {
    width: 100% !important;
    padding-bottom: 56.25% !important;
    height: 0 !important;
    position: relative !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  .video-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .video-info {
    padding: 12px 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
  }

  .video-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
  }

  .video-date {
    font-size: 12px !important;
    margin-top: 4px !important;
  }

  /* Бейдж в центре thumbnail для главной страницы - ПЛАНШЕТЫ 768-1023px */
  #homePage .video-card-home .video-thumbnail .video-badge.badge-buy.badge-buy-color,
  #homePage .video-card-home .video-thumbnail .video-badge {
    position: absolute !important;
    top: calc(50% + 30px) !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    padding: 12px 24px !important;
    margin: 0 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4) !important;
    border-radius: 100px !important;
    background: rgba(255, 107, 53, 0.90) !important;
    background: linear-gradient(135deg, rgba(127, 53, 255, 0.90) 0%, rgba(30, 30, 247, 0.90) 100%) !important;
  }
}

/* ДЕСКТОПНАЯ ВЕРСИЯ (1024px+) - фиксированная ширина 1156px */
@media (min-width: 1024px) {

  /* Основной контент - фиксированная ширина для всех страниц */
  .main-content {
    max-width: 1156px !important;
    width: 1156px !important;
    min-width: 1156px !important;
    padding: 2rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Для страницы фильмов - фиксированная ширина контента */
  body.movies-page .main-content {
    max-width: 1156px !important;
    /* Фиксированная ширина как на скриншоте */
    width: 1156px !important;
    min-width: 1156px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    padding-top: 100px !important;
    /* Отступ для header (50px) + табы (~50px) */
  }

  /* Для главной страницы - фиксированная ширина контента */
  .main-content:has(#homePage.active) {
    max-width: 1156px !important;
    width: 1156px !important;
    min-width: 1156px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  /* Для страницы уведомлений - фиксированная ширина контента */
  .main-content:has(#notificationsPage.active) {
    max-width: 1156px !important;
    width: 1156px !important;
    min-width: 1156px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  /* Для страницы аккаунта - фиксированная ширина контента */
  .main-content:has(#accountPage.active) {
    max-width: 1156px !important;
    width: 1156px !important;
    min-width: 1156px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  /* Промо-баннер */
  .promo-banner {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
    margin-top: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
  }

  /* Для страницы фильмов - промо-баннер на ширину контента */
  body.movies-page .promo-banner {
    max-width: 1156px !important;
    width: 1156px !important;
  }

  .promo-content {
    max-width: 100%;
    padding: 0 1rem;
  }

  /* Навигационные вкладки */
  .nav-tabs {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px 12px 0 0;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Для страницы фильмов - навигационные вкладки закреплены и центрированы */
  /* ВАЖНО: top: 50px должен быть ВСЕГДА, чтобы табы были под header */
  body.movies-page .nav-tabs {
    top: 50px !important;
    /* под header (50px высота) - КРИТИЧНО для всех разрешений */
    position: fixed !important;
    /* fixed для надежного закрепления - не прокручивается */
    left: 50% !important;
    transform: translateX(-50%) !important;
    /* центрирование */
    max-width: 1156px !important;
    width: 1156px !important;
    z-index: 899 !important;
    /* чуть ниже header (z-index: 1000) */
    margin-top: 0 !important;
    /* Убираем любые отступы сверху */
    margin-left: 0 !important;
    /* Убираем отступы для правильного центрирования */
    margin-right: 0 !important;
  }

  /* Видео сетка на главной - центрированная для одной большой карточки */
  #homePage .video-grid,
  #homePage #videoGrid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 2rem 0 !important;
    margin-top: 0;
    display: block;
    width: 100%;
  }

  /* Большая карточка видео на главной странице - вертикальный layout как в YouTube */
  #homePage .video-card-home {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    /* Убраны скругленные углы */
    box-shadow: none !important;
    /* Убраны тени */
    overflow: hidden !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    transition: none !important;
    /* Убраны переходы */
    display: flex !important;
    flex-direction: column !important;
    /* Вертикальный layout */
    align-items: stretch !important;
    margin: 0 auto !important;
    border: none !important;
  }

  #homePage .video-card-home:hover {
    transform: none !important;
    /* Убрана анимация при наведении */
    box-shadow: none !important;
    /* Убраны тени при наведении */
  }

  #homePage .video-card-home .video-thumbnail {
    width: 100% !important;
    /* Полная ширина */
    height: 0 !important;
    padding-bottom: 56.25% !important;
    /* 16:9 aspect ratio */
    flex-shrink: 0 !important;
    position: relative !important;
    border-radius: 0 !important;
    /* Убраны скругленные углы */
    overflow: hidden !important;
    background: #000 !important;
    background-color: #000 !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }

  #homePage .video-card-home .video-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  #homePage .video-card-home .video-info {
    padding: 16px 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    /* Выравнивание сверху */
    background: #ffffff !important;
    background-color: #ffffff !important;
    min-width: 0 !important;
  }

  #homePage .video-card-home .video-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #0f0f0f !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background: transparent !important;
    background-color: transparent !important;
  }

  #homePage .video-card-home .video-date {
    font-size: 14px !important;
    color: #606060 !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
  }

  /* Бейдж в header для главной страницы - скрываем */
  #homePage .video-card-home .video-header .video-badge {
    display: none !important;
  }

  /* Бейдж в центре thumbnail для главной страницы - ДЕСКТОП */
  #homePage .video-card-home .video-thumbnail .video-badge.badge-buy.badge-buy-color,
  #homePage .video-card-home .video-thumbnail .video-badge {
    position: absolute !important;
    top: calc(50% + 30px) !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    padding: 16px 32px !important;
    margin: 0 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: auto !important;
    white-space: nowrap !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    border-radius: 100px !important;
    background: rgba(255, 107, 53, 0.90) !important;
    background: linear-gradient(135deg, rgba(127, 53, 255, 0.90) 0%, rgba(30, 30, 247, 0.90) 100%) !important;
  }

  #homePage .video-card-home .video-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: transparent !important;
    background-color: transparent !important;
  }

  #homePage .video-card-home .video-overlay {
    background: transparent !important;
    background-color: transparent !important;
  }

  /* Видео сетка для страницы фильмов - 3 колонки в десктопной версии */
  body.movies-page .video-grid,
  body.movies-page #moviesGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    /* 3 карточки в ряд */
    gap: 24px !important;
    /* Увеличенный отступ между карточками */
    padding: 1.5rem 0 !important;
    margin-top: 0;
    max-width: 100%;
  }

  .movies-page .video-grid {
    margin-top: 40px;
  }

  /* Карточки видео на странице фильмов - вертикальный layout */
  body.movies-page .video-card {
    border-radius: 0 !important;
    /* Убраны скругленные углы */
    box-shadow: none !important;
    /* Убраны тени */
    overflow: hidden !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    transition: none !important;
    /* Убраны переходы */
    display: flex !important;
    flex-direction: column !important;
    /* Вертикальный layout */
    align-items: stretch !important;
    width: 100% !important;
    border: none !important;
  }

  body.movies-page .video-card:hover {
    transform: none !important;
    /* Убрана анимация при наведении */
    box-shadow: none !important;
    /* Убраны тени при наведении */
  }

  body.movies-page .video-thumbnail {
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 56.25% !important;
    /* 16:9 aspect ratio */
    flex-shrink: 0 !important;
    position: relative !important;
    border-radius: 0 !important;
    /* Убраны скругленные углы */
    overflow: hidden !important;
    background: #000 !important;
    background-color: #000 !important;
  }

  body.movies-page .video-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  body.movies-page .video-info {
    padding: 16px 0 !important;
    /* Увеличенные отступы */
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    /* Выравнивание сверху */
    background: #ffffff !important;
    background-color: #ffffff !important;
    min-width: 0 !important;
  }

  body.movies-page .video-title {
    font-size: 16px !important;
    /* Увеличенный размер шрифта */
    font-weight: 600 !important;
    /* Более жирный шрифт */
    line-height: 1.4 !important;
    color: #0f0f0f !important;
    margin-bottom: 6px !important;
    margin-top: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    background: transparent !important;
    background-color: transparent !important;
  }

  body.movies-page .video-date {
    font-size: 13px !important;
    /* Немного увеличенный размер */
    color: #606060 !important;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
  }

  body.movies-page .video-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    background: transparent !important;
    background-color: transparent !important;
  }

  body.movies-page .video-overlay {
    background: transparent !important;
    background-color: transparent !important;
  }

  /* Темная тема для десктопной версии - главная страница */
  body.dark-theme #homePage .video-card-home {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
  }

  body.dark-theme #homePage .video-card-home .video-info {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
  }

  body.dark-theme #homePage .video-card-home .video-title {
    color: #e0e0e0 !important;
  }

  body.dark-theme #homePage .video-card-home .video-date {
    color: #aaa !important;
  }

  /* Темная тема для десктопной версии - страница фильмов */
  body.dark-theme.movies-page .video-card,
  body.dark-theme body.movies-page .video-card {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
  }

  body.dark-theme.movies-page .video-info,
  body.dark-theme body.movies-page .video-info {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
  }

  body.dark-theme.movies-page .video-title,
  body.dark-theme body.movies-page .video-title {
    color: #e0e0e0 !important;
  }

  body.dark-theme.movies-page .video-date,
  body.dark-theme body.movies-page .video-date {
    color: #aaa !important;
  }
}



/* ================================= */
/* ТЕМНАЯ ТЕМА */
/* ================================= */
body.dark-theme {
  background-color: #0f0f0f;
  color: #ffffff;
}

/* Header в темной теме */
body.dark-theme .header {
  background: rgba(33, 33, 33, 0.95);
  backdrop-filter: blur(10px);
}

body.dark-theme .header-content {
  background: transparent;
}

body.dark-theme .logo {
  color: #ffffff;
}

/* Main content в темной теме */
body.dark-theme .main-content {
  background: #0f0f0f;
}

/* Promo banner в темной теме */
body.dark-theme .promo-banner {
  background: #212121;
  border-bottom: 1px solid #333;
}

body.dark-theme .promo-content {
  background: #212121;
}

body.dark-theme .promo-text h3 {
  color: #ffffff;
}

body.dark-theme .promo-text p {
  color: #b3b3b3;
}

/* Навигация в темной теме */
body.dark-theme .nav-tabs {
  background: #121212;
  border-bottom: 1px solid #333;
}

body.dark-theme .nav-tab {
  color: #aaa;
  background: transparent;
}

body.dark-theme .nav-tab.active {
  color: #ffffff;
  border-bottom-color: #4a9eff;
  background: transparent;
}

body.dark-theme .nav-tab:hover {
  color: #ffffff;
  background: transparent;
}

/* Карточки видео в темной теме - YouTube стиль */
@media (min-width: 461px) {
  body.dark-theme .video-card {
    background: #181818 !important;
    border: none !important;
  }

  body.dark-theme .video-card:hover {
    background: #181818 !important;
    border: none !important;
  }

  body.dark-theme .video-info {
    background: #181818 !important;
  }

  body.dark-theme .video-title {
    color: #ffffff !important;
  }

  body.dark-theme .video-date {
    color: #aaaaaa !important;
  }
}

body.dark-theme .video-thumbnail {
  background: #000;
}

body.dark-theme .video-thumbnail img {
  background-color: #000;
}

body.dark-theme .video-info {
  background: transparent !important;
}

body.dark-theme .video-title {
  color: #ffffff !important;
}

body.dark-theme .video-date {
  color: #cccccc !important;
}

/* Цвета бейджей в темной теме */
body.dark-theme .badge-buy-color {
  background: linear-gradient(135deg, #ff9f00 0%, #ff6f00 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 6px 20px rgba(255, 159, 0, 0.5) !important;
}

body.dark-theme .badge-free-color {
  background: linear-gradient(135deg, #4834d4 0%, #686de0 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Темная тема для заголовка */
body.dark-theme .video-title {
  color: #ffffff !important;
}

/* Темная тема для бейджа */
body.dark-theme .video-badge {
  box-shadow: none !important;
}

/* Стили для темной темы - модальное окно недостатка баланса */
body.dark-theme .insufficient-balance-content {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .balance-actions {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-theme .video-date {
  color: #b3b3b3;
}

/* Темная тема для главной страницы */
body.dark-theme #homePage .video-card-home {
  background: #0f0f0f !important;
  background-color: #0f0f0f !important;
}

body.dark-theme #homePage .video-card-home .video-info {
  background: #0f0f0f !important;
  background-color: #0f0f0f !important;
}

body.dark-theme #homePage .video-card-home .video-title {
  color: #e0e0e0 !important;
}

body.dark-theme #homePage .video-card-home .video-date {
  color: #aaa !important;
}

/* Темная тема для страницы фильмов */
body.dark-theme.movies-page .video-card,
body.dark-theme .movies-page .video-card {
  background: #0f0f0f !important;
  background-color: #0f0f0f !important;
}

body.dark-theme.movies-page .video-info,
body.dark-theme .movies-page .video-info {
  background: #0f0f0f !important;
  background-color: #0f0f0f !important;
}

body.dark-theme.movies-page .video-title,
body.dark-theme .movies-page .video-title {
  color: #e0e0e0 !important;
}

body.dark-theme.movies-page .video-date,
body.dark-theme .movies-page .video-date {
  color: #aaa !important;
}

/* Темная тема для других элементов */
body.dark-theme .info-card {
  background: #1a1a1a !important;
}

body.dark-theme .info-body {
  color: #e0e0e0 !important;
}

body.dark-theme .list-menu {
  background: #1a1a1a !important;
}

body.dark-theme .list-item {
  background: #1a1a1a !important;
}

body.dark-theme .list-item+.list-item {
  border-top-color: #333 !important;
}

body.dark-theme .list-item .icon {
  background: #2a2a2a !important;
  color: #4a9eff !important;
}

body.dark-theme .list-item .text {
  color: #e0e0e0 !important;
}

body.dark-theme .list-item .chevron {
  color: #666 !important;
}

body.dark-theme .warning-box {
  background: #1a1a1a !important;
  color: #e0e0e0 !important;
}

/* Профиль в темной теме */
body.dark-theme .profile-section {
  background: #212121;
  border: 1px solid #333;
}

body.dark-theme .profile-title {
  color: #ffffff;
}

body.dark-theme .account-card {
  background: #2a2a2a;
  border: 1px solid #333;
}

body.dark-theme .account-row {
  color: #ffffff;
}

body.dark-theme .account-row i {
  color: #6bb6ff;
}

body.dark-theme .account-row span {
  color: #e0e0e0;
}

body.dark-theme .account-row strong {
  color: #ffffff;
}

body.dark-theme #userId,
body.dark-theme #userBalanceAccount {
  color: #ffffff !important;
}

body.dark-theme .account-card .balance {
  color: #ffffff !important;
}

/* Скрываем кнопку удаления аккаунта - функция отключена */
#deleteAccountBtn,
.warning-box {
  display: none !important;
}

/* Меню в темной теме */
body.dark-theme .list-menu {
  background: #212121;
  border: 1px solid #333;
}

body.dark-theme .list-item {
  background: #212121;
  border-top: 1px solid #333;
}

body.dark-theme .list-item .text {
  color: #ffffff;
}

body.dark-theme .list-item .icon {
  background: #333;
  color: #6bb6ff;
}

body.dark-theme .list-item .chevron {
  color: #b3b3b3;
}

/* Кнопки в темной теме */
body.dark-theme .btn {
  border: 1px solid #333;
}

body.dark-theme .btn-success {
  background: #28a745;
  color: #ffffff;
}

body.dark-theme .btn-warning {
  background: #ffc107;
  color: #212121;
}

body.dark-theme .btn-danger {
  background: #dc3545;
  color: #ffffff;
}

/* Предупреждения в темной теме */
body.dark-theme .warning-box {
  background: #212121;
  border: 1px solid #333;
  color: #ffffff;
}

body.dark-theme .warning-title {
  color: #ff6b6b;
}

/* Нижняя навигация в темной теме */
body.dark-theme .bottom-nav {
  background: #212121;
  border-top: 1px solid #333;
}

body.dark-theme .nav-item {
  color: #b3b3b3;
}

body.dark-theme .nav-item.active {
  color: #6bb6ff;
}

body.dark-theme .nav-item:hover {
  color: #ffffff;
}

/* Модальные окна в темной теме */
body.dark-theme .modal-content {
  background: #212121;
  border: 1px solid #333;
}

body.dark-theme .modal h3 {
  color: #ffffff;
}

body.dark-theme .modal p {
  color: #b3b3b3;
}

/* Социальные кнопки в темной теме */
body.dark-theme .social-btn.instagram {
  background: #333;
  color: #e1306c;
}

body.dark-theme .social-btn.telegram {
  background: #333;
  color: #0088cc;
}

body.dark-theme .social-btn.whatsapp {
  background: #333;
  color: #25d366;
}

/* ===== YouTube-Style Quality Selector ===== */
.video-player-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: #000;
}

/* Скрываем нативные контролы */
.video-player-container video {
  width: 100%;
  display: block;
}

/* Кастомный контрол бар */
.custom-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 10px 15px;
  display: flex !important;
  align-items: center;
  gap: 10px;
  z-index: 100;
  opacity: 0;
  visibility: visible !important;
  transition: opacity 0.3s ease;
}

.video-player-container:hover .custom-video-controls,
.custom-video-controls.show {
  opacity: 1;
}

#customControls {
  display: flex !important;
  visibility: visible !important;
}

.video-controls-overlay {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-left: auto !important;
  order: 999;
  flex-shrink: 0;
}

.settings-button {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  visibility: visible !important;
}

#qualitySettingsBtn {
  display: flex !important;
  visibility: visible !important;
}

.play-pause-btn,
.fullscreen-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.play-pause-btn:hover,
.fullscreen-btn:hover,
.settings-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 5px;
}

.volume-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-slider {
  width: 70px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.volume-slider-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
  width: 100%;
}

.time-display {
  color: white;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.progress-bar-container {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: #2575fc;
  border-radius: 2px;
  width: 0%;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #2575fc;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.progress-bar-container:hover .progress-bar-fill::after {
  opacity: 1;
}

.settings-button:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.settings-button.active {
  background: #2575fc;
}

.quality-menu {
  position: absolute;
  bottom: 45px;
  right: 50px;
  background: rgba(28, 28, 28, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10001;
}

.quality-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.quality-menu-header {
  padding: 12px 16px;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quality-option {
  padding: 12px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.quality-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.quality-option.active {
  background: rgba(37, 117, 252, 0.2);
  color: #2575fc;
}

.quality-option .check-icon {
  font-size: 16px;
  opacity: 0;
}

.quality-option.active .check-icon {
  opacity: 1;
}

.quality-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 6px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .quality-menu {
    min-width: 160px;
  }

  .settings-button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* ============================================ */
/* СТИЛИ ДЛЯ ТРАНЗАКЦИЙ */
/* ============================================ */

.transactions-section {
  margin-top: 2rem;
  padding: 0 1rem;
}

.transactions-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.transaction-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.transaction-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.transaction-icon.transaction-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.transaction-icon.transaction-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.transaction-icon.transaction-warning {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.transaction-icon.transaction-neutral {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

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

.transaction-description {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #666;
}

.transaction-date {
  color: #666;
}

.transaction-method {
  padding: 0.125rem 0.5rem;
  background: rgba(107, 114, 128, 0.1);
  border-radius: 6px;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
}

.transaction-amount {
  font-size: 1.125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.transaction-amount.transaction-success {
  color: #22c55e;
}

.transaction-amount.transaction-danger {
  color: #ef4444;
}

.transaction-amount.transaction-warning {
  color: #fbbf24;
}

.transaction-amount.transaction-neutral {
  color: #6b7280;
}

/* Темная тема для транзакций */
body.dark-theme .transactions-title {
  color: #e0e0e0;
}

body.dark-theme .transaction-item {
  background: #181818;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .transaction-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-theme .transaction-description {
  color: #e0e0e0;
}

body.dark-theme .transaction-date {
  color: #aaa;
}

body.dark-theme .transaction-method {
  background: rgba(107, 114, 128, 0.2);
  color: #aaa;
}

/* Адаптивность для транзакций */
@media (max-width: 560px) {
  .transactions-section {
    padding: 0 0.5rem;
  }

  .transactions-title {
    font-size: 1.25rem;
    padding: 0;
  }

  .transaction-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .transaction-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .transaction-description {
    font-size: 0.875rem;
  }

  .transaction-amount {
    font-size: 1rem;
  }

  .transaction-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* Десктопная версия - центрирование транзакций */
@media (min-width: 1024px) {
  .transactions-section {
    max-width: 1156px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
  }
}

/* Increase font size for payment button text (specifically Russian cards) */
.bank-logo-text {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #333 !important;
  /* Always dark because modal is always white */
}

/* Remove dark theme override or enforce dark color if needed */
body.dark-theme .bank-logo-text,
body.dark-theme .bank-btn .bank-logo-text {
  color: #333 !important;
}