﻿* {
    box-sizing: border-box;
}

html,
body {
    background-color: red;
    height: 99%;
}

body {
    background: #222;
    background: radial-gradient(#333, rgba(0, 0, 0, 0.3));
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    font: 100%/1.5 sans-serif;
    overflow: hidden;
}

.score {
    color: green;
    font-size: 30px;
    font-weight: bold;
    padding-top: 5px;
    text-align: center;
    font-family:cursive;
}

.stage {
    bottom: 0;
    left: 0;
    margin: auto;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.tile {
    background: green;
    position: absolute;
    transition-property: background, box-shadow, opacity, transform;
    transform: translateZ(0);
    transition-duration: 3000ms;
    border-radius: 30px;
}

    .tile:before {
        bottom: 0;
        content: '';
        height: 0;
        left: 0;
        margin: auto;
        opacity: 0;
        position: absolute;
        right: 0;
        top: 0;
        width: 0;
        transition: opacity 300ms;
    }

    .tile.path:before {
        opacity: 1;
    }

    .tile.up:before {
        border-bottom: 4px inset yellow;
        border-left: 4px solid yellow;
        border-right: 4px solid yellow;
    }

    .tile.down:before {
        border-top: 4px inset yellow;
        border-left: 4px solid yellow;
        border-right: 4px solid yellow;
    }

    .tile.left:before {
        border-right: 4px inset yellow;
        border-top: 4px solid yellow;
        border-bottom: 4px solid yellow;
    }

    .tile.right:before {
        border-left: 4px inset yellow;
        border-top: 4px solid yellow;
        border-bottom: 4px solid yellow;
    }

.up {
    width: 63px;
    height: 51px;
    cursor: pointer;
}

.down {
    width: 63px;
    height: 51px;
    cursor: pointer;
}

.right {
    width: 63px;
    height: 51px;
    cursor: pointer;
}

.left {
    width: 63px;
    height: 51px;
    cursor: pointer;
}

.uparrow {
    margin-top: 75px;
    margin-left: 125px;
}

.leftrightarrow {
    margin-top: -3px;
    margin-left: 89px;
}

.downarrow {
    margin-top: -3px;
    margin-left: 121px;
}

#playPauseBTN {
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin-left: 135px;
    margin-top: 39px;
}

.gameover {
    margin-top: -253px;
    margin-left: 500px;
    position: absolute;
    z-index: 2;
    width: 350px;
    height: 350px;
}

.losemsg {
    margin-top: -134px;
    margin-left: 579px;
    position: absolute;
    z-index: 2;
    color:green;
    font-size:32px;
    font-family:cursive;
    font-weight:bold;
}

.rst {
    margin-top: -61px;
    text-align:center;
    margin-left: 610px;
    position: absolute;
    z-index: 2;
    color: green;
    font-size: 22px;
    font-family: cursive;
    font-weight:bold;
    border-radius:11px;
    box-shadow:8px 8px green;
    cursor:pointer;
}

@media (max-width: 900px), (max-height: 900px) {
    .tile.up:before, .tile.down:before, .tile.left:before, .tile.right:before {
        border-width: 3px;
    }
}

@media (max-width: 500px), (max-height: 500px) {
    .tile.up:before,
    .tile.down:before,
    .tile.left:before,
    .tile.right:before {
        border-width: 2px;
    }
}

.tile.pressed {
    background: black;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
    transition-duration: 0ms;
}

@media screen and (max-width:1000px) {
    .uparrow {
        margin-top: 35px;
        margin-left: 54px;
    }

    .leftrightarrow {
        margin-left: 15px;
    }

    .downarrow {
        margin-left: 51px;
    }

    .stage {
        margin-top: 59px;
        margin-left: 178px;
    }

    html,
    body {
        height: 98%;
    }

    .gameover {
        margin-left: 234px;
        margin-top: -271px;
    }

    #playPauseBTN{
        margin-left:66px;
        margin-top:22px;
    }

    .losemsg {
        margin-left: 308px;
        margin-top: -157px;
    }
    .rst {
        margin-left: 346px;
        margin-top: -86px;
    }
}
