*, *::before, *::after {
    box-sizing: border-box;
}
:root {
    --default: #121213;
    --empty: #3a3a3c;
    --wrong: #cfb645;
    --right: #51a34a;
}


/* CSS */
button {
  background: #fbca1f;
  font-family: inherit;
  padding: 0.6em 1.3em;
  font-weight: 900;
  font-size: 18px;
  border: 3px solid black;
  border-radius: 0.4em;
  box-shadow: 0.1em 0.1em;
  cursor: pointer;
  color: #121213
}

button:hover {
  transform: translate(-0.05em, -0.05em);
  box-shadow: 0.15em 0.15em;
}

button:active {
  transform: translate(0.05em, 0.05em);
  box-shadow: 0.05em 0.05em;
}




#overlay {
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: rgba(115, 131, 160, 0.707);
    z-index: 3;
    
}

#close{
    position: absolute;
    margin-top: 10px;
    margin-left: 10px;
    font-size: 1.4rem;
    color: black;
    cursor: pointer;
}

#emojis {
    align-self: center;
    font-size: 2.0rem;
    color: #121213;
}

#emojis p {
    text-align: center;
}

#container {
    display: flex;
    flex-direction: column;
    height: auto;
    width: 230px;
    border-radius: 25px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1.0);
    border: 3px solid black;
    background-color: grey;
    font-size: 0.5rem;
    padding: 10px;
    text-shadow: 3px 2px 0px #000000;
}

#container p{
    color:#ffffff;
    padding-top: 25%;
    font-weight: bold;
    font-size: 1.8rem;
    text-align: center;
    margin: 10px 0;
}

#close {
    color: #fff;
}

#container .share {
    background: #fbca1f;
    font-family: inherit;
    padding: 0.6em 1.3em;
    font-weight: 900;
    font-size: 18px;
    border: 3px solid black;
    border-radius: 0.4em;
    box-shadow: 0.1em 0.1em;
    cursor: pointer;
    margin: 10px 0;
}

#container .share:hover {
    transform: translate(-0.05em, -0.05em);
    box-shadow: 0.15em 0.15em;
}

#container .share:active {
    transform: translate(0.05em, 0.05em);
    box-shadow: 0.05em 0.05em;
}



#overlayButton {
    margin-bottom: 20px;
    display: none;
}

.title {
    display: flex;
    font: 1.8rem inherit;
    flex-direction: column;
    color: #ffffff;
    text-shadow: 2px 3px 0px #000000;
    justify-self: center;
    justify-content: center;
    padding-bottom: 0px;

}

.title h1 {
    font-size: 3.0rem;
    margin-bottom: 0px;
    margin-top: 0px;
}

.title *
{
    padding: 10px;
    margin-top: 0px;
    margin-bottom: 0px;
    align-self: center;
}

.title h2 {
    padding-top: 0px;
    margin-top: 0px;
    font-size: 1.5rem;
}

body {
    background-color: grey;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: sans-serif;
}

.submit { 
    margin: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.playChord {
    font-size: 1.0rem;
    margin-bottom: 1%;
}



.guesses {
    margin: 10px;
    display: grid;
    place-items: center;
    width: 100%;
}

.grid {
    margin-left: 48px;
    display: grid;
    grid-template-rows: repeat(6, auto);
    grid-template-columns: repeat(5, auto);
}


/* Left side rounded for C3 */
.piano .key.white[data-note="C3"] {
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

/* Right side rounded for B4 */
.piano .key.white[data-note="B4"] {
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.box {
    width: 40px;
    height: 40px;
    border: 2px solid var(--empty);
    border-radius: 20%;
    margin: 4px;
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
}

.grid .box:nth-child(5n) {
    box-shadow: none;
}

.box.empty {
    background: var(--empty);
}

.box.wrong {
    background: var(--wrong);
}

.box.right {
    background: var(--right);
}
.hint {
    opacity: 0;
    margin: 0;
}

.hint.shown {
    opacity: 100;
}


#overlaybutton {
    margin: 0px;
}



.piano {
    display: flex;
    box-shadow: 2px 4px 0px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    margin: 10px;
}


.key {
    height: calc(var(--width) * 4);
    width: var(--width);
}

.white {
    --width: 65px;
    background-color: white;
    border: 1px solid #333;
}

.white.active {
    background-color: #CCC;
}

.white.play {
    background-color: rgb(138, 156, 206);
    box-shadow: inset 0px -1px 10px rgba(67, 68, 104, 0.5);

}

.white.right {
    background-color: var(--right);
    box-shadow: inset 0px -1px 10px rgba(67, 68, 104, 0.5);
}

.white.wrong {
    background-color: var(--wrong);
    box-shadow: inset 0px -1px 10px rgba(67, 68, 104, 0.5);
}

.white.empty {
    background-color: var(--empty);
    box-shadow: inset 0px -1px 10px rgba(67, 68, 104, 0.5);
}



.black {
    z-index: 2;
    --width: 35px;
    margin-left: calc(var(--width)/-2);
    margin-right: calc(var(--width)/-2);
    background-color: black;
    border: 1px solid #333;
}


.black.active {
    background-color: #5e5d5d;
}
.black.play {
    background-color: rgb(81, 77, 118);
    box-shadow: inset 0px -1px 10px rgba(31, 31, 64, 0.5);
}

.black.right {
    background-color: var(--right);
    box-shadow: inset 0px -1px 10px rgba(31, 31, 64, 0.5);
}

.black.wrong {
    background-color: var(--wrong);
    box-shadow: inset 0px -1px 10px rgba(31, 31, 64, 0.5);
}

.black.empty {
    background-color: var(--empty);
    box-shadow: inset 0px -1px 10px rgba(31, 31, 64, 0.5);
}


/* mobile formatting */
@media screen and (max-width: 1100px){
    .black {
        --width: 20px;
        margin-left: calc(var(--width)/-2);
        margin-right: calc(var(--width)/-2);
    }


    .white {
        --width: 30px;
    }


}
/* mobile formatting */
@media screen and (max-width: 500px){
    .black {
        --width: 12px;
        margin-left: calc(var(--width)/-2);
        margin-right: calc(var(--width)/-2);
    }


    .white {
        --width: 20px;
    }


}

