/* ── Overlay fullscreen do player ── */
.cs-player-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  animation: cs-fade-in 300ms ease forwards;
}

@keyframes cs-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Vídeo ── */
.cs-player__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex: 1;
  min-height: 0;
}

/* ── Header flutuante ── */
.cs-player__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.cs-player__title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-player__quality-badge {
  background: var(--accent, #e50914);
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.cs-player__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.cs-player__close:hover {
  opacity: 0.7;
}

/* ── Loading ── */
.cs-player__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 16px;
}

.cs-player__loading-text {
  color: #fff;
  font-size: 1rem;
  opacity: 0.9;
}

.cs-player__spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cs-spin 0.8s linear infinite;
}

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

/* ── Erro ── */
.cs-player__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 20px;
  color: #fff;
  text-align: center;
  padding: 24px;
}

.cs-player__error p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 400px;
}

.cs-player__close-btn {
  padding: 10px 28px;
  background: var(--accent, #e50914);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.cs-player__close-btn:hover {
  opacity: 0.85;
}

/* ── Botão "▶ Assistir" no modal ── */
.btn-watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--accent, #e50914);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}

.btn-watch:hover:not(:disabled) {
  opacity: 0.85;
}

.btn-watch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Botão play por stream na lista ── */
.btn-play-stream {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent, #e50914);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.btn-play-stream:hover {
  opacity: 0.85;
}

/* Badge qualidade CAM */
.quality-badge--cam {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
