/* Horizontal Player Styles */
.horizontal-player {
  display: flex;
  align-items: center;
  background-color: #d4e9ff;
  border-radius: 16px;
  padding: 16px;
  /* box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); */
  border: 1px solid rgba(13, 110, 253, 0.12);
  width: 100%;
  max-width: 100%;
  margin: 10px 0px 0px 0px;
  gap: 16px;
  color: #1e1e28;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.album-artwork {
  position: relative; /* Necessário para posicionamento absoluto do skeleton */
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #f4f6fb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(13, 110, 253, 0.15);
}

.album-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.album-artwork img.loaded {
  opacity: 1;
}

/* Skeleton loading para a capa do álbum */
.album-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 12px;
  z-index: 1;
}

.album-skeleton.hidden {
  display: none;
}

@keyframes skeleton-loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.album-artwork .default-artwork {
  font-size: 2.5rem;
  color: #0d6efd;
  font-weight: 400;
}

.player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.now-playing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.now-playing-label {
  font-size: 0.75rem;
  color: #6b6b78;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #6b6b78;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48bb78;
  animation: pulse 2s infinite;
}

.status-dot.connecting {
  background: #f0ad4e;
}

.status-dot.paused {
  background: #adb5bd;
  animation: none;
}

.status-dot.error,
.status-dot.disconnected {
  background: #dc3545;
  animation: none;
}

.status-dot.playing,
.status-dot.online {
  background: #48bb78;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.song-info {
  margin-bottom: 8px;
}

.song-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e1e28;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.song-artist {
  font-size: 0.8rem;
  color: #6b6b78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-button {
  background: #f0f4ff;
  border: 1px solid rgba(13, 110, 253, 0.15);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #0d6efd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  background-clip: padding-box;
  touch-action: manipulation;
}

.control-button:hover {
  background: #e3ebff;
  transform: translateY(-1px);
}

.control-button:active {
  transform: translateY(0);
}
.play-button {
  width: 37px;
  height: 37px;
  background: #0d6efd;
  color: #ffffff;
  border-color: #0d6efd;
  box-shadow: 0 8px 16px rgba(13, 110, 253, 0.25);
}

.play-button:hover {
  box-shadow: 0 10px 20px rgba(13, 110, 253, 0.3);
  background: #0b5ed7;
  border-color: #0b5ed7;
}

.play-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.volume-icon {
  color: #4a4e69;
  font-size: 0.9rem;
  cursor: pointer;
}

.volume-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #9ab1de;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0d6efd;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.45);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0d6efd;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.45);
}

.error-message {
  background: #fed7d7;
  color: #c53030;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-top: 10px;
  display: none;
}

/* Responsive design */
@media (max-width: 480px) {
  .horizontal-player {
    max-width: 100%;
    padding: 12px;
    gap: 12px;
    position: relative;
  }

  .album-artwork {
    width: 130px;
    height: 130px;
  }

  .album-artwork .default-artwork {
    font-size: 2.2rem;
  }

  .song-title {
    font-size: 0.85rem;
  }

  .song-artist {
    font-size: 0.75rem;
  }

  .control-button {
    width: 36px;
    height: 36px;
  }

  .play-button {
    width: 38px;
    height: 38px;
    position: absolute;
    bottom: 15px;
    right: 18px;
    z-index: 10;
  }

  .volume-slider {
    height: 3px;
  }

  /* Ocultar controles de volume no mobile */
  #volumeButton,
  .volume-slider {
    display: none;
  }
}
