﻿/* NovaStream IPTV - Fullscreen Video Player Stylesheet */

#player-container {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

#player-container.active {
  display: block;
}

/* Video Element */
.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain; /* default aspect ratio */
  background: #000000;
}

.video-element.fit-fill {
  object-fit: fill;
}

.video-element.fit-cover {
  object-fit: cover;
}

/* OSD (On-Screen Display) Overlay */
.player-osd {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 60px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, transparent 25%, transparent 70%, rgba(0, 0, 0, 0.9) 100%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.player-osd.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Top Bar */
.osd-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.osd-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.osd-channel-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.osd-title {
  font-size: 34px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.osd-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.osd-clock {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Center Spinner */
.player-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 20;
}

.player-spinner.active {
  display: flex;
}

.spinner-circle {
  width: 68px;
  height: 68px;
  border: 5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-text {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Bottom Controls */
.osd-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Progress bar for VOD */
.osd-progress-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}

.osd-time {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  width: 70px;
}

.osd-time.total {
  text-align: right;
}

.osd-timeline-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.osd-buffered {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
}

.osd-played {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
}

/* Control Buttons Row */
.osd-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.osd-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.osd-btn svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

.osd-btn.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.15);
}

.osd-btn.active {
  background: var(--accent);
}

/* LIVE CHANNEL QUICK ZAPPER (Bottom Drawer on TV) */
.live-zapper-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(7, 8, 11, 0.98) 0%, rgba(7, 8, 11, 0.8) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 50px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  transform: translateY(100%);
  transition: transform var(--transition-smooth);
  z-index: 100;
}

.live-zapper-bar.visible {
  transform: translateY(0);
}

.live-zapper-bar::-webkit-scrollbar {
  display: none;
}

.zapper-card {
  flex-shrink: 0;
  width: 220px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.zapper-card.current {
  border-color: var(--accent);
  background: rgba(229, 9, 20, 0.15);
}

.zapper-card.focused {
  border-color: var(--focus-border);
  box-shadow: var(--focus-glow);
  transform: scale(1.08) translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.zapper-logo {
  height: 45px;
  max-width: 90px;
  object-fit: contain;
}

.zapper-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}
