@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

.sv-playlist-app {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  max-width: 450px;
  margin: 40px auto;
  position: relative;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 16px 40px 0 rgba(0, 0, 0, 0.15),
    0 inset 0 0 100px rgba(0, 0, 0, 0.1);
  background-color: #212530; /* Fondo para browsers sin backdrop-filter */
  color: #ffffff;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.sv-playlist-app:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px 0 rgba(0, 0, 0, 0.25);
}

.svp-glass-container {
  padding: 30px;
}

/* Player Content */
.svp-player-content {
  text-align: center;
}

.svp-track-info {
  display: none;
  margin-bottom: 25px;
}

.svp-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

/* Progress */
.svp-progress-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  gap: 15px;
}

.svp-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.svp-progress-bar {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.svp-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffffff, #ffffff);
  border-radius: 10px;
  transition: width 0.1s linear;
}

.svp-btn {
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.svp-btn:hover {
  background: #045a12;
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.svp-btn:active {
  transform: scale(0.95);
}

.svp-btn svg {
  width: 22px;
  height: 22px;
  transition: fill 0.2s ease;
}

.svp-btn-play-pause {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #045a12, #045a12);
  border: none;
  box-shadow: 0 6px 15px rgba(3, 72, 14, 0.3);
}

.svp-btn-play-pause:hover {
  background: linear-gradient(135deg, #045a12, #045a12);
  transform: scale(1.12);
  box-shadow: 0 8px 25px rgba(12, 158, 181, 0.5);
  border: none;
}

.svp-btn-play-pause svg {
  width: 28px;
  height: 28px;
}

.svp-btn-loop.svp-loop-active {
  background: #045a12;
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255,255,255,0.2) inset;
}

.svp-controls-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 15px;
  margin-bottom: 30px;
  width: 100%;
}

.svp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.svp-volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 20px;
  width: 100%;
  box-sizing: border-box;
}

.svp-icon-volume {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.7);
}

.svp-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  flex-grow: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.svp-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3699d6;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.svp-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3699d6;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  border: none;
}

/* Playlist List */
.svp-playlist {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}

.svp-tracks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 250px;
  overflow-y: auto;
}

.svp-tracks-list::-webkit-scrollbar {
  width: 6px;
}

.svp-tracks-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.svp-tracks-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.svp-track-item {
  display: flex;
  align-items: center;
  padding: 0px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 5px;
}

.svp-track-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.svp-active {
  background: rgba(255, 255, 255, 0.15) !important;
}

.svp-track-number {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  margin-right: 15px;
  font-weight: 500;
  width: 20px;
  text-align: right;
}

.svp-track-title {
  flex-grow: 1;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svp-active .svp-track-title {
  color: #3699d6;
  font-weight: 600;
}

/* EQ animation for active track */
.svp-track-playing-eq {
  display: none;
  align-items: flex-end;
  gap: 3px;
  height: 15px;
  margin-left: 10px;
}

.svp-playing .svp-active .svp-track-playing-eq {
  display: flex;
}

.svp-active .svp-track-number {
  display: none;
}
.svp-active .svp-track-playing-eq {
  display: flex;
  margin-right: 15px;
  margin-left: 0;
}

.svp-bar {
  width: 3px;
  background-color: #3699d6;
  border-radius: 3px;
  animation: svp-eq 1s ease-in-out infinite alternate;
}

.svp-bar:nth-child(1) {
  height: 8px;
  animation-delay: 0s;
}
.svp-bar:nth-child(2) {
  height: 15px;
  animation-delay: 0.2s;
}
.svp-bar:nth-child(3) {
  height: 10px;
  animation-delay: 0.4s;
}

@keyframes svp-eq {
  0% {
    height: 3px;
  }
  100% {
    height: 15px;
  }
}
