
@font-face {
    font-family: "Ransom";
    src: url("/_fonts/ransom.ttf") format("truetype");
}

@font-face {
    font-family: "Magazine";
    src: url("/_fonts/MagazineLetter.ttf") format("truetype");
}

:root {
    --album-size: 120px;
}

body {
    margin: 0;
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 30px 0px;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 700px;
    gap: 10px;
    padding: 10px;
}


html {
    image-rendering: auto;
}

html::after {
    content: "";
    position: absolute;
    z-index: -5;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

header {
    font-family: "Magazine";
    font-size: 4.5em;
    text-align: center;
    color: var(--highlight-color);

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

@media only screen and (max-width: 700px) {
    header {
        font-size: 3.7em;

    }
}

.letter {
    display: inline-block;
}


header+span {
    text-align: center;
}


nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
}

nav>a:not(:last-of-type)::after {
    content: "|";
    padding-left: 10px;
}

@media only screen and (max-width: 500px) {
    nav {
        gap: 5px;
        flex-direction: column;
        margin: 0 auto;
    }

    nav>a:not(:last-of-type)::after {
        content: "";
        padding-left: 0;
    }

    nav>a::before {
        content: "> ";
    }
}

#lastfm-widget {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    padding: 6px;
    background-color: var(--box-background-color);
}

#widget-content {
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 10;
}

:root {
    --widget-cd-size: 96px;
}

@media only screen and (max-width: 500px) {
    :root {
        --widget-cd-size: 25vw;
    }
}

#cover-art {
    height: var(--widget-cd-size);
    width: var(--widget-cd-size);
    border-radius: 50%;
    background-color: var(--box-background-color-2);
}

#cover-art-container {
    position: relative;
    height: var(--widget-cd-size);
    width: var(--widget-cd-size);
    z-index: 10;
    mask-image: url(/_img/assets/cd.png);
    mask-size: contain;
}

#cover-art-container::after {
    content: "";
    position: absolute;
    width: var(--widget-cd-size);
    height: var(--widget-cd-size);
    top: 0;
    left: 0;
    background-color: white;
    mask-image: url("/_img/assets/cdshine.png");
    mask-size: contain;
    mix-blend-mode: soft-light;
    opacity: 70%;
    z-index: 11;
    border-radius: 50%;
}

#song {
  font-weight: bold;
  font-size: 1.2em;
}

#widget-credit {
    font-size: 0.8em;
    opacity: 0.8;
    z-index: 10;
}



.albums {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.album-container {
    display: flex;
    align-items: center;
    gap: 90px;

    padding: 6px;
    transition: all 100ms ease-in-out;
    height: fit-content;
}

.album-container:hover {
    background-color: var(--box-background-color);
}


@media only screen and (max-width: 500px) {
    .album-container {
        gap: 10px;
    }

    :root {
        --album-size: min(100px, 25vw);
    }

    .cd {
        display: none;
    }
}


.a-title {
    border-bottom: 1px dotted var(--text-color);
    margin-bottom: 3px;
    font-size: 1.3em;
    font-family: var(--secondary-font);
    color: var(--highlight-color);
}

.album {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--album-size);
    width: var(--album-size);
}

.album img {
    height: var(--album-size);
    width: var(--album-size);
    object-fit: cover;
    border-radius: 3px;
    z-index: 10;
}

.cd {
    position: absolute;
    width: 90%;
    height: 90%;
    mask-image: url(/_img/assets/cd.png);
    mask-size: contain;
    left: 50%;
    transition: none;
    transition: transform 200ms ease-in-out;
    border-radius: 50%;
}

.album-container:hover .cd {
    transform: translatex(30%);
}

.cd::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    mask-image: url("/_img/assets/cdshine.png");
    mask-size: contain;
    mix-blend-mode: soft-light;
    opacity: 70%;
}

.cd2 {
    position: absolute;
    width: 100%;
    height: 100%;
    mask-image: url(/_img/assets/cd2.png);
    mask-size: contain;
    transition: none;
    transition: transform 200ms ease-in-out;
    border-radius: 50%;
}

.album-container:hover .cd2 {
    transform: rotate(36deg);
}


.cd3 {
    position: absolute;
    width: 60%;
    height: 100%;
    filter: blur(10px);
    mask-size: contain;
    background-color: rgb(0, 0, 0);
    mix-blend-mode: overlay;
    opacity: 60%;
    transition: width 200ms ease-in-out;
}

.album-container:hover .cd3 {
    width: 30%;
}

.album-desc {
    width: 100%;
}

.album-desc p {
    margin: 0;
}

.spinning {
    -webkit-animation:spin 5s linear infinite;
    -moz-animation:spin 5s linear infinite;
    animation:spin 5s linear infinite;
}

@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg);}}


svg {
  fill: var(--text-color);
}

.spotify-link svg {
    height: 0.7em;
}

a svg:hover {
    fill: var(--highlight-color);
}


.albums-lesser {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding: 6px;
    padding-bottom: 28px;
    position: relative;
}

.albums-lesser img {
    width: 100%;
    border-radius: 3px;
}

@media only screen and (max-width: 600px) {
    .albums-lesser {
        grid-template-columns: repeat(5, 1fr);
    }
}

.al-title {
    display: flex;
    position: absolute;
    padding: 3px 10px;
    bottom: 0px;
    left: 0px;
    justify-content: center;
    width: 100%;
    opacity: 0;
    pointer-events: visible;
    visibility: hidden;
    transition: opacity 50ms ease-in-out;
}

.album-lesser:hover .al-title, .album-lesser:hover .spotify-link {
    opacity: 1;
    display: flex;
    visibility: visible;
}

.album-lesser:hover .al-img::after {
    opacity: 0.7;
    display: flex;
    visibility: visible;
}

.al-img {
    display: flex;
    position: relative;
}


.album-lesser .spotify-link {
    position: absolute;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
    z-index: 10;
    opacity: 0;
    display: flex;
    transition: opacity 50ms ease-in-out;
}

.al-img::after {
    content: "";
    background-color: var(--background-color);
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    opacity: 0;
    display: flex;
    transition: opacity 50ms ease-in-out;
}



#back {
    display: flex;
    justify-content: end;
}

#back a {
    text-decoration: none;
    width: 100%;
    text-align: end;
    text-transform: lowercase;
}

#back a:hover {
    text-decoration: underline;
}


h2 {
    font-family: "Ransom";
    font-size: 2.5em;
    margin: 0;
    text-align: end;
}

#features {
    text-align: left;
}

@media only screen and (max-width: 500px) {
    h2 {
        margin: 0 10px;
    }
}



#playlist-container {
    display: flex;
    position: relative;
    gap: 10px;
}

:root {
    --tv-width: 400px;
}

@media only screen and (max-width: 450px) {
    :root {
        --tv-width: 90vw;
    }

    #playlist-container {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
}

.playlist-iframe {
    position: relative;
}

.playlist-iframe iframe {
    position: absolute;
    left: calc(var(--tv-width) * 0.08);
    top: calc(var(--tv-width) * 0.08);
    width: calc(var(--tv-width) * 0.66);
    height: calc(var(--tv-width) * 0.7 * 0.75);
    pointer-events: all;
}

#tv-overlay {
    pointer-events: none;
    width: var(--tv-width);
    height: calc(var(--tv-width) * 0.75);
    filter: grayscale(100%);
}

#cursor {
    position: absolute;
    height: 40px;
    right: -12px;
    top: 20px;
    image-rendering: pixelated;
}

#playlist {
    text-align: left;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(var(--tv-width) * 0.75);
    overflow-y: auto;
    border-radius: 3px;
    height: fit-content;
    background-color: var(--background-color);
}

#playlist a {
    display: block;
    padding: 3px 6px;
}

#playlist a:hover {
    cursor: pointer;
    background-color: var(--highlight-color-3);
}

#playlist :nth-child(even) {
    background-color: var(--box-background-color);
}

@media only screen and (max-width: 600px) {
    .playlist-iframe iframe {
        display: none;
    }

    .playlist-iframe::before {
        content: "Playlist feature not available on mobile, sorry!";
        position: absolute;
        left: calc(var(--tv-width) * 0.08);
        top: calc(var(--tv-width) * 0.08);
        width: calc(var(--tv-width) * 0.46);
        height: calc(var(--tv-width) * 0.5 * 0.75);
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgb(14, 14, 14);
        padding: calc(var(--tv-width) * 0.1);
        color: rgb(188, 187, 187);
    }

    #playlist {
        display: none;
    }
}


#star1 {
    position: absolute;
    width: 160px;
    height: 300px;
    mask-image: url(/_img/assets/star2.png);
    mask-repeat: no-repeat;
    mask-size: contain;
    background-color: var(--box-background-color);
    transform: rotate(-18deg);
    z-index: -1;
    top: -100px;
    left: -60px;
}

.features {
    position: relative;
}

.features .album-container {
    flex-direction: row-reverse;
}


.features .cd {
    left: auto;
    right: 50%;
}

.features .album-container:hover .cd {
    transform: translatex(-30%);
}


.features .album-container:hover .cd2 {
    transform: rotate(-36deg);
}


.features .cd3 {
    right: 0;
}
