:root {
    --sheet-height: calc(min(100vh - 31px - 1vw - 120px - 40px, (100vw - 40px) / 8.5 * 11));
    --sheet-width: calc(var(--sheet-height) / 11 * 8.5)
}

.page-carousel {
    height: var(--sheet-height);
    width: fit-content;
    margin: 60px 0;
    display: flex;
    top: 140px;
    margin-top: calc(1vw + 31px);
    position: fixed;
    transition: transform 0.5s;
    left: calc(50vw - var(--sheet-width) / 2)
}

.sheet-music {
    position: relative;
    width: calc(var(--sheet-width) - 40px);
    height: 100%;
    display: inline-block;
    background-color: white;
    transform: scale(0.7);
    margin: 0 -40px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgb(121, 121, 121);
    transition: all 0.5s;
}

.sheet-music.active {
    transform: scale(1);
    /* border: calc(50px - pow(1 - (var(--outline-size) - 1) / 30, 2) * 50px) solid red; */
    box-shadow: 0 0 30px rgb(138, 179, 255);
    transition: --outline-size 1s;
    margin: 0 20px;
}

#music-progress {
    width: min(calc(var(--sheet-width) * 1.5), 80vw);
    height: calc(min(7px, var(--sheet-height) * 0.02));
    left: calc(50vw - min(var(--sheet-width) * 1.5, 80vw) / 2);
    top: calc(130px - min(7px, var(--sheet-height) * 0.02));
    position: absolute;
    margin: 0;
    border: 1px solid white;
    border-radius: 15px;
    transition: --percentage 0.2s;
    background: linear-gradient(to right, rgb(0, 102, 255) 0%, var(--blue) var(--percentage), white var(--percentage));
}

#music-title {
    position: fixed; 
    top: calc(130px - min(7px, var(--sheet-height) * 0.02) - 15px - 0.5vw);
    font-family: 'Playwrite VN', cursive; 
    color: #a9c7ff;
    font-size: calc(15px + 1vw);
    width: 100%;
    text-align: center;
    left: 0;
    text-shadow: 0 3px rgba(67, 160, 231, 0.705),
        0 6px rgba(67, 160, 231, 0.233);
    user-select: none;
    animation: floating 3s ease-in-out infinite;
}

.play-button {
    position: relative; 
    display: block;
    top: 8px; 
    font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
    color: var(--blue);
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #43a0e775;
    background: transparent;
    height: 30px;
    line-height: 20px;
    width: max(300px, 30vw);
    margin: auto;
    left: 0;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
    margin-bottom: 10px;
    box-shadow: 0 0 10px #43a0e748;
    font-weight: 700;
}

    .play-button:hover {
        background-color: var(--blue);
        color: white;
        transform: translateY(2px);
    }

#timestamp-text {
    position: relative; 
    display: block;
    top: 3px; 
    font-family: system-ui,-apple-system,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;
    color: white;
    font-size: 13px;
    height: 20px;
    width: 100px;
    margin: auto;
    left: 0;
    text-align: center;
    user-select: none;
    transition: all 0.1s;
}

@property --outline-size {
    syntax: '<number>';
    initial-value: 0;
    inherits: false;
}

@property --percentage {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes progress-bar-animation {
    to {
        --percentage: 100%;
    }
}

@keyframes floating {
    0% {
        transform: translateY(2px) perspective(200px) rotateX(10deg);
    }
    50% {
        transform: translateY(0) perspective(200px) rotateX(10deg);
    }
    100% {
        transform: translateY(2px) perspective(200px) rotateX(10deg);
    }
}