:root {
  --bg-color: #121212;
  --sidebar-color: #000000;
  --text-color: #ffffff;
  --accent-color: #1DB954;
  --card-color: #181818;
  --card-hover-color: #282828;
  --search-bg: #242424;
  --secondary-text: #aaaaaa;
  --background-color: #121212;
}

.light-theme {
  --bg-color: #f5f5f5;
  --sidebar-color: #ffffff;
  --text-color: #121212;
  --accent-color: #1DB954;
  --card-color: #ffffff;
  --card-hover-color: #efefef;
  --search-bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.3s;
}

.sidebar {
  background-color: var(--sidebar-color);
  width: 240px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: background-color 0.3s;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--accent-color);
  display: flex;
  align-items: center;
}

.logo svg {
  margin-right: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item:hover, .nav-item.active {
  color: var(--accent-color);
}

.nav-item svg {
  margin-right: 15px;
}

.divider {
  height: 1px;
  background-color: rgba(128, 128, 128, 0.3);
  margin: 20px 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-area {
  padding: 20px;
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 600px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

#search-input {
  background-color: var(--search-bg);
  border: none;
  border-radius: 20px;
  padding: 10px 15px 10px 40px;
  width: 100%;
  font-size: 14px;
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

.filters {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

select {
  background-color: rgba(128, 128, 128, 0.2);
  color: var(--text-color);
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.tracks-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.track-card {
  background-color: var(--card-color);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.track-card:hover {
  background-color: var(--card-hover-color);
  transform: translateY(-5px);
}

.track-image {
  width: 100%;
  aspect-ratio: 1;
  background-color: #333;
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #555;
  position: relative;
  overflow: hidden;
}

.track-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1DB954, #191414);
  opacity: 0.2;
}

.track-image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.2s;
}

.track-card:hover .track-image::after {
  opacity: 0.8;
}

.track-title {
  font-weight: bold;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 14px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-year {
  font-size: 12px;
  color: #777;
  margin-top: 5px;
}

.player-container {
  width: 30%;
  min-width: 400px;
  border-left: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.video-container {
  background-color: #000;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.placeholder-text {
  color: #555;
  font-size: 18px;
  text-align: center;
}

.now-playing {
  padding: 20px;
  border-bottom: 1px solid #333;
}

.now-playing-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.now-playing-artist {
  font-size: 14px;
  color: #aaa;
}

.playlist {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.playlist-item {
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
}

.playlist-item:hover {
  background-color: var(--card-hover-color);
}

.playlist-item.active {
  background-color: rgba(29, 185, 84, 0.2);
  border-left: 3px solid var(--accent-color);
}

.playlist-number {
  margin-right: 15px;
  color: #777;
  width: 20px;
}

.playlist-info {
  flex: 1;
  overflow: hidden;
}

.playlist-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.playlist-artist {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
}

.control-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
}

.play-btn {
  background-color: var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#youtube-frame {
  width: 100%;
  height: 100%;
}

.loading {
  text-align: center;
  padding: 30px;
  font-size: 18px;
  color: #aaa;
}

.loading-spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 15px;
}

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

.video-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 5;
}

.no-results {
  text-align: center;
  padding: 30px;
  font-size: 18px;
  color: #aaa;
}

.artist-section {
  margin-bottom: 30px;
}

.artist-section h2 {
  padding: 10px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
  margin-bottom: 15px;
}

.artist-tracks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 1;
  transition: opacity 0.5s;
}

.toast.hide {
  opacity: 0;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 80px;
  }
  
  .logo span, .nav-item span {
    display: none;
  }
  
  .logo {
    justify-content: center;
  }
  
  .nav-item {
    justify-content: center;
  }
  
  .nav-item svg {
    margin-right: 0;
  }
  
  .player-container {
    width: 40%;
    min-width: 350px;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    padding: 0 20px;
  }
  
  .logo {
    margin-bottom: 0;
    margin-right: 20px;
  }
  
  .nav-item {
    padding: 0 15px;
  }
  
  .divider {
    width: 1px;
    height: 30px;
    margin: 0 10px;
  }
  
  .content-area {
    flex-direction: column;
  }
  
  .player-container {
    width: 100%;
    min-width: 0;
    border-left: none;
    border-top: 1px solid #333;
  }
  
  /* Ajustes para el área de búsqueda */
  .search-area {
    flex-direction: column;
    align-items: stretch;
    padding: 15px 10px;
    width: 100%;
    position: relative;
    z-index: 50;
  }
  
  .search-container {
    width: 100%;
    margin-bottom: 10px;
  }
  
  #search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    height: 40px;
  }
  
  .search-icon {
    top: 12px;
    left: 12px;
  }
  
  .filters {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 8px;
  }
  
  .filter-select, #year-filter, #curator-filter {
    height: 38px;
    flex: 1;
    min-width: 0;
    padding: 8px;
  }
  
  #all-tracks-btn {
    width: 100%;
    margin-top: 10px;
    margin-left: 0;
    padding: 10px;
    height: 38px;
  }
  
  /* Ajustes para la vista de todas las canciones */
  .all-tracks-view {
    padding: 10px 0;
  }
  
  .all-tracks-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }
  
  .all-tracks-actions {
    width: 100%;
    margin-top: 10px;
  }
  
  .table-search {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Modifica estas propiedades en la clase tracks-container */
.tracks-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  height: 100%; /* Asegura que tome toda la altura disponible */
  box-sizing: border-box; /* Evita que el padding aumente el tamaño */
}

/* Ajusta la clase content-area para asegurar que ocupe todo el espacio disponible */
.content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  height: calc(100vh - 80px); /* Altura completa menos el header/búsqueda */
}

/* Asegura que el elemento track-list pueda crecer tanto como sea necesario */
.track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  min-height: 100%;
}

/* Asegúrate de que la vista principal tenga altura completa */
.view-content {
  height: 100%;
  display: flex;
  flex: 1;
}

/* En dispositivos móviles, ajusta la altura para contener correctamente */
@media (max-width: 768px) {
  .content-area {
    height: calc(100vh - 140px); /* Ajusta según el tamaño de la barra superior y la navegación */
  }
}

.track-card.playing {
  border-left: 3px solid var(--accent-color);
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.2);
}

.playing-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: flex-end;
  height: 16px;
  gap: 2px;
}

.playing-indicator span {
  display: inline-block;
  width: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
  animation: sound-wave 1.2s ease-in-out infinite;
}

.playing-indicator span:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}

.playing-indicator span:nth-child(2) {
  height: 16px;
  animation-delay: 0.3s;
}

.playing-indicator span:nth-child(3) {
  height: 12px;
  animation-delay: 0.6s;
}

@keyframes sound-wave {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.5);
  }
}

/* Estilos para la interfaz alternativa cuando falla la reproducción */
.alternative-player {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.error-message {
  text-align: center;
  padding: 30px;
  background-color: var(--card-color);
  border-radius: 10px;
  max-width: 80%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.error-message h3 {
  color: var(--accent-color);
  margin-bottom: 15px;
  font-size: 1.2em;
}

.error-message p {
  margin-bottom: 20px;
  color: var(--text-color);
  opacity: 0.9;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.action-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.action-btn:hover {
  background-color: #19a34c;
}

/* Estilos para el indicador de carga */
.loading-indicator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  color: white;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 10px;
}

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

/* Variables CSS para temas */
:root {
  --bg-color: #121212;
  --card-color: #181818;
  --text-color: #fff;
  --secondary-text: #aaa;
  --border-color: #333;
  --accent-color: #1DB954;
  --accent-hover-color: #1ed760;
  --error-color: #ff5555;
}

/* Tema claro */
body.light-theme {
  --bg-color: #f5f5f5;
  --card-color: #fff;
  --text-color: #111;
  --secondary-text: #555;
  --border-color: #ddd;
}

/* Estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Layout principal */
.sidebar {
  width: 220px;
  height: 100vh;
  position: fixed;
  background-color: #000;
  padding: 20px 0;
  overflow-y: auto;
}

.main-content {
  margin-left: 220px;
  padding: 20px;
  max-width: 1200px;
}

/* Barra lateral */
.logo {
  display: flex;
  align-items: center;
  padding: 0 20px 20px;
  font-size: 20px;
  font-weight: bold;
  color: white;
}

.logo svg {
  margin-right: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #b3b3b3;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item:hover, .nav-item.active {
  color: white;
}

.nav-item svg {
  margin-right: 15px;
}

.divider {
  height: 1px;
  background-color: #333;
  margin: 10px 20px;
}

/* Barra de búsqueda y filtros */
.search-area {
  margin-bottom: 20px;
}

.search-container {
  display: flex;
  align-items: center;
  background-color: var(--card-color);
  border-radius: 8px;
  padding: 0 15px;
  margin-bottom: 15px;
}

.search-icon {
  margin-right: 10px;
}

#search-input {
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  outline: none;
}

#search-input::placeholder {
  color: #777;
}

.filters {
  display: flex;
  gap: 15px;
}

select {
  padding: 8px 12px;
  background-color: var(--card-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

/* Área de contenido */
.content-area {
  display: flex;
  gap: 20px;
}

.tracks-container {
  flex: 1;
  min-width: 0;
}

.player-container {
  width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* Lista de pistas */
.track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.artist-section {
  margin-bottom: 30px;
}

.artist-section h2 {
  margin-bottom: 15px;
  font-size: 20px;
}

.artist-tracks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.track-card {
  background-color: var(--card-color);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  overflow: hidden;
}

.track-card:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.track-card.playing {
  background-color: rgba(29, 185, 84, 0.1);
  border: 1px solid var(--accent-color);
}

.track-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  position: relative;
}

.track-title {
  font-weight: bold;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  color: var(--secondary-text);
  font-size: 14px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-year {
  font-size: 12px;
  color: var(--secondary-text);
}

/* Indicador de reproducción */
.playing-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: flex-end;
  height: 15px;
}

.playing-indicator span {
  display: inline-block;
  width: 3px;
  margin-right: 3px;
  background-color: var(--accent-color);
  animation: sound 0ms -800ms linear infinite alternate;
}

.playing-indicator span:nth-child(1) {
  height: 8px;
  animation-duration: 474ms;
}

.playing-indicator span:nth-child(2) {
  height: 13px;
  animation-duration: 433ms;
}

.playing-indicator span:nth-child(3) {
  height: 10px;
  animation-duration: 407ms;
}

@keyframes sound {
  0% {
    height: 3px;
  }
  100% {
    height: 15px;
  }
}

/* Contenedor de video */
.video-container {
  width: 100%;
  background-color: #000;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.placeholder-text {
  color: #555;
  font-size: 16px;
  text-align: center;
  padding: 20px;
}

/* Información de reproducción actual */
.now-playing {
  margin-bottom: 20px;
}

.now-playing-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 5px;
}

.now-playing-artist {
  color: var(--secondary-text);
}

/* Lista de reproducción */
.playlist {
  flex: 1;
  overflow-y: auto;
  background-color: var(--card-color);
  border-radius: 8px;
  margin-bottom: 20px;
  max-height: 300px;
}

.playlist-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.playlist-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
  background-color: rgba(29, 185, 84, 0.1);
}

.playlist-number {
  width: 25px;
  color: var(--secondary-text);
  font-size: 14px;
  text-align: center;
}

.playlist-info {
  flex: 1;
  min-width: 0;
}

.playlist-title {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-artist {
  font-size: 14px;
  color: var(--secondary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controles de reproducción */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.play-btn {
  background-color: var(--accent-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Estilos para estados de carga y error */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--secondary-text);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--secondary-text);
}

/* Video loading */
.video-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: white;
  padding: 20px;
  text-align: center;
}

/* Interfaz alternativa para cuando falla la reproducción */
.alternative-player {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-message {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  max-width: 90%;
}

.error-message h3 {
  color: var(--error-color);
  margin-bottom: 10px;
}

.error-message p {
  margin-bottom: 20px;
  color: #ddd;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

.action-btn:hover {
  background-color: var(--accent-hover-color);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.toast {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s, fadeOut 0.3s ease forwards;
  animation-delay: 0s, 4.7s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* Reglas responsive para móviles (DESACTIVADAS) */
@media screen and (max-width: 768px) {
  /* Layout principal */
  .sidebar {
    /* Mantener la barra lateral como en desktop */
    width: 200px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto;
    display: block;
    padding: 20px 0;
    box-shadow: none;
  }
  
  .main-content {
    margin-left: 200px;
    padding: 20px;
    padding-bottom: 20px;
  }
  
  /* Conservar el layout de escritorio */
  .content-area {
    flex-direction: row;
    padding-bottom: 20px;
  }
  
  .tracks-container {
    order: 0;
    width: 60%;
    margin-top: 0;
  }
  
  .player-container {
    width: 40%;
    order: 0;
  }
  
  /* Ocultar tabs móviles */
  .mobile-tabs {
    display: none;
  }
  
  /* Dejar el tamaño de las tarjetas como en desktop */
  .track-card {
    min-height: unset;
    padding: 15px;
  }
  
  /* Mismo espaciado que en desktop */
  .track-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  /* Mantener el tamaño de fuente original */
  .track-title,
  .track-artist {
    font-size: inherit;
  }
}

/* Ocultar elementos específicos para móvil */
.mobile-visible {
  display: none !important;
}

.mobile-fullwidth {
  /* Mantener el ancho normal, no ocupar todo el ancho */
  width: auto;
  max-width: 100%;
}

/* Estilos para la vista de tabla (Ver todas las canciones) */
.all-tracks-view {
  margin-top: 15px;
  padding: 0 15px;
}

.all-tracks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.all-tracks-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.table-search {
  padding: 8px 15px;
  border-radius: 4px;
  border: none;
  background-color: var(--search-bg);
  color: var(--text-color);
  margin-right: 10px;
  width: 250px;
}

.track-table-container {
  overflow-x: auto;
  max-height: 70vh;
  border-radius: 8px;
  background-color: var(--card-color);
}

.track-table {
  width: 100%;
  border-collapse: collapse;
}

.track-table th, .track-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.track-table th {
  background-color: rgba(0, 0, 0, 0.3);
  font-weight: 500;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sortable {
  cursor: pointer;
}

.sortable:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.sort-icon {
  margin-left: 5px;
  font-size: 12px;
}

.track-row {
  transition: background-color 0.2s;
  cursor: pointer;
}

.track-row:hover {
  background-color: var(--card-hover-color);
}

.play-track-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-track-btn:hover {
  background-color: rgba(29, 185, 84, 0.2);
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
  padding: 10px;
}

.pagination-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
}

.pagination-btn:disabled {
  background-color: rgba(29, 185, 84, 0.3);
  cursor: not-allowed;
}

.page-size-select {
  padding: 8px;
  border-radius: 4px;
  border: none;
  background-color: var(--search-bg);
  color: var(--text-color);
}

/* Ajustes móviles para la vista de tabla */
@media (max-width: 768px) {
  .all-tracks-view {
    padding: 0 10px;
  }
  
  .all-tracks-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .all-tracks-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
  }
  
  .all-tracks-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  
  .table-search {
    width: 100%;
    margin-right: 0;
  }
  
  .track-table-container {
    max-height: calc(100vh - 250px);
  }
  
  .track-table th, .track-table td {
    padding: 10px 8px;
    font-size: 14px;
  }
  
  /* Ocultar columnas menos importantes en móvil */
  .track-table th:nth-child(3),
  .track-table td:nth-child(3),
  .track-table th:nth-child(4),
  .track-table td:nth-child(4) {
    display: none;
  }
  
  /* Ajustar botones de paginación */
  .pagination-controls {
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    bottom: 65px;
    background: var(--bg-color);
    z-index: 20;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    margin: 0 -10px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .page-size-select {
    font-size: 14px;
  }
}

/* Estilos para la página de búsqueda */
.search-container-full {
  padding: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow-y: auto;
  max-height: 100%;
}

#search-view {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Para mejor desplazamiento en iOS */
}

@media (max-width: 768px) {
  #search-view {
    height: calc(100vh - 120px);
    padding-bottom: 70px; /* Espacio para el menú inferior */
  }
  
  .search-container-full {
    padding: 15px 10px;
  }
  
  .search-section {
    margin-bottom: 30px;
  }
  
  .mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 100;
  }
}

.search-header {
  margin-bottom: 30px;
  text-align: center;
}

.search-header h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.search-input-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
}

.search-input-large {
  flex: 1;
  padding: 15px 20px;
  border-radius: 30px 0 0 30px;
  border: none;
  background-color: var(--card-color);
  color: var(--text-color);
  font-size: 16px;
}

.search-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 0 25px;
  border-radius: 0 30px 30px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-section {
  margin-bottom: 40px;
}

.search-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.genre-card {
  background-color: var(--card-color);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.genre-card:hover {
  background-color: var(--card-hover-color);
}

.decade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.decade-card {
  background-color: var(--card-color);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.decade-card:hover {
  background-color: var(--card-hover-color);
}

.decade-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.decade-text {
  font-weight: bold;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}

.artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.artist-avatar {
  width: 120px;
  height: 120px;
  background-color: var(--card-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 10px;
  transition: background-color 0.2s;
}

.artist-card:hover .artist-avatar {
  background-color: var(--card-hover-color);
}

.artist-name {
  text-align: center;
  font-weight: 500;
}

.search-results {
  margin-bottom: 40px;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 10px;
}

.search-track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.search-more-info {
  grid-column: 1 / -1;
  text-align: center;
  padding: 15px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Estilos responsivos para la página de búsqueda */
@media (max-width: 768px) {
  .search-header h2 {
    font-size: 1.5rem;
  }
  
  .search-input-large {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .search-button {
    padding: 0 15px;
  }
  
  .search-section h3 {
    font-size: 1.2rem;
  }
  
  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .decade-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .artist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .artist-avatar {
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }
  
  .search-track-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* Ajustes específicos para la vista de búsqueda en móvil */
body.mobile-device #search-view {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 60px; /* Altura de la barra de navegación */
  overflow-y: auto;
  padding: 15px;
  z-index: 50;
  background-color: var(--bg-color);
}

/* Estilos para hacer que los elementos de búsqueda sean más fáciles de tocar en móvil */
@media (max-width: 768px) {
  .genre-card, .decade-card, .artist-card {
    cursor: pointer;
    min-height: 44px; /* Mínimo para áreas táctiles */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .artist-avatar {
    margin-bottom: 5px;
    width: 80px;
    height: 80px;
  }
  
  .search-button {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Asegurar que los resultados de búsqueda sean scrollables */
  .search-results {
    max-height: none;
    overflow: visible;
  }
  
  /* Fix para el evento de scroll dentro de la vista de búsqueda */
  #search-view .search-container-full {
    -webkit-overflow-scrolling: touch;
    max-height: none;
    height: auto;
  }
}

.search-header-top {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  width: 100%;
}

.search-header-top h2 {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.3rem;
}

.back-button {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.back-button svg {
  margin-right: 5px;
}

@media (max-width: 768px) {
  .search-header-top {
    margin-bottom: 10px;
  }
  
  .search-header-top h2 {
    font-size: 1.1rem;
  }
  
  .back-button {
    font-size: 14px;
    padding: 6px 10px;
  }
  
  /* Mejorar la visualización en resultados de búsqueda */
  #search-results {
    position: relative;
    z-index: 20;
    margin-top: 15px;
  }
  
  #search-results h3 {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    padding: 10px 0;
    z-index: 10;
    margin: 0 0 10px 0;
  }
  
  .search-track-list {
    padding-bottom: 80px; /* Espacio para el menú de navegación */
  }
}

/* Mejoras para indicadores de carga */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  margin: 20px auto;
  max-width: 80%;
}

.mobile-visible {
  z-index: 1000;
  position: relative;
  width: 90%;
  max-width: 350px;
  margin: 15px auto;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.responsive-loading-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* Mejorar visibilidad del spinner en dispositivos móviles */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .spinner {
    width: 50px;
    height: 50px;
    border-width: 5px;
  }
  
  .loading-text {
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
  }
  
  .error-message {
    background-color: rgba(220, 53, 69, 0.85);
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 16px;
    width: 90%;
    margin: 15px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
}

/* Estilos base para ambos temas */
:root {
  --accent-color: #1DB954;
  --text-color: #ffffff;
  --secondary-text: #aaaaaa;
  --background-color: #121212;
  --card-color: rgba(0, 0, 0, 0.3);
  --card-hover-color: rgba(29, 185, 84, 0.1);
  --search-bg: rgba(255, 255, 255, 0.1);
}

/* Estilos específicos para Trance */
.trance-style {
  --accent-color: #1DB954;
  --card-color: rgba(0, 0, 0, 0.3);
  --card-hover-color: rgba(29, 185, 84, 0.1);
  --gradient-start: #1DB954;
  --gradient-end: #191414;
}

/* Estilos específicos para Techno */
.techno-style {
  --accent-color: #FF4500;
  --card-color: rgba(0, 0, 0, 0.4);
  --card-hover-color: rgba(255, 69, 0, 0.1);
  --gradient-start: #FF4500;
  --gradient-end: #000000;
}

/* Botones de cambio de estilo */
.style-buttons {
  display: flex;
  gap: 8px;
  margin: 0 16px;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: 8px;
  align-items: center;
}

.style-button {
  flex: 1;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.style-button:hover {
  background: var(--accent-color);
  color: var(--text-on-accent);
}

.style-button.active {
  background: var(--accent-color);
  color: var(--text-on-accent);
  border-color: var(--accent-color);
}

.reload-button {
  padding: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.reload-button:hover {
  background: var(--accent-color);
  color: var(--text-on-accent);
  transform: rotate(180deg);
}

.reload-button i {
  font-size: 14px;
}

/* Estilos específicos para el modo Techno */
body.techno-mode {
  --accent-color: #FF3E3E;
  --bg-primary: #1A1A1A;
  --bg-secondary: #2A2A2A;
  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;
}

body.techno-mode .style-button.active {
  background: #FF3E3E;
}

body.techno-mode .nav-item.active {
  background: #FF3E3E;
}

body.techno-mode .track-card:hover {
  background: #2A2A2A;
  transform: scale(1.02);
}

body.techno-mode .track-card.active {
  background: #FF3E3E;
  color: white;
}

body.techno-mode .loading-spinner {
  border: 3px solid #FF3E3E;
  border-top: 3px solid transparent;
}

body.techno-mode .theme-toggle {
  background: #FF3E3E;
}

body.techno-mode .theme-toggle:hover {
  background: #FF5E5E;
}
