@font-face {
    font-family: JetBrains Mono;
    src: url(fonts/JetBrainsMono-VariableFont_wght.ttf);
}

html {
    overflow-x: hidden;
    margin-right: calc(-1 * (100vw - 100%));
}

body {
    background-color: #443742;
    font-family: JetBrains Mono;
    position: relative;
    min-height: 100%;
}

/* The top area of the page */
.top {
    display: grid;
    grid-template-columns: fit-content max-content fit-content;
    grid-template-rows: 1fr;
    grid-template-areas: "title title-op text-sel";
    margin-left: 15%;
    margin-right: 15%;
    margin-top: 35px;
    justify-content: space-between;
    position: relative;
}

#title {
    grid-area: title;
    font-size: 60px;
    color: #EDD9A3;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#title-op {
    grid-area: 1 / 1 / 1 /3;
    justify-self: start;
    margin-left: 240px;
    align-items: center;
    display: flex;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#title-op div svg:hover {
    color: #EDD9A3;
    transition: 0.6s;
}

#homeBtn {
    color: #B2A3B5;
    margin-top: 10px;
    margin-left: 10px;
    cursor: pointer;
    justify-content: flex-start;
}

#infoBtn {
    color: #B2A3B5;
    font-size: 20px;
    margin-top: 12px;
    margin-left: 30px;
    cursor: pointer;
}

#tutorial {
    color: #B2A3B5;
    margin-top: 10px;
    margin-left: 30px;
    cursor: pointer;
}

#dailyBtn {
    color: #B2A3B5;
    margin-top: 10px;
    margin-left: 30px;
    cursor: pointer;
}

#text-sel {
    grid-area: text-sel;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 2fr 1fr 1fr;
    font-size: 14px;
    text-align: right;
    color: #B2A3B5;
    column-gap: 5px;
    row-gap: 0px;
    align-items: end;
    justify-items: end;
    cursor: pointer;
}

#text-sel div div:hover {
    color: #EDD9A3;
    transition: 0.6s;
}

#infoText {
    grid-area: m;
    display: none;
    position: absolute;
    z-index: 1;
    background-color: #443742;
    text-align: justify;
    text-align-last: center;
    color: #B2A3B5;
    padding: 0 15rem;
}


h1,
h2,
h3 {
    color: #EDD9A3;
}



/* Difficulty */

#text-sel-row1 {
    display: flex;
    font-size: 22px;
    gap: 20px;
}

/* genre*/

#text-sel-row2 {
    display: flex;
    gap: 15px;
}

#text-sel-row3 {
    display: flex;
    gap: 15px;
}


/* The middle area of the page */

.mid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 175px max-content 200px;
    grid-template-areas:
        "lh timer h rh"
        "combo m m score"
        "lf input input rf";
}



#currentGenreLevel {
    color: #EDD9A3;
    grid-area: 1 / 2 / 2 / 4;
    font-size: 15px;
    text-align-last: center;
    align-self: end;
}

#gameText {
    display: none;
    grid-area: m;
    font-size: 19px;
    text-align: justify;
    text-align-last: center;
    color: #B2A3B5;
    margin: 10px;
    line-height: 1.5;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

mark {
    color: #443742;
    background-color: #B2A3B5;
    border-radius: 3px;
}

#readyMessage {
    grid-area: m;
    display: block;
    text-align: justify;
    text-align-last: center;

    font-size: 19px;
    color: #EDD9A3;
    margin: 86px;
}

#doneDailyMessage {
    grid-area: m;
    display: block;
    text-align: justify;
    text-align-last: center;

    font-size: 19px;
    color: #EDD9A3;
    margin: 86px;
}

#gameHidden {
    display: block;
    grid-area: m;
    font-size: 19px;
    color: transparent;
    text-shadow: 0 0 13px rgba(178, 163, 181, 0.8);
    text-align: justify;
    text-align-last: center;
    line-height: 1.5;
    margin: 10px;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#timer {
    grid-area: timer;
    align-self: end;
    color: #EDD9A3;
}

#stopTimer {
    grid-area: 1 / 2 / 2 / 3;
    color: #EDD9A3;
    cursor: pointer;
}

#controls {
    grid-area: input;
    justify-self: center;
    align-self: end;
    text-align: center;
    color: #B2A3B5;
    padding-bottom: 5px;
    font-size: 13px;
}

#controls div {
    margin-top: 5px;
}

#controls div p {
    display: inline;
    color: #443742;
    background-color: #B2A3B5;
    border-radius: 2px;
    padding-left: 3px;
    padding-right: 3px;
}


#gameControls {
    gap: 0.5rem;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: center;
    grid-area: input;
}

#inputTextBoxContainer {
    width: 60%;
    height: auto;
    background-color: #222222;
    position: relative;
    justify-content: center;
    border-radius: 3px;
}

#inputTextBox {
    margin: 5px;
    position: relative;
    background: #60525F;
    box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.25);
    color: #B2A3B5;
    outline-style: none;
    text-align: center;
    border-radius: 3px;
    content: "hello";
    min-height: 22px;
}

#score {
    display: none;
    grid-area: score;
    color: #EDD9A3;
    font-size: 30px;
    text-align: center;
    justify-self: center;
    align-self: center;
}

#combo {
    display: none;
    grid-area: combo;
    color: #EDD9A3;
    font-size: 30px;
    text-align: center;
    justify-self: center;
    align-self: center;
}

#comboBar {
    position: absolute;
    height: 100%;
    width: 0%;
    background: #EDD9A3;
}

#hint {
    grid-area: h;
    align-self: end;
    justify-self: end;
    color: #EDD9A3;
    visibility: hidden;
    cursor: pointer;
}


/* Bottom of the page */

#bot {
    display: flex;
    justify-self: center;

    position: absolute;
    bottom: -10;
    width: 64%;
    margin-left: 18%;
    margin-right: 18%;

    justify-content: space-between;
    font-size: 14px;
    color: #B2A3B5;
    padding-top: 35px;
    padding-bottom: 25px;
}


#footSel {
    display: flex;
    gap: 30px;
}


#footSel a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

#footSel a div {
    display: inline;
}

#footSel a:hover {
    color: #EDD9A3;
    transition: 0.6s;
}

#pageInfo div{
    display: inline;
    text-align: right;
}

.fade-out {
    animation: fadeOut ease 10s;
    -webkit-animation: fadeOut ease 10s;
    -moz-animation: fadeOut ease 10s;
    -o-animation: fadeOut ease 10s;
    -ms-animation: fadeOut ease 10s;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@-moz-keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@-webkit-keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@-o-keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@-ms-keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* modal */


.modal {
    display: none;
    position: fixed;
    flex-direction: column;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);

}

/* Modal Content */
.endModalContent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    color: #B2A3B5;
    background-color: #60525F;
    margin: auto;
    padding: 10px;
    border: 10px solid #60525F;
    width: 25%;
    height: 50%;
    overflow: auto;
}

#modalStats {
    padding-left: 20px;
}


.close {
    color: #aaaaaa;
    position: relative;
    left: 90%;
    top: 0;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#mTitle {
    text-align: center;
    font-size: 17px;
}

#mScore {
    padding-top: 5px;
}

.error {
    animation: shake 0.2s ease-in-out 0s 2;
}

@keyframes shake {
    0% {
        margin-left: 0rem;
    }

    25% {
        margin-left: 0.5rem;
    }

    75% {
        margin-left: -0.5rem;
    }

    100% {
        margin-left: 0rem;
    }

}

#shareButton {
    background-color: #60525F;
    color: #EDD9A3;
}

#toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -135px;
    background-color: #60525F;
    color: #EDD9A3;
    text-align: center;
    border-radius: 5px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
}

#toast.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}


#shareContainer {
    width: 100%;
    padding-top: 20px;
}

#shareButton {
    position: relative;
    display: block;
    margin-left: auto;
    margin-right: auto;
    outline: none;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    outline: solid;
    outline-color: #EDD9A3;
    background-color: #60525F;
}

.btn-text,
.btn-icon {
    display: inline-flex;
    vertical-align: middle;
    padding: 2px;
    font-weight: bold;
}