#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 { grid-area: stack; position: relative; z-index: 2; /* Sits above the progress bar */ transition: all 1s ease-in-out; width: 100%; /* mask-image: linear-gradient(to right, black calc(100% - 4em), transparent 100%); -webkit-mask-image: linear-gradient(to right, black calc(100% - 4em), transparent 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; /* justify-content: center; */ min-width: 0; } #song-label, #song-label-background { font-size: 1em; display: flex; flex-direction: row; align-items: baseline; gap: 0.5em; min-width: 100%; justify-content: var(--justify-content); overflow: hidden; } #artist-label, #artist-label-background { font-size: 0.8em; font-weight: 400; opacity: 0.7; } #track-label, #track-label-background { 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: baseline; gap: 0.5em; /* Spacing between Track and Artist */ white-space: nowrap; will-change: transform; } /* Preserve original font weights */ .track-label { font-weight: 700; } .artist-label { font-size: 0.8em; font-weight: 400; opacity: 0.7; } /* 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; }