*,:after,:before
{
    box-sizing:border-box
}

body
{
    font:10px/1.5 Mont, sans-serif;
    line-height:1;
    background-color: #f2f3f3;
}
input{
    text-align: center;
    width: 100%;
    height: 100%;
}
html,body
{
    width:100%;
    height:100%;
}
img
{
    max-width:100%;
    height:auto
}

@font-face {
    font-family: 'Mont';
    src: url(Montserrat-Regular.ttf);
    font-weight: 400;
    font-style: normal;
}
#leafContainer
{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
#leafContainer > div
{
    position: absolute;
    -webkit-animation-iteration-count: infinite, infinite;
    -webkit-animation-direction: normal, normal;
    -webkit-animation-timing-function: linear, ease-in;
    color: #3a3939;
}


@-webkit-keyframes fade
{
    0%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { opacity: 0; }
}

@-webkit-keyframes drop
{
    0%   { -webkit-transform: translate(0px, -50px); }
    100% { -webkit-transform: translate(0px, 100vh); }
}

@-webkit-keyframes clockwiseSpin
{
    0%   { -webkit-transform: rotate(-50deg); }
    100% { -webkit-transform: rotate(50deg); }
}


@-webkit-keyframes counterclockwiseSpinAndFlip
{
    0%   { -webkit-transform: scale(-1, 1) rotate(50deg); }
    100% { -webkit-transform: scale(-1, 1) rotate(-50deg); }
}
.game
{
    position:relative;
    min-height:100%;
}
.game_opened{
    height: 100%;
}
.menu, .sizes{
    z-index: 1;
}

.game:not(.num){
    overflow: visible;
    overflow-x: hidden;
}
.content
{
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    width:100%;
    height: 100%;
    padding-top: 50px;
}
.start, .blackout
{
    position:absolute;
    width:100%;
    height:100%;
    z-index:9999;
}
.start{
    background:#fff;
    z-index: 99999999;
}

.blackout{
    opacity: 0.5;
    background: black;
    cursor: pointer;
}
/*Возврат в меню*/
.top{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
}
.return, .get-solve{
    width: 40px;
    height: 40px;
    border-radius: 7px;

    cursor: pointer;
}
.return{
    background: url(images/home.png) center center no-repeat white;
    background-size: 70%;

    margin-left: 5vw;
}
.get-solve{
    background: url(images/tip.png) center center no-repeat white;
    background-size: 55%;

    margin-right: 5vw;
}
.timer{
    display: flex;
    justify-content: center;
    align-items: center;

    height: 40px;
    background-color: white;
    font-size: 18px;
    line-height: 18px;
    color: #5f5f5f;
    border-radius: 7px;

    width: 120px;

}
.decor-shadow{
    box-shadow: 2px 2px 1px 0 #879dbb;
}
/*Навигация*/
table{
    text-align: center;
    overflow: hidden;
}
.sudoku{
    width: 95vw;
    height: 95vw;
    border-collapse: collapse;
    margin: 3% auto 0 auto;

    box-shadow: 1px 1px 2px 1px #879dbb;


    display: flex;
    flex-flow: row wrap;

    border-radius: 10px;

    overflow: hidden;

    background-color: white;
}
.sudoku-line{
    display: flex;
    border-bottom: 1px solid #d6d6d6;
    width: 100%;
}

.sudoku .sudoku-line:last-child{
    border: none;
}

.sudoku-td{
    flex: 1 1 0;
    position: relative;
    vertical-align: middle;
    border-right: 1px solid #d6d6d6;
    font-size: 30px;
    font-weight: bold;
    color: #414141;
}
input{
    opacity: 1 !important;
}

.sudoku-big .sudoku-td{
    font-size: 20px;
}

.sudoku-line .sudoku-td:last-child{
    border: none;
}

.p-num{
    font-size: 0.5em;
    position: absolute;
}
.bigNum{
    font-size: 0.8em;
    color: #757575;
}
.num1, .num2, .num3{
    top: 5%;
}
.num4, .num5, .num6{
    top: 50%;
    transform: translate(0, -50%);
}
.num7, .num8, .num9{
    bottom: 5%;
}
.num1, .num4, .num7{
    left: 5%;
}
.num2, .num8{
    left: 50%;
    transform: translate(-50%);
}
.num3, .num6, .num9{
    right: 5%;
}
.num5{
    left: 50%;
    transform: translate(-50%, -50%);
}
.borderRight {
    border-right: 2px solid #bfb9b9 !important;
}
.borderBottom{
    border-bottom: 2px solid #bfb9b9 !important;
}
.numbers{
    width: 90vw;
    margin: 25px auto 0 auto;
    border-spacing: 1em;
}

.numbers-row{
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.numbers__number{
    width: 2em;
    height: 2em;
    font-size: 2em;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: white;
    box-shadow: 2px 2px 1px 0 #879dbb;

    color: #5f5f5f;

    border-radius: 6px;

    cursor: pointer;
}

.number-delete{
    background: url(images/delete.png) center 55% no-repeat, white;
    background-size: 70%;
}
.doneCell, .doneCell input{
    background-color: #ecf3fd;
}
.checkedCells input, .checkedCell input{
    background-color: rgba(240, 200, 250, 0.2);
}
.checkedCells.doneCell, .checkedCells.doneCell input{
    background-color: rgb(251, 226, 250);
}
.selectedNum, .selectedNum input, .numbers .selectedNum{
    background-color: #8dc0fd;
    /*background-color: rgb(251 226 250);*/
}
.numbers .selectedNum{
    color: white;
    background-color: #879dbb;
    box-shadow: none;
}
.checkedCell{
    box-shadow: 1px 1px 0 0 inset #727171, -1px -1px 0 0 inset #727171;
}
.checkedCell input{
    outline: none;
}
/*Уровни сложности*/
.num{
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
}
.sizes{
    display: flex;
    justify-content: space-between;
    width: 300px;
    margin: 0 auto 30px auto;
    height: 30px;
}
.size{
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100px;
    height: 100%;
    border-radius: 8px;
    background-color: white;
    box-shadow: 2px 2px 1px 0 #b8b8b9;
    color: #878787;
    font-size: 20px;

    cursor: pointer;
}
.size_chosen{
    background-color: white;
    color: #3a3939;
    box-shadow: 2px 2px 1px 0 #76a0d9;
}

.teaching-block{
    justify-content: flex-start;
    margin-top: 20px;
}
.teaching{
    display: flex;
    justify-content: center;
    align-items: center;

    width: 50px;
    height: 50px;
    font-size: 40px;
    color: #76a0d9;

    border-radius: 10px;

    background-color: white;
    box-shadow: 2px 2px 1px 0 #76a0d9;

    cursor: pointer;
}


.lvl{
    display: flex;
    justify-content: center;
    align-items: center;

    width: 300px;
    background-color: white;
    box-shadow: 2px 2px 1px 0 #76a0d9;

    font-size: 30px;
    color: #849ab7;


    border-radius: 10px;

    padding: 10px 0;

    margin: 0 auto 25px auto;

    cursor: pointer;
}
/*Кнопки проверки и решения*/
.buttons{
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;

    margin: 8% auto 5px auto;
    width: 90%;
}
.buttons .button:last-child{
    background-color: #F3D3FB;
}
.button{
    display: block;
    flex-basis: 100%;
    border: 1px solid #132f63;;
    background-color: #77dbed;
    width: 0;
    font-size: 2.2em;
    padding: 5px;
}
/*Результат игры*/
.result{
    width: 300px;

    background-color: white;
    border: 2px solid #76a0d9;
    border-radius: 10px;
    font-size: 20px;
    color: #5f5f5f;
    text-align: center;


    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    padding: 15px 10px;
    z-index: 10000;
}
.result__button{
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 15px;
}
.resultButton{
    background-color: white;
    border: 1px solid #879dbb;
    color: #879dbb;
    box-shadow: 1px 1px 1px 0 #879dbb;
    border-radius: 10px;
    padding: 7px 20px;
    font-size: 25px;

    cursor: pointer;
}
button:active{
    transform: scale(0.95);
}

/*Правила*/
.functionalWindow{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    animation:show .1s forwards;

    width: 90%;
    height: 90%;
    padding: 15px;

    overflow-y: scroll;

    background-color: white;

    font-size: 16px;

    border-radius: 10px;
    border: 1px solid #76a0d9;

    z-index: 10000;
}
.functionalWindow .head{
    font-size: 40px;
    color: #849ab7;
    text-align: center;

    margin-bottom: 15px;

}
.functionalWindow p, .innerFuncWindow img{
    margin-bottom: 10px;
}
.headCross{
    position: absolute;
    top: 15px;
    right: 15px;

    width: 40px;
    height: 40px;

    background: url(images/cross.png) center center no-repeat;
    background-size: 80%;
}
@keyframes show {
    0%
    {
        opacity:0
    }

    100%
    {
        opacity:1
    }
}
.right{
    color: green;
}
.wrong{
    color: red;
}
.numbers .numbers-row:last-child .numbers__number:last-child{
    margin-bottom: 0;
}

@media (min-width: 600px) {
    .sudoku-td{
        font-size: 40px;
    }
    .sudoku-big .sudoku-td{
        font-size: 30px;
    }
    .numbers{
        width: 500px;
    }
    .numbers__number{
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    .return, .get-solve {
        width: 55px;
        height: 55px;
        border-radius: 10px;
    }
    .timer{
        width: 150px;
        height: 55px;
        border-radius: 10px;
        font-size: 22px;
    }
    .p-num{
        font-size: 0.7em;
    }

    .sizes{
        width: 500px;
        margin-top: 10px;
        height: 50px;
    }
    .size{
        font-size: 30px;
    }
    .lvl{
        width: 500px;
        font-size: 45px;
    }
    .teaching{
        width: 75px;
        height: 75px;
        font-size: 60px;
        border-radius: 15px;
    }

    .functionalWindow{
        width: 580px;
        font-size: 20px;
    }
    .functionalWindow .head{
        font-size: 50px;
    }
    .headCross{
        width: 50px;
        height: 50px;
    }

    .result{
        width: 400px;
        font-size: 27px;
        padding: 28px 17px;
    }
    .resultButton{
        font-size: 35px;
    }
}
@media (min-width: 1000px) {
    .borderRight {
        border-right: 3px solid #bfb9b9 !important;
    }
    .borderBottom{
        border-bottom: 3px solid #bfb9b9 !important;
    }
    .sudoku {
        width: 800px;
        height: 800px;
        margin: 0;
    }
    .content{
        flex-flow: row nowrap;
        padding-left: 80px;
        align-items: center;
    }
    .numbers{
        display: flex;
        flex-flow: column nowrap;
        justify-content: center;
        width: 60px;
        margin: 0 0 0 20px;
    }
    .numbers-row{
        margin: 0;
        flex-flow: column nowrap;
    }
    .numbers__number{
        margin: 0 0 15px 0;
    }
}
@media (min-width: 1000px) and (max-height: 900px) {
    .sudoku {
        width: 600px;
        height: 600px;
        margin: 0;
    }
    .numbers{
        height: 600px;
    }
    .numbers-row{
        height: 300px;
    }
    .numbers__number{
        width: 45px;
        height: 45px;
        font-size: 30px;
    }
}

@media (min-width: 1000px) and (max-height: 730px){
    .return, .get-solve {
        width: 45px;
        height: 45px;
        border-radius: 8px;
    }
    .timer {
        width: 150px;
        height: 45px;
        border-radius: 8px;
        font-size: 20px;
    }
    .sudoku {
        width: 75vh;
        height: 75vh;
        margin: 0;
    }
    .numbers{
        height: 500px;
    }
    .numbers-row{
        height: 300px;
    }
    .numbers__number{
        width: 35px;
        height: 35px;
        font-size: 25px;
    }

    .sudoku-big .sudoku-td {
        font-size: 25px;
    }
}