/* The piano container section */
.piano__container {
    display: flex;
    flex-direction: column;
    background-color: var(--primary-color);
    width: 60vw;
    height: 70vh;
    position: relative;
    border: 0.2em solid var(--black-color);
    border-radius: 0.5em;
}

/* The title section of the piano container */
.piano__container--title {
    text-align: center;
}

/* The keys section of the piano container */
.piano__container--keys {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    padding: 0 1vw 0 1vw;
    box-sizing: border-box;
    position: relative; 
}

/* The white key*/
.key__white {
    background-color: var(--white-color);
    height: 80%;
    border: 0.2em solid var(--black-color);
    border-radius: 0.5em;
    flex: 1;
    position: relative;
    align-self: flex-end;
    bottom: -1vh;
}

/* The black key*/
.key__black {
    background-color: var(--black-color);
    width:4%;
    height: 60%;
    border: 0.2em solid var(--black-color);
    border-radius: 0.5em;
    position: absolute;
    z-index: 1; 
}

/* Setting the position of the black keys*/
#black__one { 
    left: 9%; top: 20%; 
}    
#black__two { 
    left: 18.5%; top: 20%; 
}   
#black__three { 
    left: 38%; top: 20%; 
} 
#black__four { 
    left: 47.5%; top: 20%; 
}  
#black__five { 
    left: 57.5%; top: 20%;  
}  
#black__six { 
    left: 76.5%; top: 20%; 
}   
#black__seven { 
    left: 86%; top: 20%;  
}

/* The letters that appear when the piano is hovered over*/
.key__letter {
    position: absolute;
    bottom: 10%;
    transform: translateX(-50%);
    font-weight: bold;
    color: var(--primary-color);
}

/* The effect when the piano key is pressed*/
.pressed {
    transform: scale(0.95);
    box-shadow: 0 0 1vw 0.2vw var(--secondary-color);
}

/* The effect when the piano key/text is faded*/
.fade {
    opacity: 0;
    pointer-events: none;
    transition: opacity 2s ease-out;
}

/* The effect when the piano key/text is hidden*/
.hidden {
    visibility: hidden;
    pointer-events: none
}

/* The effect when the piano image is revealed*/
.revealed__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    visibility: hidden; 
    opacity: 0;
    transition: opacity 1s ease-out;
    z-index: 2;
}

/* The text that appears after the piano is faded*/
.revealed__text {
    position: absolute;
    top: 10%;
    left: 50%; 
    transform: translate(-50%); 
    font-size: 2em;
    font-weight: bold;
    color: var(--white-color);
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-out;
    z-index: 3; 
    text-align: center; 
    width: 100%; 
}

/* The effect to reveal the image and text*/
.revealed {
    opacity: 1;
    visibility: visible;
}






