@charset "UTF-8";
body {
    background: #fff;
    font-family: "Montserrat", sans-serif;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1 {
    font-family: "Montserrat", sans-serif;
    line-height: 0.7;
    margin: 0 auto;
    text-align: left;
    width: 1.875em;
}

.button {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
    display: inline-block;
    padding: 1.25em 3em;
    margin: 0 0.75em;
    text-decoration: none;
    -webkit-transition: 0.25s ease;
    transition: 0.25s ease;
}

.button:hover {
    color: #000;
}

.screen {
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
}

.screen header {
    position: relative;
    top: 50%;
    -webkit-transform: translatey(-50%);
    transform: translatey(-50%);
}

.screen h1 {
    color: #fff;
}

.screen-start {
    background: #54D17A;
}

.screen-start h1 {
    font-size: 6em;
}

.screen-start .button {
    color: #54D17A;
    display: block;
    width: 30%;
    margin: auto;
    margin-top: 2em;
}

.screen-start h1+.button {
    margin-top: 5em;
}

.screen-win p {
    font-size: 6em;
    font-weight: 700;
    color: #fff;
    position: relative;
}

.screen-win p:before {
    position: absolute;
    left: 0;
    right: 0;
    color: #000;
    font-size: 4em;
    font-weight: 400;
    line-height: 0;
    z-index: -1;
}

.screen-win-tie {
    background: #54D17A;
}

.screen-win-one {
    background: #FFA000;
}

.screen-win-one .button {
    color: #3688C3;
}

.screen-win-one p:before {
    content: "o";
    top: 1.75rem;
}

.screen-win-two {
    background: #3688C3;
}

.screen-win-two .button {
    color: #FFA000;
}

.screen-win-two p:before {
    content: "×";
    top: 4.5rem;
}

.board {
    padding-top: 1em;
}

.board h1 {
    margin-top: 0.3em;
}

.players {
    color: rgba(0, 0, 0, 0.2);
    text-align: center;
    position: absolute;
    top: 1rem;
    width: 35%;
    padding: 1.25em 0 1em;
    outline: 1px solid #ccc;
    transition: 1s;
}

.players svg g {
    fill: rgba(0, 0, 0, 0.25);
}

.players:first-child {
    left: 2.5%;
}

.players:last-child {
    right: 2.5%;
}

.players-turn {
    outline: none;
}

#player1.active svg g,
#player2.active svg g {
    fill: #fff;
}

#player1.active {
    background: #FFA000;
}

#player2.active {
    background: #3688C3;
}

.boxes {
    width: 480px;
    margin: 10em auto 0;
    transition: 1s;
}

.boxes .box {
    background: #EFEFEF;
    border-radius: 4px;
    width: 150px;
    height: 150px;
    float: left;
    margin-right: 15px;
    margin-bottom: 15px;
    padding: 1.75em;
    cursor: pointer;
    box-sizing: border-box;
    transition: 0.2s ease;
    background-size: 100px 100px;
    background-repeat: no-repeat;
    background-position: center center;
}

.boxes .box:nth-child(3n) {
    margin-right: 0;
}

.boxes .box-filled-1 {
    background-color: #FFA000;
    background-image: url(../img/o.svg);
}

.boxes .box-filled-2 {
    background-color: #3688C3;
    background-image: url(../img/x.svg);
}

.p1:hover {
    background-image: url(../img/o.svg);
}

.p2:hover {
    background-image: url(../img/x.svg);
}

#name_input_p1,
#name_input_p2,
.name_label {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
    display: inline-block;
    padding: 0.75em;
    margin: 4em 0em;
    text-decoration: none;
}

.name_label {
    margin: 0em;
    border-radius: 2px;
}

.name_display {
    font-size: 2.5em;
    color: black;
    display: block;
    position: absolute;
    margin-top: 1em;
    margin-bottom: 5em;
    padding-bottom: 5em;
    opacity: 0.1;
    font-weight: 800;
}

#p1_name_display {
    left: 5%;
    color: #FFA000;
    transition: 1s;
}

#p2_name_display {
    right: 5%;
    color: #3688C3;
    transition: 1s;
}

#p1_name_display.active,
#p2_name_display.active {
    opacity: 1;
}

@media only screen and (max-width: 480px) {
    .screen-start .button {
        color: #54D17A;
        display: block;
        width: 90%;
        margin: auto;
        margin-top: 2em;
    }
    .boxes {
        width: 100%;
    }
    .boxes .box {
        width: 30%;
        height: 100px;
        background-size: 80px 80px;
        margin-right: 5%;
    }
    .name_display {
        font-size: 1.7em;
    }
    .screen-win p {
        font-size: 2em;
        font-weight: 700;
        color: #fff;
        position: relative;
    }
    .screen-win-one p:before {
        content: "o";
        top: 4.5rem;
    }
    .screen-win-one .button,
    .screen-win-two .button {
        margin-top: 70%;
    }
}