#main-wrapper { width: 500px; display: flex; flex-direction: row; align-items: stretch; gap: 1em; opacity: 0; align-items: center; } #song-info-container { position: relative; flex: 1; display: flex; flex-direction: row; overflow: hidden; align-items: center; border-radius: 1em; transition: all 1s ease-in-out; box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* Adds depth */ display: grid; /* This creates a single cell that both children will occupy */ grid-template-areas: "stack"; } /* The content sits on top */ #progress-bar { position: relative; z-index: 2; /* Sits above the progress bar */ transition: all 1s ease-in-out; width: 100%; } #progress-bar-track { transition: all 1s ease-in-out; } .progress { box-sizing: border-box; padding: 0.25em 0.75em; grid-area: stack; display: flex; min-width: 0; } #song-label, #song-label-background { width: 100%; text-align: var(--text-alignment); } #artist-label, #artist-label-background { font-size: 0.8em; font-weight: 400; opacity: 0.7; } #track-label { font-weight: 700; } .text-label { transition: opacity 0.25s ease-in-out; } /* Inner wrapper holding track + artist inline */ #song-label .scroll-content, #song-label-background .scroll-content { display: inline-flex; flex-direction: row; align-items: center; gap: 0.5em; /* Spacing between Track and Artist */ white-space: nowrap; will-change: transform; } /* Preserve original font weights */ .track-label { font-weight: 700; display: var(--show-primary); } .artist-label { font-size: 0.8em; font-weight: 400; opacity: 0.7; display: var(--show-secondary); } /* Marquee scroll animation */ #song-label.is-overflowing .scroll-content, #song-label-background.is-overflowing .scroll-content { animation: ping-pong-scroll var(--marquee-duration, 8s) linear infinite; } /* Mask animation applied to container */ #song-label.is-overflowing, #song-label-background.is-overflowing { animation: ping-pong-mask var(--marquee-duration, 8s) linear infinite; }