/**
 * TV PROFILE - Профиль для Smart TV
 * Netflix-стиль: горизонтальные блоки-секции
 * Лево-право переключает блоки, вверх-вниз скроллит карточки
 */

/* ============================================
   PAGE LAYOUT
   ============================================ */
body.tv-mode .profile-section,
body.tv-mode .user-profile-page {
  background: var(--tv-bg, #0a0a0a) !important;
  padding: 0 !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
}

body.tv-mode .profile-section .container {
  max-width: 100% !important;
  padding: 0 !important;
}

/* Скрываем ненужные элементы когда TV-профиль активен */
body.tv-mode .profile-sidebar,
body.tv-mode .profile-settings-form,
body.tv-mode .profile-danger-zone,
body.tv-mode .profile-avatar-edit {
  display: none !important;
}

/* ============================================
   PROFILE HEADER - Тёмная тема для шапки
   ============================================ */
body.tv-mode .profile-main {
  background: var(--tv-bg, #0a0a0a) !important;
  padding: 30px 80px !important;
}

/* New profile header (3 cards) */
body.tv-mode .profile-header-grid {
  display: grid !important;
  grid-template-columns: 1.3fr 1fr 0.9fr !important;
  gap: 26px !important;
  align-items: stretch !important;
}

body.tv-mode .profile-card {
  background: rgba(30, 30, 35, 0.95) !important;
  border: 2px solid rgba(255,255,255,0.10) !important;
  border-radius: 24px !important;
  padding: 24px !important;
  backdrop-filter: blur(10px) !important;
}

body.tv-mode .profile-user {
  gap: 22px !important;
}

body.tv-mode .profile-avatar {
  width: 120px !important;
  height: 120px !important;
  border-width: 4px !important;
}

body.tv-mode .profile-card-compact {
  background: rgba(30, 30, 35, 0.95) !important;
  border: 2px solid rgba(255,255,255,0.1) !important;
  border-radius: 24px !important;
  padding: 24px !important;
  backdrop-filter: blur(10px) !important;
}

body.tv-mode .profile-name {
  color: #ffffff !important;
  font-size: 32px !important;
  font-weight: 800 !important;
}

body.tv-mode .profile-username {
  color: rgba(255,255,255,0.7) !important;
  font-size: 18px !important;
}

body.tv-mode .profile-mini-stats {
  background: rgba(30, 30, 35, 0.8) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 16px !important;
  padding: 16px 24px !important;
  margin-top: 20px !important;
}

body.tv-mode .profile-mini-stats .mini-stat strong {
  color: #ffffff !important;
  font-size: 24px !important;
}

body.tv-mode .profile-mini-stats .mini-stat span {
  color: rgba(255,255,255,0.6) !important;
}

body.tv-mode .subscription-chip {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

body.tv-mode .btn-subscription {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

body.tv-mode .btn-subscription--primary {
  background: linear-gradient(135deg, var(--tv-focus-color, #00d4ff), #00ff88) !important;
  color: #000 !important;
  border: none !important;
}

body.tv-mode .btn-app-download {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

/* Focus states for remote navigation */
body.tv-mode a:focus,
body.tv-mode button:focus,
body.tv-mode input:focus,
body.tv-mode a:focus-visible,
body.tv-mode button:focus-visible,
body.tv-mode input:focus-visible {
  outline: 4px solid var(--tv-focus-color, #00d4ff) !important;
  outline-offset: 4px !important;
}

/* Disable hover jumps on TV */
body.tv-mode .stat-tile:hover,
body.tv-mode .plan-mini-card:hover,
body.tv-mode .btn-subscription:hover,
body.tv-mode .account-pill:hover {
  transform: none !important;
}

body.tv-mode .profile-stats-grid {
  gap: 16px !important;
}

body.tv-mode .stat-tile {
  padding: 18px 16px !important;
  border-radius: 20px !important;
}

body.tv-mode .stat-tile__value {
  font-size: 34px !important;
}

body.tv-mode .stat-tile__label {
  font-size: 14px !important;
}

body.tv-mode .profile-actions-card__cta .btn-subscription {
  padding: 16px 22px !important;
  font-size: 18px !important;
  border-radius: 18px !important;
}

body.tv-mode .account-pill {
  padding: 16px 18px !important;
  font-size: 18px !important;
  border-radius: 18px !important;
}

/* Светлая тема - шапка профиля */
body.tv-mode.tv-theme-light .profile-main {
  background: #f5f5f7 !important;
}

body.tv-mode.tv-theme-light .profile-card {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.10) !important;
}

body.tv-mode.tv-theme-light .profile-card-compact {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.tv-mode.tv-theme-light .profile-name {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .profile-username {
  color: rgba(0,0,0,0.6) !important;
}

body.tv-mode.tv-theme-light .profile-mini-stats {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.tv-mode.tv-theme-light .profile-mini-stats .mini-stat strong {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .profile-mini-stats .mini-stat span {
  color: rgba(0,0,0,0.6) !important;
}

/* ============================================
   TV PROFILE WRAPPER - Генерируется JS
   ============================================ */
body.tv-mode .tv-profile-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding-top: 20px !important;
}

/* ============================================
   TV PROFILE SECTION - Горизонтальный блок
   ТЁМНАЯ ТЕМА (по умолчанию)
   ============================================ */
body.tv-mode .tv-profile-section {
  padding: 30px 0 !important;
  position: relative !important;
  transition: all 0.3s ease !important;
  background: #0a0a0a !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

body.tv-mode .tv-profile-section:focus,
body.tv-mode .tv-profile-section:focus-within {
  background: #0f0f12 !important;
}

body.tv-mode .tv-profile-section--continue {
  background: linear-gradient(135deg, #0a1520 0%, #0a150f 100%) !important;
  border-top: 2px solid rgba(0,212,255,0.4) !important;
  border-bottom: 2px solid rgba(0,212,255,0.4) !important;
}

/* Заголовок секции - ТЁМНАЯ ТЕМА */
body.tv-mode .tv-profile-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 80px 24px !important;
}

body.tv-mode .tv-profile-section-title {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
}

body.tv-mode .tv-profile-section-title i {
  width: 60px !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%) !important;
  border-radius: 16px !important;
  font-size: 26px !important;
  color: #000 !important;
}

body.tv-mode .tv-profile-section-title h2 {
  font-size: 34px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}

body.tv-mode .tv-profile-section-count {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #00d4ff !important;
  background: rgba(0,212,255,0.2) !important;
  padding: 12px 28px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0,212,255,0.3) !important;
}

/* Контейнер с карточками */
body.tv-mode .tv-profile-cards-row {
  display: flex !important;
  gap: 30px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 20px 80px 40px !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

body.tv-mode .tv-profile-cards-row::-webkit-scrollbar {
  display: none !important;
}

/* ============================================
   TV PROFILE CARD - Большие карточки
   ТЁМНАЯ ТЕМА (по умолчанию)
   ============================================ */
body.tv-mode .tv-profile-card {
  flex: 0 0 320px !important;
  width: 320px !important;
  min-width: 320px !important;
  background: #1a1a1e !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  outline: none !important;
  border: 3px solid rgba(255,255,255,0.1) !important;
  text-decoration: none !important;
  display: block !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}

body.tv-mode .tv-profile-card:hover,
body.tv-mode .tv-profile-card:focus {
  transform: scale(1.1) translateY(-12px) !important;
  border-color: #00d4ff !important;
  box-shadow: 
    0 20px 60px rgba(0,212,255,0.5),
    0 0 0 3px rgba(0,212,255,0.3) !important;
  z-index: 10 !important;
}

/* Постер карточки - ТЁМНАЯ ТЕМА */
body.tv-mode .tv-profile-card-poster {
  width: 100% !important;
  aspect-ratio: 2/3 !important;
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #2a2a2e 0%, #1a1a1e 100%) !important;
}

body.tv-mode .tv-profile-card-poster img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
}

body.tv-mode .tv-profile-card:hover .tv-profile-card-poster img,
body.tv-mode .tv-profile-card:focus .tv-profile-card-poster img {
  transform: scale(1.08) !important;
}

/* Progress bar */
body.tv-mode .tv-profile-card-progress {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  background: rgba(0,0,0,0.7) !important;
}

body.tv-mode .tv-profile-card-progress-bar {
  height: 100% !important;
  background: linear-gradient(90deg, var(--tv-focus-color, #00d4ff), #00ff88) !important;
}

/* Информация о карточке - ТЁМНАЯ ТЕМА */
body.tv-mode .tv-profile-card-info {
  padding: 20px !important;
  background: #1a1a1e !important;
}

body.tv-mode .tv-profile-card-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 8px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
  line-height: 1.3 !important;
}

body.tv-mode .tv-profile-card:hover .tv-profile-card-title,
body.tv-mode .tv-profile-card:focus .tv-profile-card-title {
  color: var(--tv-focus-color, #00d4ff) !important;
}

body.tv-mode .tv-profile-card-episode {
  font-size: 16px !important;
  color: rgba(255,255,255,0.7) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.tv-mode .tv-profile-card-episode i {
  color: var(--tv-focus-color, #00d4ff) !important;
  font-size: 14px !important;
}

/* Пустая секция */
body.tv-mode .tv-profile-empty {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 60px !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  width: 100% !important;
}

body.tv-mode .tv-profile-empty i {
  margin-right: 16px !important;
  font-size: 28px !important;
}

/* ============================================
   СВЕТЛАЯ ТЕМА TV PROFILE - Полные стили
   ============================================ */

/* Фон страницы и wrapper */
body.tv-mode.tv-theme-light .tv-profile-wrapper {
  background: #f0f2f5 !important;
}

/* Секции */
body.tv-mode.tv-theme-light .tv-profile-section {
  background: #ffffff !important;
  border-bottom: 2px solid #e4e6eb !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

body.tv-mode.tv-theme-light .tv-profile-section--continue {
  background: linear-gradient(135deg, #e8f7fa 0%, #e8faf0 100%) !important;
  border-top: 3px solid #0099cc !important;
  border-bottom: 3px solid #0099cc !important;
}

/* Заголовки секций */
body.tv-mode.tv-theme-light .tv-profile-section-header {
  background: transparent !important;
}

body.tv-mode.tv-theme-light .tv-profile-section-title h2 {
  color: #1a1a1a !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

body.tv-mode.tv-theme-light .tv-profile-section-title i {
  background: linear-gradient(135deg, #0099cc 0%, #00cc88 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0,153,204,0.3) !important;
}

body.tv-mode.tv-theme-light .tv-profile-section-count {
  background: #0099cc !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Карточки */
body.tv-mode.tv-theme-light .tv-profile-card {
  background: #ffffff !important;
  border: 3px solid #e4e6eb !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}

body.tv-mode.tv-theme-light .tv-profile-card:hover,
body.tv-mode.tv-theme-light .tv-profile-card:focus {
  border-color: #0099cc !important;
  box-shadow: 
    0 20px 50px rgba(0,153,204,0.25),
    0 0 0 3px rgba(0,153,204,0.2) !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-poster {
  background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%) !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-info {
  background: #ffffff !important;
  padding: 20px !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-title {
  color: #1a1a1a !important;
  text-shadow: none !important;
  font-weight: 700 !important;
}

body.tv-mode.tv-theme-light .tv-profile-card:hover .tv-profile-card-title,
body.tv-mode.tv-theme-light .tv-profile-card:focus .tv-profile-card-title {
  color: #0077aa !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-episode {
  color: #666666 !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-episode i {
  color: #0099cc !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-progress {
  background: #e4e6eb !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-progress-bar {
  background: linear-gradient(90deg, #0099cc, #00cc88) !important;
}

/* Пустая секция */
body.tv-mode.tv-theme-light .tv-profile-empty {
  color: #999999 !important;
  background: #f8f9fa !important;
  border-radius: 12px !important;
}

body.tv-mode.tv-theme-light .tv-profile-empty i {
  color: #cccccc !important;
}

/* ============================================
   2K / 4K SCALING для TV PROFILE
   ============================================ */
@media (min-width: 2560px) {
  body.tv-mode .tv-profile-section-header {
    padding: 0 100px 30px !important;
  }
  
  body.tv-mode .tv-profile-section-title i {
    width: 75px !important;
    height: 75px !important;
    font-size: 32px !important;
  }
  
  body.tv-mode .tv-profile-section-title h2 {
    font-size: 42px !important;
  }
  
  body.tv-mode .tv-profile-cards-row {
    padding: 25px 100px 50px !important;
    gap: 40px !important;
  }
  
  body.tv-mode .tv-profile-card {
    flex: 0 0 400px !important;
    width: 400px !important;
    min-width: 400px !important;
    border-radius: 22px !important;
  }
  
  body.tv-mode .tv-profile-card-title {
    font-size: 26px !important;
  }
  
  body.tv-mode .tv-profile-card-info {
    padding: 26px !important;
  }
}

@media (min-width: 3840px) {
  body.tv-mode .tv-profile-section {
    padding: 50px 0 !important;
  }
  
  body.tv-mode .tv-profile-section-header {
    padding: 0 140px 40px !important;
  }
  
  body.tv-mode .tv-profile-section-title i {
    width: 100px !important;
    height: 100px !important;
    font-size: 44px !important;
    border-radius: 24px !important;
  }
  
  body.tv-mode .tv-profile-section-title h2 {
    font-size: 56px !important;
  }
  
  body.tv-mode .tv-profile-section-count {
    font-size: 38px !important;
    padding: 16px 36px !important;
  }
  
  body.tv-mode .tv-profile-cards-row {
    padding: 35px 140px 70px !important;
    gap: 55px !important;
  }
  
  body.tv-mode .tv-profile-card {
    flex: 0 0 500px !important;
    width: 500px !important;
    min-width: 500px !important;
    border-radius: 28px !important;
    border-width: 5px !important;
  }
  
  body.tv-mode .tv-profile-card-poster {
    border-radius: 24px 24px 0 0 !important;
  }
  
  body.tv-mode .tv-profile-card-info {
    padding: 32px !important;
  }
  
  body.tv-mode .tv-profile-card-title {
    font-size: 32px !important;
    margin-bottom: 12px !important;
  }
  
  body.tv-mode .tv-profile-card-episode {
    font-size: 22px !important;
  }
  
  body.tv-mode .tv-profile-card-progress {
    height: 8px !important;
  }
  
  body.tv-mode .tv-profile-empty {
    font-size: 30px !important;
    padding: 80px !important;
  }
}

/* ============================================
   СТИЛИЗАЦИЯ СУЩЕСТВУЮЩЕГО ПРОФИЛЯ ДЛЯ TV
   ============================================ */

/* Основной контейнер профиля */
body.tv-mode .profile-container,
body.tv-mode .profile-section .container {
  max-width: 100% !important;
  padding: 0 40px !important;
  background: var(--tv-bg, #0a0a0a) !important;
}

/* Карточка профиля - тёмный фон */
body.tv-mode .profile-card,
body.tv-mode .user-profile-card,
body.tv-mode .profile-info-card {
  background: var(--tv-bg-card, #1a1a1e) !important;
  border: 2px solid var(--tv-border, rgba(255,255,255,0.1)) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
}

/* Имя пользователя */
body.tv-mode .profile-name,
body.tv-mode .profile-username,
body.tv-mode h1.profile-name {
  color: #ffffff !important;
  font-size: 36px !important;
  font-weight: 800 !important;
}

/* Текст в профиле */
body.tv-mode .profile-section p,
body.tv-mode .profile-section span,
body.tv-mode .profile-section label {
  color: rgba(255,255,255,0.8) !important;
}

/* Кнопки в профиле */
body.tv-mode .profile-section .btn,
body.tv-mode .profile-section button {
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 28px !important;
  border-radius: 12px !important;
}

/* Вкладки профиля */
body.tv-mode .profile-tabs-container,
body.tv-mode .profile-tabs {
  display: flex !important;
  gap: 15px !important;
  padding: 20px 40px !important;
  overflow-x: auto !important;
  background: rgba(0,0,0,0.3) !important;
}

body.tv-mode .profile-tabs .tab-btn,
body.tv-mode .profile-tabs .nav-link {
  padding: 18px 32px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.08) !important;
  border: 2px solid transparent !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  transition: all 0.3s ease !important;
}

body.tv-mode .profile-tabs .tab-btn:hover,
body.tv-mode .profile-tabs .tab-btn:focus,
body.tv-mode .profile-tabs .nav-link:hover,
body.tv-mode .profile-tabs .nav-link:focus {
  background: var(--tv-focus-color) !important;
  color: #000 !important;
  transform: scale(1.05) !important;
}

body.tv-mode .profile-tabs .tab-btn.active,
body.tv-mode .profile-tabs .nav-link.active {
  background: rgba(0,212,255,0.2) !important;
  border-color: var(--tv-focus-color) !important;
  color: var(--tv-focus-color) !important;
}

/* Секции профиля */
body.tv-mode .profile-section-content,
body.tv-mode .tab-content,
body.tv-mode .profile-content {
  padding: 30px 40px !important;
}

/* Контент в блоках */
body.tv-mode .favorites-section,
body.tv-mode .history-section,
body.tv-mode .continue-watching-section {
  margin-bottom: 40px !important;
}

body.tv-mode .favorites-section h2,
body.tv-mode .history-section h2,
body.tv-mode .continue-watching-section h2 {
  color: #ffffff !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 24px !important;
}

/* Горизонтальный скролл карточек в профиле */
body.tv-mode .favorites-grid,
body.tv-mode .history-grid,
body.tv-mode .continue-grid,
body.tv-mode .profile-content-grid {
  display: flex !important;
  gap: 25px !important;
  overflow-x: auto !important;
  padding-bottom: 20px !important;
  scrollbar-width: none !important;
}

body.tv-mode .favorites-grid::-webkit-scrollbar,
body.tv-mode .history-grid::-webkit-scrollbar {
  display: none !important;
}

/* Карточки в профиле - БОЛЬШИЕ */
body.tv-mode .favorites-grid .content-card,
body.tv-mode .history-grid .content-card,
body.tv-mode .profile-content-grid .content-card {
  flex: 0 0 300px !important;
  width: 300px !important;
  min-width: 300px !important;
}

body.tv-mode .favorites-grid .content-card__poster-wrapper,
body.tv-mode .history-grid .content-card__poster-wrapper {
  height: 440px !important;
  border-radius: 16px !important;
}

body.tv-mode .favorites-grid .content-card__title,
body.tv-mode .history-grid .content-card__title {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,1) !important;
}

/* Лента рекомендаций */
body.tv-mode .recommendation-section,
body.tv-mode .for-you-section {
  background: linear-gradient(135deg, rgba(0,212,255,0.08) 0%, rgba(0,255,136,0.03) 100%) !important;
  border-top: 2px solid rgba(0,212,255,0.2) !important;
  border-bottom: 2px solid rgba(0,212,255,0.2) !important;
  padding: 40px !important;
  margin: 30px 0 !important;
}

body.tv-mode .recommendation-section h2 {
  color: #ffffff !important;
  font-size: 32px !important;
}

/* Светлая тема профиля */
body.tv-mode.tv-theme-light .profile-card,
body.tv-mode.tv-theme-light .user-profile-card,
body.tv-mode.tv-theme-light .profile-info-card {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.tv-mode.tv-theme-light .profile-name,
body.tv-mode.tv-theme-light h1.profile-name {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .profile-section p,
body.tv-mode.tv-theme-light .profile-section span,
body.tv-mode.tv-theme-light .profile-section label {
  color: rgba(0,0,0,0.8) !important;
}

body.tv-mode.tv-theme-light .profile-tabs .tab-btn,
body.tv-mode.tv-theme-light .profile-tabs .nav-link {
  background: rgba(0,0,0,0.05) !important;
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .favorites-section h2,
body.tv-mode.tv-theme-light .history-section h2,
body.tv-mode.tv-theme-light .continue-watching-section h2 {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .favorites-grid .content-card__title,
body.tv-mode.tv-theme-light .history-grid .content-card__title {
  color: #1a1a1a !important;
  text-shadow: 0 1px 3px rgba(255,255,255,0.5) !important;
}

/* ============================================
   TV PROFILE HEADER - Компактный
   ============================================ */
body.tv-mode .tv-profile-header {
  display: flex !important;
  align-items: center !important;
  gap: 30px !important;
  padding: 40px 80px 30px !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent) !important;
}

body.tv-mode .tv-profile-avatar {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--tv-focus-color) 0%, #00ff88 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 40px !important;
  color: #000 !important;
  flex-shrink: 0 !important;
  border: 4px solid rgba(255,255,255,0.2) !important;
}

body.tv-mode .tv-profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

body.tv-mode .tv-profile-info h1 {
  font-size: 42px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8) !important;
}

body.tv-mode .tv-profile-info p {
  font-size: 18px !important;
  color: rgba(255,255,255,0.7) !important;
  margin: 0 !important;
}

/* ============================================
   TV PROFILE SECTIONS - Горизонтальные ленты
   ============================================ */
body.tv-mode .tv-profile-sections {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

/* Каждая секция - это горизонтальная лента */
body.tv-mode .tv-profile-section {
  padding: 30px 0 !important;
  position: relative !important;
  transition: all 0.3s ease !important;
}

body.tv-mode .tv-profile-section:focus-within {
  background: rgba(0,212,255,0.05) !important;
}

/* Заголовок секции */
body.tv-mode .tv-profile-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 80px 20px !important;
}

body.tv-mode .tv-profile-section-title {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

body.tv-mode .tv-profile-section-title i {
  width: 56px !important;
  height: 56px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, var(--tv-focus-color) 0%, #00ff88 100%) !important;
  border-radius: 14px !important;
  font-size: 24px !important;
  color: #000 !important;
}

body.tv-mode .tv-profile-section-title h2 {
  font-size: 32px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

body.tv-mode .tv-profile-section-count {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: var(--tv-focus-color) !important;
  background: rgba(0,212,255,0.15) !important;
  padding: 10px 24px !important;
  border-radius: 10px !important;
}

/* ============================================
   ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ КАРТОЧЕК
   ============================================ */
body.tv-mode .tv-profile-cards-row {
  display: flex !important;
  gap: 30px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding: 20px 80px 40px !important;
  scroll-behavior: smooth !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

body.tv-mode .tv-profile-cards-row::-webkit-scrollbar {
  display: none !important;
}

/* ============================================
   БОЛЬШИЕ КАРТОЧКИ ПРОФИЛЯ
   ============================================ */
body.tv-mode .tv-profile-card {
  flex: 0 0 320px !important;
  width: 320px !important;
  background: var(--tv-bg-card, #1a1a1e) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  outline: none !important;
  border: 4px solid transparent !important;
}

body.tv-mode .tv-profile-card:hover,
body.tv-mode .tv-profile-card:focus {
  transform: scale(1.08) translateY(-10px) !important;
  border-color: var(--tv-focus-color) !important;
  box-shadow: 
    0 20px 60px rgba(0,212,255,0.4),
    0 0 0 3px rgba(0,212,255,0.3) !important;
  z-index: 10 !important;
}

/* Постер карточки */
body.tv-mode .tv-profile-card-poster {
  width: 100% !important;
  aspect-ratio: 2/3 !important;
  position: relative !important;
  overflow: hidden !important;
}

body.tv-mode .tv-profile-card-poster img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
}

body.tv-mode .tv-profile-card:hover .tv-profile-card-poster img,
body.tv-mode .tv-profile-card:focus .tv-profile-card-poster img {
  transform: scale(1.05) !important;
}

/* Progress bar для "Продолжить просмотр" */
body.tv-mode .tv-profile-card-progress {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  background: rgba(0,0,0,0.6) !important;
}

body.tv-mode .tv-profile-card-progress-bar {
  height: 100% !important;
  background: linear-gradient(90deg, var(--tv-focus-color), #00ff88) !important;
  transition: width 0.3s ease !important;
}

/* Информация о карточке */
body.tv-mode .tv-profile-card-info {
  padding: 20px !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8)) !important;
}

body.tv-mode .tv-profile-card-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 8px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
}

body.tv-mode .tv-profile-card:hover .tv-profile-card-title,
body.tv-mode .tv-profile-card:focus .tv-profile-card-title {
  color: var(--tv-focus-color) !important;
}

body.tv-mode .tv-profile-card-episode {
  font-size: 16px !important;
  color: rgba(255,255,255,0.7) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.tv-mode .tv-profile-card-episode i {
  color: var(--tv-focus-color) !important;
}

/* ============================================
   СЕКЦИЯ "ПРОДОЛЖИТЬ ПРОСМОТР" - Особая
   ============================================ */
body.tv-mode .tv-profile-section--continue {
  background: linear-gradient(135deg, rgba(0,212,255,0.08) 0%, rgba(0,255,136,0.03) 100%) !important;
  border-top: 2px solid rgba(0,212,255,0.2) !important;
  border-bottom: 2px solid rgba(0,212,255,0.2) !important;
}

body.tv-mode .tv-profile-section--continue .tv-profile-card {
  flex: 0 0 380px !important;
  width: 380px !important;
}

body.tv-mode .tv-profile-section--continue .tv-profile-card-poster {
  aspect-ratio: 16/10 !important;
}

/* ============================================
   ПУСТЫЕ СЕКЦИИ
   ============================================ */
body.tv-mode .tv-profile-empty {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 60px 80px !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 22px !important;
  font-weight: 500 !important;
}

body.tv-mode .tv-profile-empty i {
  margin-right: 16px !important;
  font-size: 28px !important;
}

/* ============================================
   LIGHT THEME ADJUSTMENTS
   ============================================ */
body.tv-mode.tv-theme-light .tv-profile-section-title h2 {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .tv-profile-card {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-title {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .tv-profile-card:hover .tv-profile-card-title,
body.tv-mode.tv-theme-light .tv-profile-card:focus .tv-profile-card-title {
  color: #0099cc !important;
}

body.tv-mode.tv-theme-light .tv-profile-card-info {
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.9)) !important;
}

body.tv-mode.tv-theme-light .tv-profile-section--continue {
  background: linear-gradient(135deg, rgba(0,153,204,0.08) 0%, rgba(0,153,102,0.03) 100%) !important;
  border-color: rgba(0,153,204,0.2) !important;
}

body.tv-mode.tv-theme-light .tv-profile-info h1 {
  color: #1a1a1a !important;
}

body.tv-mode.tv-theme-light .tv-profile-header {
  background: linear-gradient(to bottom, rgba(255,255,255,0.95), transparent) !important;
}

/* ============================================
   2K SCALING
   ============================================ */
@media (min-width: 2560px) {
  body.tv-mode .tv-profile-header {
    padding: 50px 100px 40px !important;
    gap: 40px !important;
  }
  
  body.tv-mode .tv-profile-avatar {
    width: 130px !important;
    height: 130px !important;
    font-size: 52px !important;
  }
  
  body.tv-mode .tv-profile-info h1 {
    font-size: 52px !important;
  }
  
  body.tv-mode .tv-profile-info p {
    font-size: 22px !important;
  }
  
  body.tv-mode .tv-profile-section-header {
    padding: 0 100px 30px !important;
  }
  
  body.tv-mode .tv-profile-section-title i {
    width: 70px !important;
    height: 70px !important;
    font-size: 30px !important;
  }
  
  body.tv-mode .tv-profile-section-title h2 {
    font-size: 40px !important;
  }
  
  body.tv-mode .tv-profile-cards-row {
    gap: 40px !important;
    padding: 25px 100px 50px !important;
  }
  
  body.tv-mode .tv-profile-card {
    flex: 0 0 380px !important;
    width: 380px !important;
    border-radius: 22px !important;
  }
  
  body.tv-mode .tv-profile-card-title {
    font-size: 24px !important;
  }
  
  body.tv-mode .tv-profile-card-episode {
    font-size: 18px !important;
  }
  
  body.tv-mode .tv-profile-section--continue .tv-profile-card {
    flex: 0 0 460px !important;
    width: 460px !important;
  }
}

/* ============================================
   4K SCALING
   ============================================ */
@media (min-width: 3840px) {
  body.tv-mode .tv-profile-header {
    padding: 70px 140px 50px !important;
    gap: 50px !important;
  }
  
  body.tv-mode .tv-profile-avatar {
    width: 180px !important;
    height: 180px !important;
    font-size: 72px !important;
    border-width: 6px !important;
  }
  
  body.tv-mode .tv-profile-info h1 {
    font-size: 68px !important;
  }
  
  body.tv-mode .tv-profile-info p {
    font-size: 28px !important;
  }
  
  body.tv-mode .tv-profile-section {
    padding: 50px 0 !important;
  }
  
  body.tv-mode .tv-profile-section-header {
    padding: 0 140px 40px !important;
  }
  
  body.tv-mode .tv-profile-section-title i {
    width: 90px !important;
    height: 90px !important;
    font-size: 40px !important;
    border-radius: 20px !important;
  }
  
  body.tv-mode .tv-profile-section-title h2 {
    font-size: 52px !important;
  }
  
  body.tv-mode .tv-profile-section-count {
    font-size: 36px !important;
    padding: 14px 32px !important;
  }
  
  body.tv-mode .tv-profile-cards-row {
    gap: 50px !important;
    padding: 35px 140px 70px !important;
  }
  
  body.tv-mode .tv-profile-card {
    flex: 0 0 480px !important;
    width: 480px !important;
    border-radius: 26px !important;
    border-width: 5px !important;
  }
  
  body.tv-mode .tv-profile-card-info {
    padding: 28px !important;
  }
  
  body.tv-mode .tv-profile-card-title {
    font-size: 30px !important;
    margin-bottom: 12px !important;
  }
  
  body.tv-mode .tv-profile-card-episode {
    font-size: 22px !important;
  }
  
  body.tv-mode .tv-profile-card-progress {
    height: 8px !important;
  }
  
  body.tv-mode .tv-profile-section--continue .tv-profile-card {
    flex: 0 0 580px !important;
    width: 580px !important;
  }
  
  body.tv-mode .tv-profile-empty {
    font-size: 28px !important;
    padding: 80px 140px !important;
  }
}
