@import 'https://fonts.googleapis.com/css?family=Inconsolata';

/*================================================

General

================================================*/

* {
    box-sizing: border-box;
}

html,
body {
    background-color: #000;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background: #222;
    background: radial-gradient(#444, #111);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    font-family: 'Inconsolata', Helvetica, sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-shadow:
        0 0 1ex rgba(17, 17, 17, 1),
        0 0 2px rgba(255, 255, 255, 0.8);
    text-align: center;
}

.invert {
    color: rgba(4, 4, 4, 0.8);
    text-shadow:
        0 0 1ex rgba(238, 238, 238, 1),
        0 0 2px rgba(0, 0, 0, 0.8);
}

.overlay {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(180deg,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0) 100%);
    background-size: auto 4px;
    z-index: 1;
}

.title {
    font-size: 6rem;
    margin: auto;
    margin-bottom: 15px;
}


/*================================================
  
  Score
  
  ================================================*/

.score,
.score-div {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: bold;
    padding-top: px;
    text-align: center;
}

/*================================================
  
  Stage
  
  ================================================*/

.stage {
    bottom: 0;
    left: 0;
    margin: auto;
    margin-top: 9rem;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

/*================================================
  
  Tiles
  
  ================================================*/

.tile {
    background: rgba(0, 0, 0, 0.15);
    position: absolute;
    transition-property:
        background,
        box-shadow,
        opacity,
        transform;
    transform: translateZ(0);
    transition-duration: 3000ms;
}

.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 rgba(255, 255, 255, 0.15);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.tile.down:before {
    border-top: 4px inset rgba(255, 255, 255, 0.15);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.tile.left:before {
    border-right: 4px inset rgba(255, 255, 255, 0.15);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.tile.right:before {
    border-left: 4px inset rgba(255, 255, 255, 0.15);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

@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: rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
    transition-duration: 0ms;
}