*,
::after,
::before {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Ubuntu', sans-serif;
    font-size: 14px;
    line-height: 24px;
    color: #333649;
    background: #F9F1FC;
}


.btn-def {
    border: solid 1px #B360DB;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: normal;
    background: #B360DB;
    max-width: 362px;
    width: 100%;
    height: 60px;
    padding: 0 5px;
    text-align: center;
    display: inline-block;
    cursor: pointer;
    outline: none;
    font-weight: normal;
}

.btn-def.sm {
    height: 36px;
    display: inline-block;
    min-width: 88px;
    max-width: fit-content;
    font-weight: 300;
}

.nav-list-wrapper .btn-def.sq {
    max-height: 36px;
    width: 88px;
    font-weight: 300;
    margin-bottom: 5px;
    padding: 0;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    margin-left: 2px;
    margin-right: 2px;
}

.nav-list-wrapper .btn-def.sq svg {
    margin: auto;
}

.btn-def.bg-white {
    background: #fff;
    color: #B360DB;
    padding: 0 5px;
}

.btn-def.btn-add {
    font-size: 18px;
    font-weight: 300;
    width: fit-content;
    min-width: 42px;
    display: inline-block;
    text-transform: uppercase;
    background-color: transparent;
    border: none;
    color: #fff;
    padding: 0 35px;
    width: 100%;
    max-width: 100%;

}

.scene-game .nav-list-wrapper .nav-list-small .btn-def.sq {
    width: 9%;
    max-height: 25px;
    margin-left: 0.5%;
    margin-right: 0.5%;
    margin-bottom: 1%;
}

.scene-game .nav-list-wrapper .nav-list-small .btn-def.sq svg {
    margin-left: 4px;
}

.nav-list-wrapper .nav-list-small .step-count {
    border: 0;
    font-size: 12px;
    height: 25px;
}

.btn-group-wrapper {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    align-items: center;
}


.row {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    flex-wrap: wrap;
}

.btn-group-wrapper {
    margin-bottom: 6px;
    position: relative;
    background: #802AAA;
    border-radius: 4px;
    padding: 1px;
}

.btn-group {
    font-family: 'Ubuntu', sans-serif;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    background: #fff;
    height: 36px;
    width: 88px;
    padding: 0;
    border: solid 1px #B360DB;
    border-radius: 4px;
    overflow: hidden;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.btn-group span {
    color: #333649;
    width: 50%;
    display: block;
    height: 36px;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -ms-align-items: center;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
}

.btn-group span:last-child {
    border-left: solid 2px #802AAA;
}

.scene-game {
    position: relative;
    padding: 10px 20px 10px 20px;
    min-height: 600px;
    max-width: 385px;
    margin: 0 auto;
}

.scene-game .bottom-panel {
    position: static;
    padding: 0;
}


.scene:focus {
    outline: none !important;
}

.nav-panel {
    margin-top: 20px;
    margin-bottom: 5px;
}

.nav-panel__title {
    margin-bottom: 10px;
}

.bottom-panel {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 0 18px;
}

.bottom-panel .btn-def {
    margin-left: auto;
    margin-right: auto;
}

.btn-arrows svg path {
    fill: #802AAA;
}

.btn-group-arrow {
    width: 88px;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -o-flex-wrap: wrap;
    flex-wrap: wrap;
    position: absolute;
    top: calc(100% - 1px);
    left: -1px;
    padding: 0;
    background: #fff;
    z-index: 2;
    border-radius: 4px;
    border: solid 1px #B360DB;
}

.btn-group-arrow .btn-def {
    min-width: 43px;
    width: 44px;
    margin: 0;
    border-color: #fff;
}

.btn-group input {
    width: 42px;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: bold;
    color: #802AAA;
}

.nav-btn {
    display: none;
    padding: 0px 0;
}

.container {
    max-width: 362px;
    margin-left: auto;
    margin-right: auto;
}

.title-section {
    text-align: center;
}

.btn-clr {
    margin-top: 10px;
}

/*.scene-start */
.scene-start,
.scene-result {
    min-height: 600px;
}

.scene-start .artwork,
.scene-result .artwork {
    height: 230px;
    background: #60297A url(../images/elements-3.png);
    background-position: 50%;
    -webkit-background-size: contain;
    background-size: contain;
    background-repeat: repeat;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -ms-align-items: flex-end;
    align-items: flex-end;
}

.scene-start .star {
    max-width: 91px;
    height: 91px;
    margin: 0 auto;
    margin-bottom: -45px;
}

.scene-result .star {
    max-width: 110px;
    height: 92px;
    margin: 0 auto;
    margin-bottom: -45px;
}

.scene-start .content,
.scene-result .content {
    /*min-height: calc(100vh - 230px);*/
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -ms-align-items: center;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 383px;
    margin-left: auto;
    margin-right: auto;
    padding: 60px 25px 90px 25px;
    position: relative;
}

.content h1 {
    color: #000;
    font-size: 26px;
}

.content p {
    font-size: 16px;
    color: #333649;
}

.scene-start .bottom-panel,
.scene-result .bottom-panel,
.scene-game .bottom-panel {
    bottom: 0;
    text-align: center;
}

/*End .scene-start */

/*scene*/
.scene {
    position: absolute;
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    bottom: 200%;
    right: 200%;
}

.scene.active {
    opacity: 1;
    bottom: inherit;
    right: inherit;
    top: 0;
}

/*End scene*/

.scene-won h1 {
    color: #24C046;
}

.scene-won h1 {
    color: #24C046;
}

.scene-lose h1 {
    color: #E84B4B;
}

/*End scene*/

#maze {
    width: 100%;
    height: 248px;
    margin: 20px auto 0px auto;
    position: relative;
}

#maze .cell {
    position: absolute;
    /* MAZE_COLS */
    width: calc(100% / 9);
    /* MAZE_ROWS + 1 */
    height: calc(100% / 6);
    border-style: solid;
    /*border-color: red blue cyan yellow; */
    border-color: #802AAA;
    border-width: 0;
}

#maze .cell.selected {
    /* background-image: url(../images/robot.svg); */
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
}

#maze .cell.finish {
    background-image: url(../images/finish.svg);
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
}

#maze .cell.solid {
    background-color: #802AAA;
}

#maze .cell.invisible {
    display: none;
}

#maze .cell > span {
    border: solid 1px rgba(96, 41, 122, 0.2);
    display: block;
    width: calc(100% + 1px);
    height: 100%;
}

#maze .cell[data-direction="up"] span {
    display: block;
    width: 3px;
    height: calc(100% + 1px);
    background: #50DEBC;
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 0);
}


#maze .cell[data-direction="down"] span {
    display: block;
    width: 3px;
    height: calc(100% + 1px);
    background: #50DEBC;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 0);
}

#maze .cell[data-direction="right"] span {
    display: block;
    width: calc(100% + 1px);
    height: 3px;
    background: #50DEBC;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(50%, -50%);
}

#maze .cell[data-direction="left"] span {
    display: block;
    width: calc(100%);
    height: 3px;
    background: #50DEBC;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(-50%, -50%);
}

.nav-list {
    margin: 0 -3px 9px -3px;
    margin-bottom: 9px;
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flex;
    display: -o-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -o-flex-wrap: wrap;
    flex-wrap: wrap;
}

.nav-list__title {
    padding-bottom: 5px;
}

.panel-edit {
    margin: 0 -4px;
}

.panel-edit .btn-def {
    margin: 0 4px;
}

.step-count {
    position: relative;
    font-size: 14px;
    width: 50%;
    display: flex;
    -ms-align-items: center;
    align-items: center;
    justify-content: center;
    border-left: solid 1px #B360DB;
    height: 36px;
    font-weight: bold;
    color: #333649;
    overflow: hidden;
}

.step-count-main {
    display: flex;
    width: 100%;
    height: 100%;
    font-weight: bold;
    font-size: 14px;
    -ms-align-items: center;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


#robot {
    background-image: url(../images/robot.svg);
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
    position: absolute;
}


.scene-game .bottom-panel .btn-def {
    height: 30px;
    margin: 0 5px;
    font-size: 13px;
}

.scene-game .bottom-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.scene-game .btn-group span {
    height: 30px;
}

.btn-def.btn-add {
    padding: 0 5px;
}

.scene-game .btn-group {
    height: 30px;
}

.scene-game .btn-def.sm {
    height: 30px;
    font-size: 13px;
}

.scene-game .nav-list-wrapper .btn-def.sq {
    max-height: 30px;
}

.scene-game .step-count {
    height: 30px;
}

@media only screen and (max-width: 767px) {
    #maze {
        height: 250px;
    }

    .scene-game .nav-list-wrapper .nav-list-small .btn-def.sq {
        width: 8%;
        max-height: 25px;
        margin-left: 0.15%;
        margin-right: 0.15%;
        margin-bottom: 0.3%;
    }
}