/* NovaStream IPTV - Views & Modals Stylesheet */

/* GRID VIEWS (Movies, Series, Live Guide, Search) */
.view-header {
  padding: 40px 60px 20px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.view-heading {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

/* Category Filter Tabs (Pills) */
.category-pills-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 10px 60px 24px 60px;
  overflow-x: hidden;
  overflow-y: visible;
}

.category-pills-bar::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.pill-btn.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  transform: scale(1.06);
  color: #ffffff;
}

/* Grid Container */
.grid-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 10px 60px 80px 60px;
}

/* ==========================================================================
   LIVE TV 3-COLUMN REDESIGN (TiviMate / Sky Q Layout)
   Col 1: Categories (~290px) | Col 2: Channel Rows (~530px) | Col 3: EPG Detail (flex: 1)
   ========================================================================== */

#view-live.active.split-layout {
  display: flex !important;
  flex-direction: row;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  background: var(--bg-primary);
}
#view-live:not(.active) {
  display: none !important;
}

/* --- COLUMN 1: LIVE SIDEBAR CATEGORIES --- */
.live-sidebar-cats {
  width: 310px;
  min-width: 310px;
  max-width: 310px;
  height: 100%;
  background: rgba(11, 14, 21, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.live-sidebar-header {
  padding: 28px 24px 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.live-sidebar-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-sidebar-header h2 svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
}

.live-categories-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 14px 260px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.live-categories-list::-webkit-scrollbar {
  display: none;
}

.live-cat-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-cat-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.live-cat-btn.active {
  background: rgba(229, 9, 20, 0.18);
  border-left: 4px solid var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.live-cat-btn.focused {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.55);
  color: #ffffff;
  transform: translateX(4px);
  z-index: 2;
}

/* --- COLUMN 2: WIDE CHANNELS LIST (FLEX: 1, FULL REMAINING WIDTH) --- */
.live-channels-column {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  height: 100%;
  background: rgba(14, 17, 24, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.live-channels-header {
  padding: 26px 44px 18px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.live-channels-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-channels-count {
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 12px;
}

.live-channels-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 44px 280px 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.live-channels-list::-webkit-scrollbar {
  display: none;
}

/* Wide Channel Row (~74px height, comfortable and spacious) */
.live-channel-row {
  width: 100%;
  height: 74px;
  min-height: 74px;
  max-height: 74px;
  border-radius: 12px;
  background: rgba(22, 27, 39, 0.85);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 18px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.live-channel-row:hover {
  background: rgba(30, 36, 52, 0.95);
}

.live-channel-row.focused {
  background: #232a3c;
  border-color: #ffffff;
  box-shadow: 0 0 22px rgba(229, 9, 20, 0.6), inset 0 0 0 1px #ffffff;
  transform: scale(1.012);
  z-index: 5;
}

.live-channel-row.active-playing {
  border-left: 5px solid var(--accent);
}

.channel-num-badge {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
  width: 38px;
  text-align: right;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.live-channel-row.focused .channel-num-badge {
  color: var(--accent);
}

.live-channel-logo-box {
  width: 68px;
  height: 48px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.live-channel-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.live-channel-info-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.live-channel-name-txt {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.live-channel-sub-txt {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.live-channel-row.focused .live-channel-sub-txt {
  color: #cbd5e1;
}

.live-channel-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.live-channel-quality-badge {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.live-badge-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 9, 20, 0.85);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}

/* Hide legacy EPG detail styles */
.live-epg-detail-panel {
  display: none !important;
}

/* --- COLUMN 3: PREVIEW & EPG DETAIL PANEL --- */
.live-epg-detail-panel {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: radial-gradient(circle at 90% 10%, rgba(229, 9, 20, 0.07) 0%, transparent 60%),
              linear-gradient(180deg, rgba(14, 17, 24, 0.98) 0%, rgba(9, 11, 16, 0.98) 100%);
  padding: 36px 44px 80px 44px;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.live-epg-detail-panel::-webkit-scrollbar {
  display: none;
}

.epg-panel-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  height: 100%;
}

/* Empty State */
.epg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 60%;
  color: var(--text-secondary);
  gap: 14px;
  max-width: 440px;
  margin: auto;
}

.epg-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.epg-empty-icon svg {
  width: 38px;
  height: 38px;
  fill: var(--text-muted);
}

.epg-empty-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.epg-empty-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Channel Identity Header */
.epg-channel-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.epg-channel-logo-container {
  width: 100px;
  height: 70px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}

.epg-channel-logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.epg-channel-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.epg-channel-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.epg-badge-live {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(229, 9, 20, 0.85);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.epg-badge-cat {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.epg-channel-name {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

/* Now Playing Card */
.epg-now-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px 24px;
}

.epg-now-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.epg-now-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.epg-now-time {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.epg-now-time svg {
  width: 16px;
  height: 16px;
  fill: var(--text-secondary);
}

.epg-now-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

/* Progress bar */
.epg-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 2px 0;
}

.epg-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.epg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #b80610 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.epg-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.epg-synopsis {
  font-size: 15px;
  line-height: 1.55;
  color: #cbd5e1;
  max-height: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Next Program Slot ("A Seguire") */
.epg-next-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.epg-next-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.epg-next-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.epg-next-time {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.epg-next-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-next-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Call to Action Button */
.epg-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.btn-live-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e50914 0%, #b80610 100%);
  color: #ffffff;
  border: 2px solid transparent;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  width: fit-content;
}

.btn-live-play svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.btn-live-play:hover, .btn-live-play.focused {
  border-color: #ffffff;
  box-shadow: 0 0 24px rgba(229, 9, 20, 0.8), 0 0 8px #ffffff;
  transform: scale(1.03);
}

.epg-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

/* SEARCH VIEW (On-screen TV Keyboard + Results) */

.search-input-display {
  width: 100%;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.keyboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.key-btn {
  height: 56px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 16px;
  padding: 0;
  letter-spacing: -0.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.key-btn.wide {
  grid-column: span 2;
}

.key-btn.extra-wide {
  grid-column: span 3;
}

.key-btn.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* DETAILS MODAL (Netflix Style Backdrop Popout) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  width: 90%;
  max-width: 1300px;
  max-height: 88vh;
  background: var(--bg-secondary);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.modal-hero {
  position: relative;
  width: 100%;
  height: 480px;
  background-size: cover;
  background-position: center top;
}

.modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-secondary) 0%, rgba(16, 19, 28, 0.8) 50%, transparent 100%),
              linear-gradient(90deg, var(--bg-secondary) 0%, rgba(16, 19, 28, 0.7) 40%, transparent 100%);
}

.modal-hero-content {
  position: absolute;
  bottom: 30px;
  left: 50px;
  max-width: 900px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-title {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.modal-synopsis {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-height: 100px;
  overflow: hidden;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.modal-series-section {
  padding: 30px 50px 500px 50px;
  overflow-y: auto;
  flex: 1;
}

.season-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.episode-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.episode-item.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.02);
}

.ep-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-muted);
  width: 40px;
}

.ep-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ep-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.ep-plot {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 900px;
}

/* SETTINGS VIEW */
.settings-container {
  padding: 40px 60px 80px 60px;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.settings-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 28px 36px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 20px;
  font-weight: 600;
}

.settings-val {
  font-size: 18px;
  color: var(--accent-secondary);
  font-weight: 700;
}

.btn-action {
  padding: 12px 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-action.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  transform: scale(1.06);
}

.btn-danger {
  background: rgba(229, 9, 20, 0.25);
  color: #ff5e66;
}

.btn-danger.focused {
  background: var(--accent);
  color: #ffffff;
}

/* Enhanced Netflix Search Layout */
.search-layout {
  display: flex;
  gap: 32px;
  padding: 30px 40px;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.search-keyboard-panel {
  width: 440px;
  min-width: 360px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.search-results-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 400px;
  padding-right: 30px;
}

.search-results-panel::-webkit-scrollbar {
  display: none;
}



