*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Шрифты */
@font-face {
    font-family: 'Play regular';
    src: url(../font/Play-Regular.ttf);
}
@font-face {
    font-family: 'Play bold';
    src: url(../font/Play-Bold.ttf);
}
/* Стили для HTML тегов */
img{
    width: 100%;
}
body{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 100vh;
    font-family: 'Play regular';
    background: #292929;
}
.header #yandex_rtb_R-A-17514998-1{
    width: 256px;
    height: 256px;
    z-index: 10;
}
/* .hidden{
    display: none;
} */
/* Шапка */
.header{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.header .logo{
    width: 320px;
}
/* Меню */
.header .nav{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 6px 16px;
    background: 
     linear-gradient(#292929,#292929) padding-box,
     linear-gradient(to right, #e67e19, #f9ce29) border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 10px 20px, rgba(0, 0, 0, 0.4) 0px 2px 12px;
}
.header .nav .btn_menu{
    width: 42px;
    transition: width 0.2s;
}
.header .nav .btn_menu.hidden{
    display: none;
}
.header .nav .btn_menu:hover{
    scale: 1.2;
    cursor: pointer;
}
.header .nav .btn_menu:active{
    scale: 1;
}
/* Мобильное меню */
.header .mobile_menu{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    height: 42px;
    width: 42px;
    padding: 8px;
    background: 
     linear-gradient(#292929,#292929) padding-box,
     linear-gradient(to right, #e67e19, #f9ce29) border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 10px 20px, rgba(0, 0, 0, 0.4) 0px 2px 12px;
    overflow: hidden;
    will-change: transform, width, height;
    transition: width 0.5s, height 0.5s;
}
.header .mobile_menu.open{
    height: 208px;
    width: 180px;
}
.header .mobile_menu .btn_open{
    width: 28px;
    height: 28px;
    margin: 6px;
}
.btn_mobile{
    display: flex;
    align-items: center;
    gap: 4px;
    width: 180px;
    padding: 6px;
    color: #fff;
    user-select: none;
}
.btn_mobile.hidden{
    display: none;
}
.btn_mobile .img{
    width: 28px;
    height: 28px;
}
.btn_mobile h3{
    font-size: 16px;
}
/* Мобильная клавиатура */
.mobile_keyboard{
    position: absolute;
    bottom: 0;
    display: none;
    width: 100%;
    height: 180px;
    padding: 4px;
    overflow: hidden;
    will-change: transform, height;
    transition: height .6s ease;
}
.mobile_keyboard.hidden{
    height: 0;
    padding: 0;
}
.mobile_keyboard .line{
    display: flex;
    justify-content: center;
    gap: 4px;
    height: 38px;
}
.mobile_keyboard .line .key{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    font-family: 'Play bold';
    font-size: 24px;
    user-select: none;
    box-shadow: rgba(0, 0, 0, 1) 0px 2px 4px;
}
.mobile_keyboard .line .key:active{
    background: #afafaf;
}
.mobile_keyboard .line .key_backspace{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 32px;
    background: #fff;
    border-radius: 4px;
    user-select: none;
    box-shadow: rgba(0, 0, 0, 1) 0px 2px 4px;
}
.mobile_keyboard .line .key_backspace:active{
    background: #afafaf;
}
.mobile_keyboard .line .key_enter{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 32px;
    background: #fff;
    border-radius: 4px;
    font-family: 'Play bold';
    font-size: 18px;
    user-select: none;
    box-shadow: rgba(0, 0, 0, 1) 0px 2px 4px;
}
.mobile_keyboard .line .key_enter:active{
    background: #afafaf;
}
/* Всплывающие подсказки */
[data-title]{
    position: relative;
}
[data-title]::after{
    content: attr(data-title);
    position: absolute;
    left: -32px;
    top: 90%;
    display: flex;
    justify-content: center;
    width: 96px;
    /* transition: 0.5s; */
    pointer-events: none;
    padding: 4px;
    background: #fff;
    color: #000;
    border-radius: 4px;
    opacity: 0;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}
[data-title]:hover::after{
    animation: tooltipkeys 2s;
    opacity: 1;
}
@keyframes tooltipkeys {
    0%{
        opacity: 0;
    }
    75%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
/* Footer */
.footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 64px;
    padding: 0 64px;
    color: #fff;
    font-size: 18px;
    user-select: none;
}
.footer .actor{
    display: flex;
    gap: 6px;
}
.footer .actor a{
    color: #fff;
}
/* Main */
.main{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    width: 100%;
    padding: 48px 64px;
}
.main .rules{
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 440px;
    color: #fff;
    user-select: none;
    opacity: 1;
    transition: .5s;
}
.main .rules.hidden{
    opacity: 0;
}
.main .rules h1{
    text-align: center;
    margin-bottom: 12px;
}
.main .rules p .green{
    color: #0ab63e;
}
.main .rules p .yellow{
    color: #f9ce29;
}
.main .rules p .grey{
    color: rgb(207, 207, 207);
}
.main .game_box{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 352px;
    height: 432px;
    padding: 48px 0;
    background: 
     linear-gradient(#292929,#292929) padding-box,
     linear-gradient(to right, #e67e19, #f9ce29) border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 10px 20px, rgba(0, 0, 0, 0.4) 0px 2px 12px;
    overflow: hidden;
    will-change: transform, height;
    transition: height .5s ease-out;
}
.main .game_box.close{
    padding: 0;
    height: 0;
    background: none;
    box-shadow: none;
}
.main .game_box .background{
    position: absolute;
    top: 0;
    filter: blur(1px);
    user-select: none;
    pointer-events: none;
}
/* Ячейки для букв */
.main .game_box .string{
    position: relative;
    display: flex;
    justify-content: center;
    gap: 4px;
}
.main .game_box .string .letter{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.7) 0px 4px 10px;
    font-family: 'Play bold';
    font-size: 30px;
    user-select: none;
}
.main .game_box .string .letter.transparent{
    background: transparent;
}
.main .game_box .string .letter.white{
    background: #fff;
    border: 1px solid #333;
}
.main .game_box .string .letter.green{
    background: #0ab63e;
    border: 1px solid #333;
}
.main .game_box .string .letter.yellow{
    background: #f9ce29;
    border: 1px solid #333;
}
/* Всплывающее окно */
.main .game_box .alert_box{
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 196px;
    height: 180px;
    padding: 16px 16px;
    color: #fff;
    background: 
     linear-gradient(#313131,#313131) padding-box,
     linear-gradient(to right, #e67e19, #f9ce29) border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 10px 20px, rgba(0, 0, 0, 0.4) 0px 2px 12px;
    transform: translate(-50%, -50%);
    will-change: transform;
    transition: height .5s ease;
    z-index: 2;
    overflow: visible;
}
.main .game_box .alert_box.hidden{
    height: 0;
    padding: 0;
    border: none;
    overflow: hidden;
}
.main .game_box .alert_box .desc{
    text-align: center;
    transition: 1s;
    opacity: 1;
}
.main .game_box .alert_box.hidden .desc{
    opacity: 0;
}
.main .game_box .alert_box .hidden_word{
    display: flex;
    justify-content: center;
    width: 96px;
    height: 28px;
    background: #fff;
    border-radius: 4px;
    color: #313131;
    transition: 1s;
    opacity: 1;
}
.main .game_box .alert_box.hidden .hidden_word{
    opacity: 0;
}
.main .game_box .alert_box .buttons{
    display: flex;
    transition: 1s;
    opacity: 1;
}
.main .game_box .alert_box.hidden .buttons{
    opacity: 0;
}
.main .game_box .alert_box .buttons .btn_alert{
    width: 48px;
    height: 48px;
    transition: 0.2s;
}
.main .game_box .alert_box .buttons .btn_alert.hidden{
    display: none;
}
.main .game_box .alert_box .buttons .btn_alert:hover{
    scale: 1.2;
    cursor: pointer;
}
.main .game_box .alert_box .buttons .btn_alert:active{
    scale: 1;
}
/* Виртуальная клавиатура */
.keyboard_box{
    position: relative;
    display: flex;
}
.keyboard_box .board{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 56px;
    height: 48px;
    margin: 0 16px;
    padding: 6px 10px;
    background: 
     linear-gradient(#292929,#292929) padding-box,
     linear-gradient(to right, #e67e19, #f9ce29) border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 10px 20px, rgba(0, 0, 0, 0.4) 0px 2px 12px;
}
.keyboard_box .board.hidden{
    opacity: 0;
    transition: .5s;
}
.keyboard_box .board.hidden.width{
    width: 0;
    padding: 0;
    margin: 0;
    border: none;
}
.keyboard_box .btn_key{  
    width: 32px;
    height: 32px;
    transition: 0.2s;
}
.keyboard_box .btn_key:hover{
    cursor: pointer;
    scale: 1.2;
}
.keyboard_box .btn_key:active{
    scale: 1;
}
.keyboard{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 620px;
    height: 170px;
    padding: 12px;
    background: 
     linear-gradient(#292929,#292929) padding-box,
     linear-gradient(to right, #e67e19, #f9ce29) border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 10px 20px, rgba(0, 0, 0, 0.4) 0px 2px 12px;
    overflow: hidden;
    transition: .5s;
}
.keyboard.hidden{
    width: 0;
    padding: 0;
    border: none;
}
.keyboard .background{
    position: absolute;
    bottom: 0;
    filter: blur(1px);
    user-select: none;
    pointer-events: none;
}
.keyboard .line{
    position: relative;
    display: flex;
    justify-content: center;
    gap: 8px;
    height: 42px;
}
.keyboard .line .key{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 0, 0, 0.9);
    border-radius: 4px;
    font-family: 'Play bold';
    font-size: 24px;
    user-select: none;
    cursor: pointer;
}
.keyboard .line .key:hover{
    border: 2px solid rgba(0, 0, 0, 0.9);
}
.key.white{
    background: #fff;
}
.key.green{
    background: #0ab63e;
}
.key.yellow{
    background: #f9ce29;
}
.key.grey{
    background: #adadad;
}
.keyboard .line .key_backspace{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 42px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}
.keyboard .line .key_enter{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 42px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: 'Play bold';
    font-size: 20px;
    user-select: none;
    cursor: pointer;
}
/* Адаптив */
@media only screen and (max-width: 820px){
    .header .logo{
        width: 280px;
    }
    .header .nav{
        display: none;
    }
    .header .mobile_menu{
        display: flex;
    }
    .main{
        padding: 12px;
    }
    .main .rules{
        width: 320px;
    }
    .main .game_box{
        width: 240px;
        height: 272px;
        padding: 12px 0;
    }
    .main .game_box .string .letter{
        width: 34px;
        height: 34px;
        font-size: 22px;
    }
    .keyboard_box{
        display: none;
    }
    .mobile_keyboard{
        display: flex;
        flex-direction: column;
    }
}