.spotify-widget-container {
  position: relative;
  width: max-content;
  height: max-content;
  justify-content: center;
  margin: 0 auto;
}

#spotify-widget {
  position: fixed;
  top: 33.1%;
  left: 72.2%;
  transform: translate(-50%, -50%);
  width: 565px;
  max-width: 90vw;
  max-height: 90vw;
  height: 270px;
  border-radius: 20px;
  box-sizing: border-box;
  padding: 0 34px;
  background: linear-gradient(
    135deg,
    rgba(121, 121, 121, 0.13),
    rgba(200, 16, 47, 0.13),
    rgba(1, 32, 105, 0.13),
    rgba(39, 39, 39, 0.13)
  );
  backdrop-filter: none;
  border: 3px solid rgba(0, 0, 0, 0);
  border-top: none;
  border-right: none;
  border-left: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
  transition: box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out, background 0.3s ease-in-out;
}

#spotify-widget > * {
  position: relative;
  z-index: 3;
  margin-top: 0;
  margin-bottom: 0;
}

#spotify-widget.hidden {
  opacity: 1;
  pointer-events: none;
}

#spotify-widget.active {
  border-color: #1db954 !important;
}

#spotify-widget.inactive {
  border-color: #747f8d !important;
}

#spotify-widget #album-art {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  margin-right: 12px;
  object-fit: cover;
  display: block;
}

#spotify-widget .song-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  overflow: hidden;
}

#spotify-widget #song-name {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  text-align: left;
}

[data-theme="light"] #spotify-widget #song-name {
  color: rgb(0, 0, 0);
}

#spotify-widget #artist-name {
  font-size: 0.85rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

[data-theme="light"] #spotify-widget #artist-name {
  color: rgb(0, 0, 0);
}

#spotify-widget .progress-container {
  width: 100%;
  background-color: transparent;
  height: 4px;
  border-radius: 4px;
  margin-top: 5px;
  overflow: hidden;
}

#spotify-widget #progress-bar {
  background-color: #ffffff;
  height: 100%;
  width: 0%;
  transition: width 0.2s linear;
}

[data-theme="light"] #spotify-widget #progress-bar {
  background-color: #000000;
}

.time-wrapper {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

#time-display {
  font-size: 0.9em;
  margin-top: 4.4px;
  color: #ffffff;
  font-variant-numeric: lining-nums;
}

[data-theme="light"] #time-display {
  color: #000000;
}

.off-status-text {
  position: relative;
  width: 100%;
  display: flex;
  text-align: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #ffffff;
  border: 3px #747f8d;
  font-style: italic;
  pointer-events: none;
  user-select: none;
  z-index: 10;
}

[data-theme="light"] .off-status-text {
  color: #000000;
  border: 3px #747f8d;
}

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

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes swipe {
  0% {
    background-position: 100% 0%;
  }
  100% {
    background-position: -300% 0%;
  }
}

.reconnecting-spinner {
  position: relative;
  left: -5%;
  width: 42px;
  height: 42px;
  display: flex;
  text-align: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 20;
}

[data-theme="light"] .reconnecting-spinner {
  border: 4px solid rgba(0, 0, 0, 0);
  border-top-color: #000000;
}

.reconnecting-text {
  display: none;
  position: relative;
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
  z-index: 20;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  background: linear-gradient(90deg, #ffffff 0%, transparent 10%, #ffffff 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: blink 1.4s ease-in-out infinite, swipe 2.5s linear infinite;
}

[data-theme="light"] .reconnecting-text {
  background: linear-gradient(90deg, #000000 0%, transparent 10%, #000000 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: blink 1.4s ease-in-out infinite, swipe 2.5s linear infinite;
}

#spotify-widget.reconnecting .reconnecting-spinner,
#spotify-widget.reconnecting .reconnecting-text {
  display: block;
}

#spotify-widget.reconnecting #off-status,
#spotify-widget.reconnecting #album-art,
#spotify-widget.reconnecting .song-info {
  display: none !important;
}

@media (max-width: 1285.6px) {
  .spotify-widget-container {
    display: none;
  }
}
