@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css");


/*Global Settings*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Serif Khmer', serif;
}

body {
    box-sizing: inherit;
}

/*modals*/

.hidden {
    display: none;
    opacity: 0;
}

.modal {
    position: absolute;
    top: 50%;
    left: 51%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 700px;
    background-color: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 3rem 5rem rgba(0,0,0,0.3);
    z-index: 10;
    transition: opacity 0.5s ease-in-out;
    overflow:auto;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 5;
}

.rule-start {
    display: grid;
}

ul {
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

p {
   margin-bottom: 10px;
}

.example-box {
    display: flex;
    gap: 10px;
}

.smallbox {
    width: 50px;
    height: 50px;
    border: solid #CDD0D5;
    display: flex;
    margin-top: 20px;


    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.fa-x {
    justify-self: end;
    cursor: pointer;
}

/*header section*/

header {
    display: grid;
    grid-template-columns: repeat(3, auto);
    margin: 10px 0 20px 0;
    align-items: center;
}

.header-left {
    margin-left: 20px;
    font-size: 25px;
}

.header-right {
    justify-self: end;
    margin-right: 20px;
    font-size: 30px;
}

.header-center {
    justify-self: center;

    font-size: 30px;
    font-weight: 800;
}

hr {
    margin-bottom: 100px;
}

.bi-question-circle, .bi-list, .bi-moon-fill {
    cursor: pointer;
}

/*word grid section*/

.word-grid-section {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.round {
    display: flex;
    gap: 5px;
}

.box {
    border-style: solid;
    border-color: #CDD0D5;
    height: 4rem;
    width: 4rem;
    margin-bottom: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
}

/*keyboard section*/

.keyboard {
    margin-top: 5%;
    margin-right: 30px;
}

.key {
    background-color: #CDD0D5;
    padding: 20px 20px;
    border-radius: 5px;
    font-weight: 700;
    border-style: none;
    cursor: pointer;
}

.key:hover {
    color: rgba(255, 255, 255, 1);

}

.keyboard-row1, .keyboard-row2, .keyboard-row3{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-left: 45px;
    border-radius: 15px;
    margin-top: 10px;

}

.keyboard-row3 {
    gap: 10px;
}

/*sliding window about menu*/

.window-about {
    display: grid;
    margin-top: 5px;
    margin-left: 10px;
    gap: 10px;
}


.window {
    position: fixed;
    top: 71.5px;
    left: -300px;
    width: 300px;
    height: 70%;
    background-color: white;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}

.window.open {
    transform: translateX(300px);
}

.open-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1;
}

.about-header {
    display: flex;
}

.window-close {
    margin-left: auto;
    margin-right: 30px;
    border: none;
    background-color: white;
    font-size: 20px;
    cursor: pointer;
}

.about-header h2 {
    margin-left: auto;
}

.header {
    margin-left: auto;
    margin-right: auto;
}

/*animations*/

.flip {
    animation: flip 800ms ease forwards;
}

.shake {
    animation: shake 0.35s;
}

.winner {
    animation: winner 2s ease infinite;
}

@keyframes flip {
    0% {
        transform: scaleY(1);
    }

    50% {
        background: white;
        transform: scaleY(0);
    }

    100% {
        transform: scaleY(1);

    }
}

@keyframes shake {
    0% { transform: translateX(0) }
    25% { transform: translateX(5px) }
    50% { transform: translateX(-5px) }
    75% { transform: translateX(5px) }
    100% { transform: translateX(0) }
}

@keyframes winner {
    30% { transform: translateX(10px)  scale(1.2); }
    40%, 60% { transform: rotate(-20deg) scale(1.2); }
    50% { transform: rotate(20deg) scale(1.2); }
    70% { transform: rotate(0deg) scale(1.2); }
    100% { transform: scale(1); }
}


/*media queries*/

@media (max-height: 860px) {

    hr {
        margin-bottom: 60px;
    }

    .keyboard {
        margin-top: 3%;
        margin-right: 30px;
    }

}

@media (max-height: 780px) {
    .key {
        background-color: #CDD0D5;
        padding: 13px 13px;
        border-radius: 5px;
        font-weight: 700;
        border-style: none;
        cursor: pointer;
    }
}

@media (max-height: 733px) {
    .box {
        border-style: solid;
        border-color: #CDD0D5;
        height: 3rem;
        width: 3rem;
        margin-bottom: 2px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 30px;
    }
}

@media (max-width: 733px) {
    .box {
        border-style: solid;
        border-color: #CDD0D5;
        height: 3rem;
        width: 3rem;
        margin-bottom: 2px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 30px;
    }

    .key {
        background-color: #CDD0D5;
        padding: 13px 13px;
        border-radius: 5px;
        font-weight: 700;
        border-style: none;
        cursor: pointer;
    }
}