div.jukebox {
    width: 100%;
    height: calc(100vh - 128px - 2px);

    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);

    position: relative;
}

div.jukebox-main {
    position: absolute;

    display: flex;
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;

    overflow: hidden;
    
    width: 100%;
    height: 100%;
}

div.jukebox-catalog {
    width: 100%;
    flex-grow: 1;

    box-sizing: border-box;
    padding: 32px 48px;

    overflow-y: auto;
}

div.jukebox-catalog > h1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

div.jukebox-catalog > h1 > p {
    font-size: 14px;
    color: var(--text-subber);
}

div.jukebox-player {
    display: flex;
    align-items: center;
    justify-content: stretch;

    position: relative;

    width: 100%;
    height: 96px;
    
    padding: 16px 32px;
    box-sizing: border-box;

    z-index: 2;

    flex-shrink: 0;

    background-color: rgba(7, 7, 7, 1);
    /* border-top: 2px solid var(--darker); */
}

div.jukebox-grid {
    display: grid;
    width: 100%;

    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* grid-template-rows: repeat(auto-fill, minmax(310px, 1fr)); */
}

div.jukebox-album {
    display: flex;
    flex-direction: column;

    padding: 8px;
    box-sizing: border-box;

    cursor: pointer;
    pointer-events: all;
    user-select: none;

    transition: background-color 0.5s var(--ease-expo-o);

    aspect-ratio: 1 / 1.2;
}

div.jukebox-album:hover {
    background-color: rgba(255, 255, 255, 0.1)
}

div.jukebox-album > img {
    max-width: 100%;
    margin-bottom: 8px;
    aspect-ratio: 1;
}

div.jukebox-album > b {
    color: var(--text);
}

div.jukebox-album > span {
    color: var(--text-subber);
    font-size: 12px;
    font-style: italic;
}

div.jukebox-panel {
    z-index: 1;
    position: absolute;
    width: 100%;
    height: calc(100% - 96px);

    top: 0;
    left: 0;

    background-color: black;

    box-sizing: border-box;
    padding: 32px 48px;

    transition: top 0.75s var(--ease-expo-o);

    overflow-y: auto;
}

div.jukebox-panel.album > div.button-tray {
    position: absolute;
    top: 32px;
    right: 32px;
}

div#album-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    
    width: 100%;
    height: 35vh;

    background-image: url('/jukebox/album_field_01.png');
    background-size: 100% auto;
    background-position: center 40%;
    filter: blur(12px);

    mask-image: linear-gradient(to bottom, black, black, transparent);
}

div.album-data {
    position: absolute;
    top: 35vh;
    left: 48px;

    width: calc(100% - 96px);
    height: auto;

    transform: translateY(-50%);

    display: flex;
    flex-direction: row;
    gap: 16px;
}

img#album-cover {
    width: 250px;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
}

div.album-identity {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;

    gap: 8px;
}

h1#album-name {
    margin: 0;
    color: white;
}

div#album-tracks {
    display: grid;

    --track-rows: 5;

    /* on today's episode of "Why is CSS pure bullshit?" */
    grid-template-rows: repeat(var(--track-rows, 1), auto); 
    grid-auto-flow: column;
    grid-auto-columns: 1fr;

    column-gap: 24px;

    position: relative;

    width: 100%;

    margin-top: calc(35vh + 175px);
}

div#album-tracks::after {
    content: '';

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;

    z-index: 100;

    background-color: black;
}

div.jukebox-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    height: 65px;

    cursor: pointer;

    border-top: 1px solid var(--darker);

    border-left: 0px solid transparent;
    transition: border-left 0.2s var(--ease-expo-o);
    box-sizing: border-box;

    position: relative;
    /* z-index: 10; */
}

div.jukebox-track:has(div.button-tray.e-enter-l) {
    z-index: 10;
}

div.jukebox-track:hover {
    background-color: var(--darkerer);
}

div.jukebox-track > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    gap: 8px;
}

div.jukebox-track div.button-tray {
    position: absolute;
    right: 64px;
    opacity: 0;
    transition: opacity 0.5s var(--ease-expo-o);
}

div.button-tray.context {
    position: absolute;
    right: 100px !important;

    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;

    opacity: 1 !important;
    padding: 4px;
    background-color: black;
    border: 1px solid var(--da);

    z-index: 11;
}

div.button-tray.context > button {
    padding: 8px;
    width: 100%;
    align-items: center;
    justify-content: flex-start;

    text-wrap: nowrap;
}

div.button-tray.context > button > i:first-child {
    width: 20px;
    height: 20px;
    line-height: 20px;
    margin-right: 0.75ch;
}

div.button-tray.context > button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

div.jukebox-track:hover div.button-tray {
    opacity: 1;
}

div.jukebox-track div.jukebox-track-index {
    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 22px;
    font-family: 'Industry-Bold', monospace;

    flex-shrink: 0;

    background-size: contain;
    background-position: center;
    

    width: 64px;
    height: 64px;
}

div.jukebox-track div.jukebox-track-name,
div.jukebox-player-album-identity {
    display: flex;
    align-items: flex-start;
    flex-direction: column;

    font-weight: bold;
    font-size: 16px;

    /* text-wrap: nowrap; */
}

div.jukebox-track-name > span.other,
div.jukebox-player-album-identity > span.other {
    font-weight: normal;
}

div.jukebox-track div.jukebox-track-time {
    font-family: monospace;

    width: 64px;
    text-align: center;
}

span#album-credits {
    padding: 128px 0;
    padding-bottom: 64px;
    display: block;
    width: 100%;

    text-align: center;

    font-size: inherit;
}

div.jukebox-player-album-display,
div.jukebox-player-volume {
    display: flex;
    align-items: center;
    flex-direction: row;

    width: 300px;
    height: 64px;

    gap: 16px;
}

div.jukebox-player-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;

    gap: 16px;
}

span#album-player-artist {
    font-style: italic;
}

div.jukebox-player-album-identity b {
    /* width: 100%; */
    font-weight: bold;
}

div.jukebox-player-track-name {
    overflow: hidden; 
    max-width: calc(300px - 64px - 16px);
    height: fit-content;
}

div.jukebox-player-bar {
    position: absolute;
    top: -6px;
    left: 0;

    width: 100%;
    height: 6px;

    background-color: var(--darker);
}

div#player-fill {
    width: 8px;
    background-color: var(--accent);
}

div#player-fill::after {
    content: '';
    width: 16px;
    height: 16px;

    transform: translate(50%, -50%) scale(1);

    border-radius: 100%;

    box-shadow: 0 0 8px black;

    position: absolute;
    top: 50%;
    right: 0;

    background-color: var(--accent);
    transition: transform 0.5s var(--ease-expo-o);
}

div#player-seekbar-hitbox:hover ~ div#player-fill::after {
    transform: translate(50%, -50%) scale(1.2);
}

div#player-seekbar-hitbox:hover:active ~ div#player-fill::after {
    transform: translate(50%, -50%) scale(0.9);
}

div#player-seekbar-hitbox {
    top: -17px;
    height: 28px;
    opacity: 0;

    z-index: 10;

    pointer-events: all;
    touch-action: none;
}

div.jukebox-player-buttons {
    gap: 32px;
    flex-grow: 1;
}

button.jukebox-button {
    background: none;
    border: none;

    font-size: 18px;

    transform: scale(1.0);

    transition: transform 0.2s var(--ease-expo-o);
}

button.jukebox-button:hover {
    transform: scale(1.1);
}

button.jukebox-button:hover:active {
    transform: scale(0.9);
}

div.jukebox-time {
    text-align: center;
    width: 64px;
}

button.jukebox-button.center {
    font-size: 24px;
}

div.jukebox-player-volume {
    justify-content: flex-end;
}

.marquee {
    display: inline-block;
    clip-path: xywh(0 0 100% 100%);

    mask-image: linear-gradient(to bottom, black, black);

    animation: marquee 2s infinite linear !important;
}

span#player-lyrics {
    position: absolute;
    display: block;
    text-align: center;
    width: 100%;
    padding: 48px;
    box-sizing: border-box;
    top: -70px;
    font-weight: bold;

    left: 50%;

    transform: translate(-50%, -50%);

    text-shadow: 0 0 2px black, 0 0 4px black, 0 0 6px black, 0 0 8px black, 0 0 12px black;

    user-select: none;
    touch-action: none;
    pointer-events: none;
}

div#composer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    width: 100%;
}

div#composer-list > span {
    display: block;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

button.jukebox-button.disabled {
    color: var(--da) !important;
}

.fa-repeat-one {
    position: relative;
    --fa: "\f363";
}

.fa-repeat-one::after {
    content: "1";
    position: absolute;
    
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.35);
    font-family: inherit;

    color: inherit;
}

input#jukebox-search {
    background-color: var(--darkerer);

    padding: 16px;
    height: 48px;

    max-width: 900px;
    width: calc(100% - 128px);

    min-height: initial;
    max-height: initial;

    margin: auto;
    margin-bottom: 32px;

    display: block;

    border: 1px solid var(--darker);
}

div#album-search {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);

    height: calc(100% - 96px - 108px);

    padding: 32px;
    padding-bottom: 128px;

    z-index: 0;
}

div#album-search > div.button-tray {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
}

div#album-search-results > div.jukebox-track:first-child {
    border-top: none;
}

div#album-search-results > div.jukebox-track:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

div#album-search-results {
    margin-top: 48px !important;

    max-width: 900px;
    width: calc(100% - 116px);
    margin: auto;

    position: relative;
}

canvas#jukebox-visualizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    aspect-ratio: 1;
}

@keyframes marquee {
    to {
        transform: translateX(-110%);
    }   
    from {
        transform: translateX(110%);
    }   
}

@media screen and (max-width: 900px) {
    div.jukebox-grid {
        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
        /* grid-template-rows: repeat(auto-fill, minmax(275px, 1fr)); */
    }

    div.jukebox-catalog > h1 {
        flex-direction: column;
        gap: 4px;
    }

    div.jukebox-catalog > h1 > p {
        margin: 0;
    }

    div#album-tracks {
        grid-template-rows: initial; 
        grid-auto-flow: initial;
        grid-auto-columns: 1fr;
    }

    div.album-data {
        align-items: center;
        flex-direction: column;
    }

    div.album-identity {
        align-items: center;
    }

    div.jukebox-player-album-display {
        order: 1;

        position: absolute;
        bottom: 16px;
        left: 16px;

        height: 48px;

        width: calc(50% - 24px);
    }

    div.jukebox-player-album-display > img {
        width: 48px;
        height: 48px;
    }

    div.jukebox-player-buttons {
        width: 100%;
        justify-content: stretch;
        /* gap: 16px; */
        order: 3;
    }

    div.jukebox-player-buttons > div.jukebox-time {
        flex-grow: 1;
    }

    div.jukebox-player-volume {
        order: 2;

        position: absolute;
        bottom: 16px;
        right: 16px;

        height: 48px;

        width: calc(50% - 24px);
    }
    div.jukebox-player {
        flex-direction: row;
        align-items: flex-start;
        padding: 16px 0;

        height: 128px !important;
    }
}