/* === Layout general === */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #121212;
  color: #f0f0f0;
  margin: 0;
  padding: 0;
}

.contenido_playlists {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  min-height: calc(100vh - 305px);
}
.close-playlist {
display: block;
    width: 90px;
    margin: 30px auto 10px;
    padding: 10px 10px;
    background-color: #ff4d4d;
    color: #fff;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}


/* === Encabezado === */
h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #ffffff;
}

/* === Caja de cada playlist === */
.playlist-box {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 40px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* === Título de playlist ===
.playlist-box h3 {
  font-size: 1.4em;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
 */
/* === Botones de acción === */
.btn-delete-playlist,
.btn-rename-playlist,
.btn-delete-video,
.btn-playlist,
.btn-playlist-select,
.btn-crear-playlist {
  background-color: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin: 5px;
  transition: background-color 0.2s, transform 0.2s;
  text-decoration:none;
}

.btn-delete-video{
  float: right;
  margin-top: -36px;
  position: relative;

}
.btn-crear-playlist {
  width:80%;
}

.btn-delete-playlist:hover,
.btn-rename-playlist:hover,
.btn-delete-video:hover,
.btn-playlist:hover,
.btn-playlist-select:hover,
.btn-crear-playlist:hover {
  background-color: #444;
  transform: scale(1.05);
}

.playlist-grid {
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.playlist-grid-public {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.playlist-public{
  text-decoration:none; 
  color:inherit; 
  display:block;
}

.playlist-public img{
  width: 100%;
  max-height: 169px;
  height: auto;
}

.playlist-preview {
  width: 300px;
  background-color: #1e1e1e;
    border: 1px solid #333;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.playlist-preview:hover {
  transform: scale(1.03);
}

/* === Video individual === */
.playlist-video {
  background-color: #2a2a2a;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  margin-bottom: 10px;
}

.playlist-video img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.playlist-video a {
  color: #00bfff;
  text-decoration: none;
  font-weight: bold;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.playlist-video a:hover {
  text-decoration: none;
  font-weight: bold;
}

/* === Audio player === */
audio {
  width: 100%;
  margin-top: 10px;
  background-color: #1a1a1a;
  border-radius: 4px;
}

/* === Mensaje de archivo faltante === */
.missing-file {
  color: #ff4c4c;
  font-weight: bold;
  font-size: 14px;
  margin-top: 8px;
  width:88%;
}


.playlist-scroll {
  list-style: none;
  margin-top: 10px;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
}

.playlist-scroll::-webkit-scrollbar {
  width: 6px;
}

.playlist-scroll::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

.playlist-scroll::-webkit-scrollbar-track {
  background-color: #222;
}

.playlist-scroll li:hover {
  background-color: #333;
  color: #0af;
  transition: background 0.2s ease;
}

.control-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #888;
  transition: color 0.3s ease;
}

.control-btn:hover {
  color: #0af;
}

.active-control {
  color: #0af !important;
}

/* === Modal === */
.modal-playlist {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.btn-toggle-visibility {
  background: #555;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s ease;
}

.btn-toggle-visibility:hover {
  background: #0af;
}

.modal-content-playlist {
  background: #1e1e1e;
  padding: 25px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  color: #f0f0f0;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 20px;
}

.btn-crear-playlist {
  background-color: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.btn-crear-playlist:hover {
  background-color: #444;
  transform: scale(1.05);
}

.pesni_player{
  margin-top:10px; 
  display:flex; 
  align-items:center; 
  justify-content:space-between;
}

.player_miniatura{
  width:30px; 
  height:30px; 
  border-radius:4px; 
  margin-right:8px; 
  vertical-align:middle;
}

.pesni_player p{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  margin:0; 
  font-weight:bold; 
  color:#0af;
}

.playlist-player{
  margin-top:20px; 
  background:#222; 
  margin-bottom:10px; 
  border-radius:8px;
}


.playlist-scroll span {
  white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-scroll li{
  padding: 5px; 
  cursor: pointer; 
  display: flex; 
  align-items: center;
    white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-tracks-public{
  list-style:none; 
  margin-top:10px; 
  padding:0;
}

.playlist-tracks-public li{
  cursor:pointer; 
  padding:5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-track-public{
  margin:0; font-weight:bold; color:#0af;
}

.btn_copiarEnlace{
  background:#0af; color:white; border:none; padding:6px 12px; border-radius:4px; cursor:pointer;
}
/* === Responsive === */
@media screen and (max-width: 600px) {
  .playlist-grid {
    grid-template-columns: 1fr;
  }

  .pesni_player{
    display: block;
  }

  .pesni_player button{
    margin: 10px;
  }
  .player-controls{
    text-align: center;
  }
  .playlist-video {
    width: auto;
  }

  .btn-delete-video{
    float: right;
    margin-top: -31px;
    /* background: black; */
    width: 17px;
    /* float: right; */
    padding: 7px;
    text-align: left;
    position: relative;
  }
  .playlist-video a{
    max-width: 60%;
    text-overflow: clip;
  }
  h3 {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-delete-playlist,
  .btn-rename-playlist {
    margin-top: 10px;
  }
}
