#headOn {
    position: relative;
    height: 920px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    background-image: url('../graphX/training/headOn.png');
    background-position: center center;
    background-repeat: no-repeat;
    margin-top: 50px;
}

#headOn h3.headLine {
    position: absolute;
    top: 25px;
    left: 25px;
}

.game {
    background-color: #e6efd9;
    background-position: left top;
    background-size: cover;
    border: 1px solid #d3d3d3;
    border-radius: 10px;
    font-size: 12px;
    height: 340px;
    padding: 15px;
    position: absolute;
    text-align: justify;
    top: 500px;
    width: 300px;
    line-height: 1.5em;
}

.game h3 {
    font-size: 22px;
    font-weight: normal;
    margin: 15px 0 10px;
    max-width: 135px;
    text-align: left;
}

#headOn .game:nth-child(-n+2) {
    left: 30px;
}

#headOn .game:first-child, #headOn .game:nth-child(3) {
    top: 80px;
}

#headOn .game:nth-child(3), #headOn .game:nth-child(4) {
    right: 25px;
}

.mainPart .game button.gameButton {
    background-image: url("../graphX/games/buttonLong.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    border: medium none;
    color: #ffffff;
    font-size: 18px;
    margin: 0 0 15px;
    left: 0;
    padding: 5px 0 7px 0;
    text-align: center;
    width: 100%;
    height: 40px;
}

button.gameButton span {
    font-size: 1em;
    padding-left: 10px;
    position: absolute;
    right: 25px;
    top: 11px;
}

#main .gameButton.disabled {
    filter: grayscale(1);
    -webkit-filter: grayscale(1);
    -moz-filter: grayscale(1);
    -o-filter: grayscale(1);
    -ms-filter: grayscale(1);
    padding-left: 10px;
    cursor: default;
}

#headOn .game .gameButton:hover {
    background-color: transparent;
}

@media (max-width: 850px) {
    #headOn .game:nth-child(-n+2) {
        left: 0;
    }

    #headOn .game:nth-child(3), #headOn .game:nth-child(4) {
        right: 0;
    }
}
#headOff {
    position: relative;
    height: 920px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    background-image: url('../graphX/training/headOff.png');
    background-position: center center;
    background-repeat: no-repeat;
    margin-top: 50px;
}

#headOff .game:nth-child(-n+2) {
    left: 30px;
}

#headOff .game:first-child, #headOff .game:nth-child(3) {
    top: 80px;
}

#headOff .game:nth-child(3), #headOff .game:nth-child(4) {
    right: 25px;
}

#headOff .gameButton:hover {
    background-color: transparent;
}

@media (max-width: 850px) {
    #headOff .game:nth-child(-n+2) {
        left: 0;
    }

    #headOff .game:nth-child(3), #headOff .game:nth-child(4) {
        right: 0;
    }
}

#explainBox {
    text-align: justify;
    padding: 50px;
    margin-top: 50px;
    font-size: 18px;
}

#explainBox > * {
    margin-left: 0;
}

#explainBox img {
    float: right;
    margin: 25px 0 0 40px;
}


@media (max-width: 900px) {
    #explainBox img {
        width: 100%;
    }
}

#explainBox strong {
    font-size: inherit;
}

#explainBox p {
    color: grey;
    margin-bottom: 35px;
    line-height: 1.4em;
}

#explainBox h3 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 65px;
}

#gameArea, #explainBox {
    position: relative;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
}

#gameArea {
    height: 825px;
    padding: 50px;
}

#brainImg {
    float: left;
}

h3.headLine {
    position: absolute;
    top: 25px;
    left: 25px;
}

#gameArea .game h3 {
    max-width: 100%;
}

#gameArea .game {
    right: 20px;
    top: 250px;
    display: none;
}

#gameArea .game.description {
    color: grey;
    font-size: 15px;
    height: 510px;
    padding: 10px 25px 25px;
    top: 130px;
    width: 280px;
}

#gameArea .game.description p {
    margin: 5px auto;
}

#gameArea .game[game_id] {
    background-color: #e6efd9;
    background-position: left top;
    background-size: cover;
    border: 1px solid #d3d3d3;
    border-radius: 10px;
    display: none;
    font-size: 12px;
    height: 350px;
    position: absolute;
    right: 20px;
    top: 250px;
    width: 280px;
}

#gameArea .game:first-of-type {
    display: block;
}

#gameArea .gameButton:hover {
    background-color: transparent;
}

#gameBoxShadow {
    position: absolute;
    right: -30px;
    top: 650px;
}

.game .rating {
    height: 15px;
    position: absolute;
    right: 15px;
    text-align: right;
    top: 15px;
    width: auto;
}

.game[available="1"] .rating {
    cursor: pointer;
}

.modalLayer .stars {
    display: inline-block;
    margin: auto;
}

.modalLayer img.star {
    cursor: pointer;
}

.game button.start {
    position: absolute;
    bottom: -60px;
}

h1 {
    margin-bottom: 0;
}

body {
    min-width: 425px;
}

#headOn .rating img.grey, #headOff .rating img.grey , #gameArea .rating img.grey {
    filter: grayscale(1);
    -webkit-filter: grayscale(1);
    -moz-filter: grayscale(1);
    -o-filter: grayscale(1);
    -ms-filter: grayscale(1);
}

@media (max-width: 1175px) {
    #gameArea {
        height: 1075px;
    }

    #brainImg {
        margin-left: 0;
    }

    #gameArea .game.description {
        bottom: 50px;
        height: auto;
        margin-left: 25px;
        top: unset;
        width: auto;
    }

    #gameBoxShadow {
        display: none;
    }
}

@media (max-width: 767px) {
    #gameArea {
        height: 950px;
    }

    #gameArea .game.description, #gameArea .game[game_id] {
        width: 100% !important;
        height: auto !important;
        right: 0;
        left: 0;
        margin: auto;
    }

    #gameArea .game[game_id] {
        position: static;
    }

    #gameArea .game[game_id] > div {
        position: relative;
    }

    .game .rating {
        top: -15px;
    }

    .game button.start {
        bottom: -75px;
    }

    .mainPart .game button.gameButton {
        width: 57%;
        margin-left: -15px;
    }

    #brainImg {
        float: none !important;
    }

    #headOn, #headOff {
        background-image: none;
        height: auto;
        padding-bottom: 25px;
    }

    #headOn > div, #headOff > div {
        display: flex;
        display: -webkit-flex;
        display: -ms-flexbox;
        flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
    }

    .game {
        height: auto;
        margin: 15px;
        width: 40%;
        position: relative;
        flex-grow: 1;
        top: 0!important;
        left: 0 !important;
        margin-bottom: 50px;
    }

    #headOn h3.headLine {
        position: relative;
        margin-bottom: 25px;
        display: inline-block;
    }

    #headOn .game button.gameButton, #headOff .game button.gameButton {
        width: 100%;
        margin-left: 0;
        bottom: -60px;
    }

    #headOn .game .rating, #headOff .game .rating {
        top: 15px;
    }
}

@media (max-width: 500px) {
    .mainPart .game button.gameButton {
        font-size: 14px;
    }

    button.gameButton span {
        top: 13px;
    }
}