/* ==========================================================================
   ТВ ПОВТОР — ПРЕМИАЛЬНЫЙ ДНЕВНОЙ РЕЖИМ (HIGH-CRAFT EDITORIAL LIGHT)
   Стандарт Impeccable UI:
   - Мягкий неслепящий теплый фон (#f4f6f9 / #edf2f7) вместо ядовито-белого
   - Глубокая типографика (#0f172a / #1e293b) с четкой читаемостью при дневном свете
   - Идеальная стилизация правой колонки EPG: карточки передач, живой эфир, архив
   - Кинематографичная интеграция видеоплеера с благородной контрастной рамкой
   - Полная гармония раздела «Телепрограмма» (Wide EPG Hub) и модальных окон
   ========================================================================== */

/* 1. БАЗОВЫЕ НАСТРОЙКИ КАНВАСА */
html.theme-light, 
body.theme-light {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

/* 2. ШАПКА ПРИЛОЖЕНИЯ */
.theme-light .app-header {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05) !important;
}

.theme-light .brand-logo {
  color: #0f172a !important;
}

.theme-light .brand-badge {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #2563eb !important;
}

/* Вкладки навигации в шапке (Плеер / Телепрограмма) */
.theme-light .header-nav-tabs {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
}

.theme-light .header-tab-btn {
  color: #475569 !important;
  font-weight: 700 !important;
}

.theme-light .header-tab-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.75) !important;
}

.theme-light .header-tab-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28) !important;
}

/* Поле быстрого поиска в шапке */
.theme-light .search-container {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.theme-light .search-container:focus-within {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.theme-light .search-input {
  color: #0f172a !important;
}

.theme-light .search-input::placeholder {
  color: #94a3b8 !important;
}

.theme-light .search-icon {
  color: #64748b !important;
}



/* Кнопка переключения темы (Дневной / Ночной режим) */
.theme-light .theme-toggle-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

.theme-light .theme-toggle-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px) !important;
}

/* Кнопки действий (Горячие клавиши, Правообладателям) */
.theme-light .action-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.theme-light .action-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.theme-light #dmcaModalBtn {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

.theme-light #dmcaModalBtn:hover {
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* 3. ОСНОВНОЙ ЛЕЙАУТ (3 КОЛОНКИ) */
.theme-light .main-layout {
  background: #e9eef5 !important;
}

/* 4. ЛЕВАЯ КОЛОНКА КАНАЛОВ (CHANNELS SIDEBAR) */
.theme-light .channels-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03) !important;
}

.theme-light .channels-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.theme-light .channels-title {
  color: #0f172a !important;
}

.theme-light .channels-title span {
  color: #2563eb !important;
}

.theme-light .channels-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.theme-light .channels-header-left {
  color: #0f172a !important;
}

.theme-light .channels-count-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.theme-light .channels-scroll-list::-webkit-scrollbar-thumb,
.theme-light .epg-programs-list::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}

.theme-light .channels-scroll-list::-webkit-scrollbar-thumb:hover,
.theme-light .epg-programs-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Карточки каналов в списке */
.theme-light .channel-row {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

.theme-light .channel-row:hover {
  background: #f8fafc !important;
  border-color: #93c5fd !important;
  transform: translateX(2px) !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.08) !important;
}

.theme-light .channel-row.active {
  background: #eff6ff !important;
  border: 1.5px solid #3b82f6 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12) !important;
}

.theme-light .channel-row-name {
  color: #0f172a !important;
}

.theme-light .channel-row.active .channel-row-name {
  color: #1d4ed8 !important;
}

.theme-light .channel-row-name-text {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.theme-light .channel-row.active .channel-row-name-text {
  color: #1d4ed8 !important;
}

.theme-light .channel-row-prog {
  color: #475569 !important;
  font-weight: 500 !important;
}

.theme-light .channel-row.active .channel-row-prog {
  color: #2563eb !important;
}

.theme-light .channel-row-logo {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.theme-light .channel-row-fallback {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

.theme-light .badge-archive {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

/* 5. ЦЕНТРАЛЬНАЯ СЕКЦИЯ ПЛЕЕРА (КИНОТЕАТРАЛЬНЫЙ ДНЕВНОЙ ФОКУС) */
.theme-light .player-section {
  background: #0d111a !important; /* Благородная темная рамка, чтобы видео не выцветало */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4) !important;
}

.theme-light .video-wrapper {
  background: #000000 !important;
}

/* Контролы плеера остаются читаемыми поверх видео */
.theme-light .player-bottom-controls {
  background: linear-gradient(0deg, rgba(13, 17, 26, 0.95) 0%, rgba(13, 17, 26, 0.6) 70%, transparent 100%) !important;
}

.theme-light .channel-nav-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.theme-light .channel-nav-btn:hover {
  background: rgba(37, 99, 235, 0.6) !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

.theme-light .ctrl-btn {
  color: #ffffff !important;
}

.theme-light .ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.theme-light .restart-prog-btn {
  background: #f5f3ff !important;
  border: 1px solid #c4b5fd !important;
  color: #7c3aed !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.1) !important;
}

.theme-light .restart-prog-btn:hover {
  background: #ede9fe !important;
  border-color: #8b5cf6 !important;
  color: #6d28d9 !important;
}

/* 6. ПРАВАЯ ПАНЕЛЬ ТЕЛЕПРОГРАММЫ (EPG) — КЛЮЧЕВОЙ РЕФАКТОРИНГ */
.theme-light .side-epg-panel {
  background: #ffffff !important;
  border-left: 1px solid #e2e8f0 !important;
  box-shadow: -2px 0 12px rgba(15, 23, 42, 0.03) !important;
}

.theme-light .epg-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.theme-light .epg-header-title {
  color: #0f172a !important;
}

.theme-light .epg-header-meta {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #3b82f6 !important;
}

/* Навигатор дней в EPG */
.theme-light .epg-date-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

.theme-light .epg-date-btn:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.theme-light .epg-date-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}

/* Кнопки быстрого перехода вчера/завтра */
.theme-light .epg-day-jump-btn.epg-jump-prev {
  background: #f5f3ff !important;
  border: 1px dashed #c4b5fd !important;
  color: #7c3aed !important;
}

.theme-light .epg-day-jump-btn.epg-jump-prev:hover {
  background: #ede9fe !important;
  border-color: #8b5cf6 !important;
  color: #6d28d9 !important;
}

.theme-light .epg-day-jump-btn.epg-jump-next {
  background: #eff6ff !important;
  border: 1px dashed #bfdbfe !important;
  color: #2563eb !important;
}

.theme-light .epg-day-jump-btn.epg-jump-next:hover {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
}

.theme-light .epg-day-jump-btn .jump-badge {
  background: rgba(124, 58, 237, 0.15) !important;
  color: #7c3aed !important;
}

/* КАРТОЧКИ ПЕРЕДАЧ В EPG (.epg-item) */
.theme-light .epg-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.theme-light .epg-item:hover {
  background: #f8fafc !important;
  border-color: #93c5fd !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
}

.theme-light .epg-time-range {
  color: #2563eb !important;
  font-weight: 800 !important;
}

.theme-light .epg-item-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.theme-light .epg-item-desc {
  color: #475569 !important;
}

/* ПРЯМОЙ ЭФИР В EPG */
.theme-light .epg-item.is-live {
  background: #fff5f5 !important;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.18) !important;
}

.theme-light .epg-item.is-live::before {
  background: #ef4444 !important;
  box-shadow: 0 0 8px #ef4444 !important;
}

.theme-light .epg-status-tag.live-tag {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

.theme-light .epg-live-bar {
  background: #e2e8f0 !important;
}

.theme-light .epg-live-bar-fill {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%) !important;
}

.theme-light .epg-remain-badge {
  color: #b91c1c !important;
  font-weight: 700 !important;
}

/* АРХИВ В EPG */
.theme-light .epg-item.is-archive:hover {
  background: #faf5ff !important;
  border-color: #c084fc !important;
}

.theme-light .epg-status-tag.archive-tag {
  background: #f3e8ff !important;
  color: #7e22ce !important;
  border: 1px solid #d8b4fe !important;
}

/* ИГРАЮЩАЯ ПЕРЕДАЧА ИЗ АРХИВА */
.theme-light .epg-item.playing {
  background: #f5f3ff !important;
  border: 2px solid #8b5cf6 !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2) !important;
}

.theme-light .epg-item.playing::before {
  background: #8b5cf6 !important;
  box-shadow: 0 0 8px #8b5cf6 !important;
}

.theme-light .epg-status-tag.playing-tag {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border: 1px solid #c4b5fd !important;
}

.theme-light .epg-status-tag.future-tag {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
}

.theme-light .epg-play-hint {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #2563eb !important;
}

.theme-light .epg-play-hint.playing-hint {
  background: #ede9fe !important;
  border-color: #c4b5fd !important;
  color: #6d28d9 !important;
}

/* 7. РАЗДЕЛ ТЕЛЕПРОГРАММА (WIDE EPG HUB) */
.theme-light .programma-view-container {
  background: #f1f5f9 !important;
}

.theme-light .prog-header-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
}

.theme-light .prog-h1 {
  color: #0f172a !important;
}

.theme-light .prog-subtitle {
  color: #475569 !important;
}

.theme-light .prog-subnav-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

.theme-light .prog-subnav-btn {
  color: #475569 !important;
  font-weight: 700 !important;
}

.theme-light .prog-subnav-btn:hover {
  color: #0f172a !important;
  background: #ffffff !important;
}

.theme-light .prog-subnav-btn.active {
  background: #ffffff !important;
  color: #1d4ed8 !important;
  border: 1px solid #93c5fd !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12) !important;
}

.theme-light .prog-controls-bar {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

.theme-light .prog-date-pill {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.theme-light .prog-date-pill:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.theme-light .prog-date-pill.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}

.theme-light .prog-time-btn {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

.theme-light .prog-time-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.theme-light .prog-time-btn.active {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
}

.theme-light .prog-search-box {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

.theme-light .prog-search-input {
  color: #0f172a !important;
}

.theme-light .prog-search-input::placeholder {
  color: #94a3b8 !important;
}

.theme-light .prog-search-icon {
  color: #64748b !important;
}

/* КАРТОЧКИ КАНАЛОВ «СЕЙЧАС В ЭФИРЕ» В ТЕЛЕПРОГРАММЕ */
.theme-light .live-channel-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

.theme-light .live-channel-card:hover {
  background: #ffffff !important;
  border-color: #93c5fd !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12) !important;
}

.theme-light .live-card-logo {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.theme-light .live-card-name {
  color: #0f172a !important;
}

.theme-light .live-card-group {
  color: #64748b !important;
}

.theme-light .live-card-prog {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.theme-light .live-prog-title {
  color: #0f172a !important;
}

.theme-light .live-prog-time {
  color: #2563eb !important;
}

.theme-light .live-card-next {
  color: #64748b !important;
}

.theme-light .live-card-next-time {
  color: #0f172a !important;
}

/* СЕТКА РАСПИСАНИЯ ПО ВЫБРАННОМУ КАНАЛУ */
.theme-light .prog-channel-selector {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.theme-light .prog-chan-search {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.theme-light .prog-chan-search span {
  color: #0f172a !important;
}

.theme-light .prog-chan-item {
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.theme-light .prog-chan-item:hover {
  background: #f8fafc !important;
}

.theme-light .prog-chan-item.active {
  background: #eff6ff !important;
  border-left: 3px solid #3b82f6 !important;
}

.theme-light .prog-chan-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.theme-light .prog-chan-item.active .prog-chan-name {
  color: #1d4ed8 !important;
}

.theme-light .prog-chan-logo {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

.theme-light .prog-schedule-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.theme-light .prog-schedule-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.theme-light .prog-sched-title {
  color: #0f172a !important;
}

.theme-light .prog-sched-date {
  color: #2563eb !important;
}

.theme-light .prog-sched-logo {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

.theme-light .prog-row-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

.theme-light .prog-row-card:hover {
  background: #f8fafc !important;
  border-color: #bfdbfe !important;
}

.theme-light .prog-row-card.live {
  background: #fff5f5 !important;
  border: 2px solid #ef4444 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12) !important;
}

.theme-light .prog-row-title {
  color: #0f172a !important;
}

.theme-light .prog-row-desc {
  color: #475569 !important;
}

.theme-light .prog-row-time {
  color: #2563eb !important;
}

/* РЕЗУЛЬТАТЫ ПОИСКА ПЕРЕДАЧ */
.theme-light .search-result-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

.theme-light .search-result-card:hover {
  background: #f8fafc !important;
  border-color: #3b82f6 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.1) !important;
}

.theme-light .search-res-title {
  color: #0f172a !important;
}

.theme-light .search-res-channel {
  color: #475569 !important;
}

.theme-light .search-res-time {
  color: #2563eb !important;
}

.theme-light .search-res-desc {
  color: #64748b !important;
}

.theme-light .search-res-logo {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* 8. МОДАЛЬНЫЕ ОКНА */
.theme-light #hotkeysModal > div,
.theme-light #dmcaModal > div {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16) !important;
}

.theme-light #hotkeysModal h3,
.theme-light #dmcaModal h3 {
  color: #0f172a !important;
}

.theme-light #hotkeysModal kbd {
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.theme-light #dmcaModal p {
  color: #334155 !important;
}

.theme-light #closeHotkeysBtn,
.theme-light #closeDmcaBtn {
  color: #64748b !important;
}

.theme-light #closeHotkeysBtn:hover,
.theme-light #closeDmcaBtn:hover {
  color: #0f172a !important;
}
