:root{
    font-size: 100%;
}

*,
::before,
::after{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-color: #666;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color:#aaa;
    font-size: 1.2rem;
}

main{
    background-color: #333;
    width: 100%;
    height: 100%;
    padding: 1rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.music-cover{
    width: 100%;
    margin: auto;
    aspect-ratio: 1 / 1;
    background-color: #000;
    overflow: hidden;
    border-radius: 1rem;
}

.music-cover img{
    object-fit: cover;
    width: 100%;
    pointer-events: none;
}

.info{
    padding: 0.5rem;
    display: flex;
    align-items: flex-end;
}

.music-info{
    flex:1;
    overflow: hidden;
}

.title{
    color: #fff;
    font-size: 1.5rem;
    white-space: nowrap;
}

.artist{
    font-size: 1.2rem;
    white-space: nowrap;
}

.controls{
    padding: 0.5rem;
}

.controls-time{
    margin: 1rem auto;
}

.progress-bar{
    height: 0.5rem;
    background-color: #666;
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
}

.progress{
    background-color: #fff;
    height:100%;
    width: 0;
}

.time{
    display: flex;
    justify-content: space-between;
}

.controls-buttons{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    row-gap: 0.5rem;
    justify-content: center;
}

.button-group{
    display: flex;
    justify-content: center;
    align-items: center;
}

.button-group:first-child{
    justify-content: flex-start;
    grid-row: 2;
    grid-column: 1;
}

.button-group:nth-child(2){
    grid-row: 1;
    grid-column: 1/4;
}

.button-group:last-child{
    justify-content: flex-end;
    grid-row: 2;
    grid-column: 3;
}

button{
    height: 2.5rem;
    aspect-ratio: 1 / 1;
    padding: 0.2rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 300ms;
}

button:hover{
    transform: scale(1.1);
}

button img{
    width: 100%;
    pointer-events: none;
    z-index: 10;
}

button[data-control="play"]{
    background-color: #fff;
    border-radius: 50%;
    height: 5rem;
    margin: 0 0.5rem;
}

button[data-control="play"]:hover{
    transform: scale(1.05);
}

button[data-control="prev"],
button[data-control="next"]{
    height: 3.5rem;
}

button[data-control="sound-mute"]{
    position: relative;
}

.sound-bar{
    background-color: #666;
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 5px;
    pointer-events: none;
}

.info-box{
    position: fixed;
    bottom: 10px;
    left: 10px;
    color:#fff;
    width: 230px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.info-box a{
    color: #fff;
}

@media screen and (min-width: 719px) {
    main{
        max-width: 400px;
        height: auto;
        border-radius: 2rem;
    }
}

@media screen and (max-height: 719px) and (orientation: landscape){
    main{
        max-width: 100%;
        height: 100%;
        border-radius: 0rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        column-gap: 0.5rem;
    }

    .music-cover{
        grid-row: 1 / 3;
        grid-column: 1;
        max-height: 100%;
        width: auto;
    }
}