/* Select a mode */
.select-mode h1 {
    width: 100%;
    text-align: center;
}

.select-mode {
    text-align: center;
    color: white;
    background-color: black;
    height: auto;
}

.select-mode div {
    text-transform: capitalize;
    text-decoration: none;
    font-size: x-large;
    color: white;
    background-color: black;
    margin: 0;
    padding-top: 1%;
    padding-bottom: 1%;
    width: 50%;
    height: 100px;
    display: block;
    float: left;
    overflow: hidden;
    transition: width 0.2s, height 0.2s;
    transition-timing-function: linear;
}

.select-mode div.selected {
    box-shadow: 0px 0px 15px gray;
    z-index: 100;
}

.select-mode div:nth-child(4n),
.select-mode div:nth-child(4n + 3) {
    background-color: white;
    color: black;
}

.select-mode div.selected a:nth-child(2n) {
    background-color: black;
    color: white;
}

.select-mode div:not(.selected):hover,
.select-mode div.selected a:hover {
    background-color: #444;
}

.select-mode div small {
    font-size: medium;
    padding-bottom: 5px;
}

.select-mode div i.name {
    text-decoration: none;
    font-style: normal;
    padding: 5px;
}

.select-mode div a {
    display: block;
    pointer-events: none;
    touch-action: none;
    color: black;
    text-decoration: none;
    font-size: large;
    display: block;
    float: left;
    margin-top: 15px;
    height: 155px;
    padding-top: 30px;
    background-color: white;
}

.select-mode div.selected a {
    pointer-events: auto;
    touch-action: auto;
}

.select-mode div.selected > small {
    display: none;
}

html, body {
    margin: 0;
    height: 100%;
    font-family: "sans-serif";
    max-width: 600px;
    margin: auto;
}

.no-selection {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

body.menu {
    background-color: black;
    overflow: auto;
    position: static;
}

body.about {
    padding: 0;
}

body.about p, body.about h1 {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

div {
    width: 99.75%;
    height: 25%;
    position: relative;
    float: left;
}

span {
    position: absolute;
    width: 25%;
    height: 100%;
    border: 1px solid black;
}

span:nth-child(1) {
    left: 0;
}

span:nth-child(2) {
    left: 25%;
}

span:nth-child(3) {
    left: 50%;
}

span:nth-child(4) {
    left: 75%;
}

span.black, span.trap, span.twice {
    background-color: black !important;
    color: white;
    font-size: xx-large;
    text-align: center;
    vertical-align: middle;
    opacity: 0.97;
}

span.red {
    background-color: red !important;
}

span.gray {
    background-color: gray !important;
}

#game-over, #score, #restart, #quit {
    text-align: center;
    position: absolute;
    width: 100%;
    left: 0;
    top: 10px;
}

#game-over {
    background-color: rgba(0,0,0,0.9);
    color: white;
    margin-top: 0;
    top: 0;
    padding: 0;
    border: none;
    height: 100%;
    font-size: x-large;
}

#score {
    font-size: 900%;
    color: #333;
    pointer-events: none;
    touch-action: none;
    margin-top: 0;
    text-shadow: 0px 0px 1px white;
    /* https://stackoverflow.com/a/13427256 */
    text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff,
                 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

#restart, #quit {
    display: block;
    font-size: x-large;
    top: 80%;
    width: 44%;
    left: 3%;
    color: black;
    text-decoration: none;
    background-color: #FFF;
    line-height: 3;
}

#quit {
    left: 53%;
}

#restart:hover, #quit:hover {
    font-weight: bold;
}

#blocking-circle {
    position: absolute;
    width: 50%;
    background-color: #000;
    height: 40%;
    top: 30%;
    left: 25%;
    border-radius: 50%;
    z-index: 2;
}

#color-indicator {
    position: absolute;
    width: 100%;
    background-color: #000;
    height: 30%;
    bottom: -20%;
    border-radius: 100% 100% 0 0;
    z-index: -1;
    opacity: 0.8;
}

#time-indicator {
    position: absolute;
    bottom: 0;
    height: 2%;
    margin: 0;
}
