html, body {
    width: 100%;
    height: 100%;
}

html {
    background: #000;
}

body {
    position: relative;
    margin: 0;
    font-family: Raleway, sans-serif;
    font-size: 0;
}

.center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.grid-wrapper {
    position: relative;
    max-width: 600px;
    width: 85vmin;
    height: 0px;
    padding-bottom: 100%;
}

.grid {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.line {
    flex: 1;
    display: flex;
}

.line:nth-child(n+2){
    border-top: 2px solid white;
}

.line:nth-last-child(n+2){
    border-bottom: 2px solid white;
}

.cell {
    position: relative;
    flex: 1;
    height: 100%;
    box-sizing: border-box;
}

.cell:empty {
    cursor: pointer;
}

.cell:nth-child(n+2){
    border-left: 2px solid white;
}

.cell:nth-last-child(n+2){
    border-right: 2px solid white;
}

.cross::before, .cross::after{
    content: "";
    position: absolute;
    top: 10%;
    left: 45%;
    display: block;
    width: 10%;
    height: 80%;
    background-color: #fff;
    border-radius: 4px;
    opacity: 1;
}

.cross::before {
    animation: cross 200ms forwards, cross1 125ms forwards 300ms;
}

.cross::after {
    animation: cross 200ms forwards, cross2 125ms forwards 300ms;
}

@keyframes cross {
    0% {
        opacity: 0;
        height: 10%;
        top: 45%;
    }

    100% {
        opacity: 1;
        height: 80%;
        top: 10%;
    }
}

@keyframes cross1 {
    100% {
        -webkit-transform: rotate(-45deg);
        -moz-transform: rotate(-45deg);
        transform: rotate(-45deg);
    }
}

@keyframes cross2 {
    100% {
        -webkit-transform: rotate(45deg);
        -moz-transform: rotate(45deg);
        transform: rotate(45deg);
    }
}

.circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 70%;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: circle1 150ms forwards, circle2 300ms forwards 200ms;
}

.circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 70%;
    background: black;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: circle3 150ms forwards, circle4 250ms forwards linear 200ms;
}

@keyframes circle1 {
    0% {
        opacity: 0;
        width: 0;
        height: 0;
    }

    100% {
        opacity: 1;
        width: 30%;
        height: 30%;
    }
}

@keyframes circle2 {
    0% {
        width: 30%;
        height: 30%;
    }

    100% {
        width: 70%;
        height: 70%;
    }
}

@keyframes circle3 {
    0% {
        width: 100%;
        height: 100%;
    }

    100% {
        width: 40%;
        height: 40%;
    }
}

@keyframes circle4 {
    0% {
        width: 40%;
        height: 40%;
    }

    100% {
        width: 70%;
        height: 70%;
    }
}

.blink {
    animation: blink 300ms steps(2) 3;
}

@keyframes blink {
    50% {
        visibility: hidden;
    }
}

/*Top & bottom bar */
.bar {
    display: flex;
    margin: 10px 0;
}

.bar > .item {
    display: none;
    position: relative;
}

.bar > .item > .label {
    color: #fff;
}

.top-bar {
    justify-content: center;
}

.top-bar > .item > .label {
    font-size: 30px;
}

.bottom-bar {
    justify-content: space-between;
}

.bottom-bar > .item > .label {
    font-size: 20px;
    text-transform: capitalize;
}

.bar > .item > .under-bar {
    position: absolute;
    bottom: -8px;
    bottom: -5px;
    width: 100%;
    height: 3px;
    background: #fff;
    transform-origin: center;
    transform: scaleX(0);
    transition: transform 500ms;
}

.bottom-bar > .player.playing > .under-bar,
.bar > #play-again:hover > .under-bar {
    transform: scaleY(1);
}

.bottom-bar > .player {
    display: none;
}

#player1::before,
#player1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -18px;
    height: 18px;
    width: 3px;
    background-color: #fff;
    border-radius: 1px;
}

#player1::before {
    transform: translateY(-50%) rotate(-45deg);
}

#player1::after {
    transform: translateY(-50%) rotate(45deg);
}

#player2::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -28px;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    border: 3px solid white;
    transform: translateY(-50%);
}

#play-again {
    display: none;
    cursor: pointer;
}

@keyframes timer {
    0% {
        width: 100%;
        left: 0;
    }

    100% {
        width: 0;
        left: 50%;
    }
}
