/* User defined, modify these to your liking */

/* Purple theme */
/* :root {
    --custom-bg-body: rgba(97, 72, 145, 0.65);
    --custom-bg-player: rgba(97, 72, 145, 0.65);
    --custom-border-color: rgba(97, 72, 145, 0.65);
    --custom-shadow-color: rgba(0, 0, 0, 0.15);

    --custom-top-bg: rgba(97, 72, 145, 0.65);
    --custom-cover-bg: rgba(97, 72, 145, 0.65);
    --custom-middle-bg: rgba(97, 72, 145, 0.65);
    --custom-queue-bg: rgba(97, 72, 145, 0.65);
    --custom-queue-text: rgba(255, 255, 255, 0.65);
    --custom-album-text: rgba(255, 255, 255, 0.65);

    --custom-progress-bg: rgba(97, 72, 145, 0.65);
    --custom-progress-fill: rgba(137, 72, 178, 0.65);
    --custom-time-color: rgba(255, 255, 255, 0.65);

    --custom-button-bg: rgba(97, 72, 145, 0.65);
    --custom-button-bg-disabled: rgba(97, 72, 145, 0.65);
    --custom-button-hover: rgba(137, 72, 178, 0.65);
    --custom-button-icon: rgba(255, 255, 255, 0.65);

    --custom-volume-accent: rgba(137, 72, 178, 0.65);
    --custom-toggle-bg: rgba(97, 72, 145, 0.65);
} */

/* Dark theme */
:root {
    --custom-bg-body: #1a202c;
    --custom-bg-player: #3b3f4e;
    --custom-border-color: #6c757d;
    --custom-shadow-color: rgba(0, 0, 0, 0.15);

    --custom-top-bg: #4b5162;
    --custom-cover-bg: #2c313a;
    --custom-middle-bg: #3b3f4e;
    --custom-queue-bg: #4b5162;
    --custom-queue-text: #e9ecef;
    --custom-album-text: #e9ecef;

    --custom-progress-bg: #6c757d;
    --custom-progress-fill: #9a00e8;
    --custom-time-color: #e9ecef;

    --custom-button-bg: #6c757d;
    --custom-button-bg-disabled: #6c757d;
    --custom-button-hover: #9a00e8;
    --custom-button-icon: #e9ecef;

    --custom-volume-accent: #9a00e8;
    --custom-toggle-bg: #2c313a;
}

.cover-img {
    height:120px; 
    width:120px; 
    border-radius:8px;
}

.music-player {
    width: 315px;
    height: 480px;
    background-color: var(--custom-bg-player);
    border: 1px solid var(--custom-border-color);
    border-radius: 1px 8px 8px 1px;
    overflow: hidden;
    box-shadow: 0 0 15px var(--custom-shadow-color);
    position: fixed;
    left: 0;
    top: 75%;
    transform: translateY(-50%);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 998;
}

.music-player.hidden {
    left: -300px;
    display: flex !important;
}

.top-section {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: var(--custom-top-bg);
    color: #fff;
}

.cover {
    width: 120px;
    height: 120px;
    background-color: var(--custom-cover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 6px;
    color: #fff;
}

.middle-section {
    flex: 1;
    display: flex;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    background-color: var(--custom-middle-bg);
}

.left-column {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.album-title {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--custom-album-text);
}

.queue {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.5rem;
    background: var(--custom-queue-bg);
    border-radius: 6px;
    overflow-y: auto;
    color: var(--custom-queue-text);
    max-height: 120px;
}

#player-list {
  counter-reset: track;
  list-style: none;
  padding: 0;
  margin: 0;
}

#player-list li {
  counter-increment: track;
  position: relative;
  cursor: pointer;
  color: var(--custom-queue-text);
  margin-bottom: 4px;
  padding-left: 1.3rem; /* Space for number bubble */
}

#player-list li::before {
  content: counter(track);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 1rem;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  font-weight: bold;
  font-family: sans-serif;
}

#player-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#player-list li.current-track, #player-list li.current-track::marker {
    background-color: var(--dark-purple);
}

button:disabled,
button:disabled:hover {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--custom-time-color);
    padding: 0 1rem;
    margin-top: 0.5rem;
    margin-bottom: 2px;
}

.progress-bar-container {
    height: 8px;
    background-color: var(--custom-progress-bg);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 5px;
    width: calc(100% - 2rem);
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--custom-progress-fill);
    transition: width 0.2s;
}

.d-flex.align-items-center.justify-content-between.px-3.pt-2.pb-3 {
    background-color: var(--custom-middle-bg);
}

.btn.btn-success.btn-sm {
    background-color: var(--custom-button-bg);
    border: none;
    color: var(--custom-button-icon);
}

.btn.btn-success.btn-sm:hover {
    background-color: var(--custom-button-hover);
}

.volume-slider input {
    writing-mode: bt-lr;
    appearance: slider-vertical;
    width: 6px;
    height: 60px;
    margin-left: 12px;
    accent-color: var(--custom-volume-accent);
}

.slide-toggle {
    position: fixed;
    left: 315px;
    top: 93%;
    transform: translateY(-50%);
    width: 30px;
    height: 60px;
    background: var(--custom-toggle-bg);
    border: 1px solid var(--custom-border-color);
    border-left: none;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: left 0.3s ease;
    color: #ffa;
}

.music-player.hidden+.slide-toggle {
    left: 15px;
    border-radius: 0 6px 6px 0;
}
