html, body {
    background-color: silver;
    background: linear-gradient(-60deg, #AAAAAA, #D6D6D5);
    margin: 0px;
    height: 100%;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

#base {
    position: relative;
    top: 2vh;
    width: 96vw;
    max-width: 96vh;
    height: 96vh;
    max-height: 96vw;
    margin: auto;
    overflow: hidden;
}

.square {
    position: absolute;
    border: solid gray calc(1.6667vw);
    box-sizing: border-box;
    border-radius: calc(1.25vw);
    transition: all 2s 2.25s;
}
.square.quarter {
    width: 43.3333%;
    height: 43.3333%;
}
.square.outer {
    width: 83.3333%;
    height: 83.3333%;
}
.square.middle {
    width: 56.6667%;
    height: 56.6667%;
}
.square.inner {
    width: 30%;
    height: 30%;
    background: linear-gradient(-60deg, #BBBBBB, #C6C6C5);
}
@keyframes fade_in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(90deg);
    }
}
.square.inner.white::after, .square.inner.black::after {
    content: "";
    opacity: 0;
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    animation: fade_in ease-in 1s forwards;
}
.square.inner.white::after {
    background: radial-gradient(#FFFFFF, #ECECEB);
}
.square.inner.black::after {
    background: linear-gradient(-60deg, #000000, #565655);
}
.square.inner.white_wins::after, .square.inner.black_wins::after {
    content: ":-)";
    position: absolute;
    left: 0px;
    top: 0px;
    width: 71%;
    height: 88%;
    font-size: calc(6.5vw);
    text-align: center;
    text-shadow: 7px 3px gray;
    animation: rotate 2s forwards;
}
.square.inner.white_wins::after {
    color: white;
}
.square.inner.black_wins::after {
    text-shadow: 2px 5px gray;
    color: black;
}

@media only screen and (orientation : portrait) {
    #base {
        top: calc((100vh - 100vw) / 2);
    }
    .square {
        border: solid gray calc(1.6667vh);
        border-radius: calc(1.25vh);
    }
    .square.inner.white_wins::after, .square.inner.black_wins::after {
        font-size: calc(8vh);
    }
}

.place {
    position: absolute;
    width: 6.6667%;
    height: 6.6667%;
}
.place_area {
    content: "";
    position: absolute;
    top: -45%;
    left: -45%;
    width: 190%;
    height: 190%;
}

.h1p {
    left: 8.3333%;
}
.v1p {
    top: 8.3333%;
}

.h2p {
    left: 21.6667%;
}
.v2p {
    top: 21.6667%;
}

.h3p {
    left: 35%;
}
.v3p {
    top: 35%;
}

.h4p {
    left: 48.3333%;
}
.v4p {
    top: 48.3333%
}

.h1 {
    left: 6.6667%;
}
.h2 {
    left: 20%;
}
.h3 {
    left: 33.3333%;
}
.h4 {
    left: 46.6667%;
}
.h5 {
    left: 60%;
}
.h6 {
    left: 73.3333%;
}
.h7 {
    left: 86.6667%;
}

.v1 {
    top: 6.6667%;
}
.v2 {
    top: 20%;
}
.v3 {
    top: 33.3333%;
}
.v4 {
    top: 46.6667%;
}
.v5 {
    top: 60%;
}
.v6 {
    top: 73.3333%;
}
.v7 {
    top: 86.6667%;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    50% {
        border: none;
        opacity: 0.92;
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.piece {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    border-radius: 256px;
    overflow: hidden;
    box-sizing: border-box;
}
.piece.white {
    background-color: white;
    background: linear-gradient(-60deg, #D6D6D5, #FFFFFF);
    border: groove #ECECEB 1px;
}
.piece.black {
    background-color: black;
    background: linear-gradient(-60deg, #565655, #000000);
    border: ridge #565655 1px;
}
.piece.spin {
    animation: spin 5s linear infinite;
}
.piece.little_slower {
    transition: all 0.333s;
}
.piece.medium_slow {
    transition: all 0.667s;
}
.piece.rather_slow {
    transition: all 1s;
}

