html {
    background-color: #f9f9f9;
}

body {
    background-color: #f9f9f9;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 5%;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

h1 {
    margin-top: 100px;
    margin-bottom: 20px;
}

p {
    margin: 20px 0;
}

 /* darkmode */
 .dark {
    filter: invert(1) hue-rotate(180deg) brightness(120%);
 }

 #toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    z-index: 1;
    cursor: pointer;
    font-size: 1.5em;
    color: #d3d3d3;
    transition: all .3s;
}

#difficulty {
    position: fixed;
    top: 20px;
    right: 60px;
    height: 30px;
    z-index: 1;
    cursor: pointer;
    transition: all .3s;

    border: 2px solid black;
    background-color: white;
    padding: 5px;
    border-radius: 5px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: center;
}

body > p {
    margin: 10px;
    font-size: smaller;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    padding: 10px;
    background-color: #f9f9f9;

    position: fixed;
    bottom: 0;
    width: 80%;
    text-align: center;
}

#tag {
    opacity: 0.5;
    margin-bottom: 200px;
}

#quote {
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    padding: 20px 20px;
    margin: 10px 0;
    text-align: center;

    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

#quote div.word {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    min-width: 10px;
    flex-wrap: nowrap;

    border: 1px solid #d3d3d3;
    border-radius: 5px;
    padding:0 5px;
    margin:  5px 0;
}

#quote div.word > span {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 10px;
}

#quote span input {
    /* single caracter input, only bottom border */
    border: none;
    border-bottom: 1px solid #d3d3d3;
    font-size: 1.2em;
    text-align: center;
    width: 1em;
    margin: 0.2em 0;
    padding: 2px 0;
}

#quote span input:focus {
    outline: none;
    border-bottom: 1px solid #d3d3d3;
    box-shadow: 1px 2px 2px 0px rgba(0,0,0,.1);
}

#quote span input:valid + span {
    opacity: 0;
}

#quote span input:disabled {
    background-color: #f9f9f9;
    border-bottom-color: white;
}

#quote span input:disabled + span {
    opacity: 0;
}

#quote span span {
    opacity: 0.5;
    transition: all .3s;
    padding: 5px 0;
    font-size: smaller;
}

#quote span span.active {
    opacity: 0.8;
}

#quote span:has(span.active) input {
    background-color: rgba(255, 238, 219, 0.764);
}

#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    backdrop-filter: blur(5px);
}

#modal.active {
    display: flex;
}

#modal #modal-content {
    width: min(80%, 700px);
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    padding: 50px;
    margin: 10px 0;
    text-align: center;
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}