@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

html {
    margin: 0;
}
body {
    font-size: 16px;
    font-family: 'Fredoka', sans-serif;
    background: #fff;
    color: #393e4c;
    margin: 0;
    font-weight: 500;
    overflow-x: hidden;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(20px);
    min-height: 100vh;
}
a {
    text-decoration: none;
}
h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 49px;
    color: #393e4c!important;
    text-decoration: none;
    padding: 0;
    margin: 0;
}
h2 {
    font-size: 14px;
    padding: 0;
    margin: 0;
    margin-top: -10px;
    line-height: 13px;
    text-align: center;
    font-weight: 500;
    color: #919191;
    letter-spacing: 0.5px;
}
h3 {
    font-size:32px;
    padding:0;
    margin:0;
}
h4 {
    font-size:20px;
    line-height: 18px;
    font-weight: 400;
    padding:0;
    margin:0;
}
h5 {
    font-size: 19px;
    padding: 0px;
    margin: 15px 0 0 0;
}
p {
    margin: 0;
}
.game-board {
    display: flex;
    flex-direction: column;
    /*min-height: 100vh;*/
    margin: 0 auto;
    width: 500px;
    max-width: 100vw;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 0px 0;
}
.game-body {
    display: flex;
    flex: 1;
    justify-content: center;
    flex-flow: column;
    width: 70%;
    padding: 1rem 0 1.5rem 0;
}
.game-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(6, 1fr);
    column-gap: 5px;
    row-gap: 5px;
    justify-content: stretch;
    align-content: stretch;
    align-items: stretch;
    direction: rtl;
    font-family: 'Fredoka', sans-serif;
}
.game-tiles .tile {
    font-weight: bold;
    font-size: 2.3rem;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    /*box-shadow: 0px 6px 12px 0px rgb(8 8 38 / 0.5);*/
    background: #fbfcff;
    border: 2px solid #dee1e9;
    border-radius: 5px;
    padding: 6px 0 11px;
}
.game-tiles .tile:empty{
    padding-bottom: 100%;
}

.game-title {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    font-size: 3rem;
    font-family: 'Fredoka', Arial, sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    border-bottom: #818384 0px solid;
    flex-direction: column;
}


/* Keyboard */


/* Keyboard */

.game-keyboard{
    width: 100%;
    max-height: 15%;
    height: 20%;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(3, 1fr);

}
#Enter {

}

.game-keyboard{
    touch-action: manipulation;
    width: 100%;
    max-height: 15%;
    height: 20%;
    display: flex;
}
.game-keyboard .enter-key .wide-key {
    touch-action: manipulation;
    flex: 1;
    height: 100%;
}
.game-keyboard .keys {
    touch-action: manipulation;
    flex: 1;
    flex-direction: column;
    display: flex;

}
.game-keyboard .row {
    flex-grow: 1;
    display: flex;
    gap: 5px;
    justify-content: center;
}
.game-keyboard .key {
    font-weight: 600;
    font-size: 1.3rem;
    user-select: none;
    max-width: fit-content;
    padding: 0 1rem;
    color: #414a5e;
    background-color: #dce1ed;
    text-align: center;
    vertical-align: middle;
    border: none;
    border-radius: 5px;
    flex: 1;
    font-family: 'Fredoka', sans-serif;
    /*box-shadow: 0px 6px 12px 0px rgb(8 8 38 / 0.5);*/
    padding: 11px 20px 14px;

}
.game-keyboard .wide-key {
    flex: 2;
    max-width: fit-content;
}
.game-keyboard .black-key {
    color: #ffffff;
    background-color: #3b3e4c;
}
.game-keyboard .row:nth-child(2){
    padding: 5px 0;
    justify-content: center;
}

/* Modal */
.modal {
    background-color: #3b3e4c;
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    border-radius: 15px;
    padding: 5px 20px;
    font-size: 1rem;
    transition: opacity 1s;
    opacity: 0;
    direction: rtl;
    text-align: center;
}

.modal-show {
    opacity: 100%;
}

.hidden {
    display: none;
}

.correct.correct.correct.correct {
    transition: background-color 0s linear 0.5s;
    background-color: #79b851!important;
    border: 2px solid #79b851!important;
    color: #fff;
}
.present.present.present {
    background-color: #f3c237!important;
    border: 2px solid #f3c237!important;
    color: #fff;
}
.absent.absent {
    background-color: #a4aec4!important;
    border: 2px solid transparent!important;
    color: #fff;
}

.end-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    margin: 0;
    border-radius: 0;
    direction: rtl;
    font-size: 1.5rem;
    color: #d7dadc;
    text-align: center;
    white-space: pre-line;
    width: 100%;
    height: 100vh;
    background: rgb(57 62 76 / 85%);
    transition: opacity 500ms;
    z-index: 999999999;
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.end-modal-box {
    margin: 70px auto;
    padding: 20px;
    background: rgb(255 255 255 / 90%);
    border-radius: 30px;
    width: 100%;
    max-width: 400px;
    position: relative;
    transition: all 5s ease-in-out;
    border: 4px solid #dee1e9;
    line-height: 20px;
    box-shadow: 0px 0px 70px 24px rgb(59 62 76 / 80%);
}
.end-modal-back {
    position: absolute;
    /*height: 100%;*/
    width: 100%;
    opacity: 0.5;
    filter: blur(10px);
    z-index: 2;
}
.end-modal-text {
    color:#3b3e4c;
    font-weight: 700;
}
.end-modal-imgs {
    white-space: pre-line;
    line-height: 1.4;

}
.end-modal > button {
    box-shadow: 0 0 5px black;

    border-radius: 10px;
    border: 0 solid black;
    font-size: 1rem;
}
.end-modal > button:hover {
    box-shadow: 0 0 15px black;

}

#instructions {
    left:50%;
    width: clamp(20vw,70vw,400px);
    transform: translate(-50%,0%);
    background-color: #fff;
    box-shadow:0px 0px 70px 24px rgb(59 62 76 / 20%);
    position: absolute;
    text-align: right;
    /*line-height:clamp(0.5vw,7vw,40px);*/
    padding: 30px 20px;
    font-family: 'Fredoka';
    font-size: clamp(0.5vw, 3vw, 15px);
    flex-direction: column;
    border-radius:clamp(0.5vw,2vw,10px);
    top: 6%;
    z-index: 9999999999999;
}
.howtoplay {
    text-align:center;
    margin:0px 0 0 0;
    direction: rtl;
}
.pro {
    margin-top: 15px;
}
.pro span {
    text-align: center;
    margin-top: 15px;
    background: #9cb358;
    padding: 2px 8px 3px;
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
}
.playagain-box {
    text-align:center;
    margin:5px 0 0 0;
}
.playagain {
    font-weight: 600;
    font-size: 16px;
    user-select: none;
    max-width: fit-content;
    color: #ffffff;
    background-color: #9cb358;
    text-align: center;
    vertical-align: middle;
    border: none;
    border-radius: 50px;
    flex: 1;
    font-family: 'Fredoka', sans-serif;
    padding: 5px 16px 9px;
    cursor: pointer;
}
.copyresult {
    font-weight: 600;
    font-size: 16px;
    user-select: none;
    max-width: fit-content;
    color: #ffffff;
    background-color: #3b3e4c;
    text-align: center;
    vertical-align: middle;
    border: none;
    border-radius: 50px;
    flex: 1;
    font-family: 'Fredoka', sans-serif;
    padding: 5px 16px 9px;
}
.setting {
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.3rem;
    user-select: none;
    max-width: fit-content;
    background-color: #fbfcff;
    text-align: center;
    border: 2px solid #dee1e9;
    border-radius: 50px;
    flex: 1;
    font-family: 'Fredoka', sans-serif;
    padding: 8px 10px;
    margin-right: 0px;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #5f6065;
    cursor: pointer;
}
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 25px;
    font-weight: bold;
    text-decoration: none;
    color: #3c3e4c;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fbfcff;
    text-align: center;
    border: 2px solid #dee1e9;
    cursor: pointer;
}
.iframe-url {
    outline: 0px;
    width: 80%;
    font-size: 11px;
    resize: none;
    padding: 6px;
    color: rgb(135, 138, 158);
    overflow: hidden;
    direction: ltr;
    height: 40px;
    background: #fbfcff;
    border: 2px solid #dee1e9;
    border-radius: 15px;
}
.share-text {
    margin: 25px 0 5px 0;
    font-size: 19px;
    text-align: center;
    font-weight: 800;
}

/* animations */
@-webkit-keyframes shaker {
    0% { -webkit-transform: translate(4px, 0); }
    10% { -webkit-transform: translate(-4px, 0); }
    20% { -webkit-transform: translate(4px, 0); }
    30% { -webkit-transform: translate(-4px, 0); }
    40% { -webkit-transform: translate(4px, 0); }
    50% { -webkit-transform: translate(-4px, 0); }
    60% { -webkit-transform: translate(4px, 0); }
    70% { -webkit-transform: translate(-4px, 0); }
    80% { -webkit-transform: translate(4px, 0); }
    90% { -webkit-transform: translate(-4px, 0); }
    100% { -webkit-transform: translate(4px, 0); }
}

.shake.shake {
    -webkit-animation-name: shaker;
    -webkit-animation-duration: 0.3s;
    -webkit-transform-origin:50% 50%;
    -webkit-animation-timing-function: linear;
}
.flip.flip.flip {
    /*transform: rotateX(180deg) scaleY(-1);*/
    animation:flip 0.6s  linear;

}

@keyframes flip{
    from {
        transform: rotateX(0deg);
        background-color: transparent;
    }
    49.5% {
        background-color: transparent;
    }
    50% {

        transform: rotateX(90deg);
    }
    to {
        transform: rotateX(0deg);
    }
}

.set_animation {
    -webkit-animation-name: set_animation;
    -webkit-animation-duration: 0.1s;
    -webkit-transform-origin:50% 50%;
    -webkit-animation-timing-function: linear;
}

@-webkit-keyframes set_animation {
    0% { -webkit-transform: scale(1, 1); }
    50% { -webkit-transform: scale(1.1, 1.1); }
    100% { -webkit-transform: scale(1, 1); }
}
@media screen and (max-width: 800px) {
    .game-board {
        min-height: -webkit-fill-available;
    }
    .game-keyboard {
        width: 97vw;
        max-height: none;
        height: 25%;
    }
    .game-keyboard .key {
        padding: 10px 0;
        max-width: none;

    }
    .game-body {
        width: 90%;
        flex: 0.9;
    }
}
