/* === Reset y base === */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #0e0e0e;
  color: #fff;
}

.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* === Reproductor === */
.player {
  position: relative;
  flex: 2.5;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}





video {
  width: 100%;
  height: auto;
  max-height: 100%;
  z-index: 1;
  background: #000;
}

#video.loading {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  height: 0;
}

/* === Pantalla de carga === */
#loading-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner-container {
  text-align: center;
  color: white;
  font-size: 1rem;
  max-width: 80%;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === Lista de canales === */
.channel-list {
  flex: 1;
  background: #1c1c1c;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.channel-list input {
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  background: #2c2c2c;
  color: #fff;
}

.channel-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.channel-list li {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: #2a2a2a;
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
}

.channel-list li:hover {
  background: #3a3a3a;
}

.channel-list img {
  width: 36px;
  height: 36px;
  margin-right: 0.7rem;
  object-fit: contain;
}

.channel-list span {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Estado de canal === */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.6rem;
  background-color: gray;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online {
  background-color: limegreen;
}

.status-dot.offline {
  background-color: red;
}

/* === Paginación === */
#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  gap: 0.5rem;
}

#pagination button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  background: #444;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

#pagination button:hover:enabled {
  background: #666;
}

#pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Botones de playlist === */
.playlist-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.playlist-buttons button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.playlist-buttons button:hover {
  background-color: #0056b3;
}

@media (max-width: 600px) {
  .playlist-buttons {
    flex-direction: column;
    align-items: center;
  }

  .playlist-buttons button {
    width: 80%;
    margin-bottom: 6px;
  }
}

video.poster-visible {
  object-fit: contain;
  width: 80%;
  border: 2px solid #444;
}







