body {
    color: rgba(255, 255, 255, 0.869);
}

.introduction.section {
    padding: 7rem 3rem 3rem 3rem;
}
.gamebox {
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(8, auto);
    grid-template-rows: repeat(8, auto);
}

.gamebox-container {
    width: 450px;
    height: 450px;
    /* border: 1px solid red; */
    margin: 0 auto;
}

.box {
    border: 1px solid cyan;
    position: relative;
}

.box .white,
.box .black {
    position: absolute;
    width: 0%;
    height: 0%;
    opacity: 0;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.3s;
}

div.box.error::before {
    content: "";
    border: 3px solid red;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transform: rotate(0deg);
    z-index: 1;
    animation: vibrate 0.2s linear;
}

@keyframes vibrate {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.box .white {
    background: white;
}

.box .black {
    background: #0adcb6;
}

.box .white.show,
.box .black.show {
    width: 65%;
    height: 65%;
    opacity: 1;
}

.settings {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: gray;
    gap: 15px;
}

.reversegame.section {
    margin: 0;
    padding: 3rem 0;
}

.reversegame.section .container {
    display: grid;
    align-items: center;
    justify-content: center;
    grid-template-columns: 1fr 500px 1fr;
    max-width: 100%;
    padding: 0;
}

.reversegame .left,
.reversegame .right {
    /* border: 1px solid red; */
    box-sizing: border-box;
    height: 500px;
}

.buttons {
    width: 100%;
    padding: 15px;
    display: flex;
}

.right .buttons {
    justify-content: flex-end;
    align-items: center;
}


/* From Uiverse.io by learnMyHobby */
.buttons button {
    position: relative;
    text-decoration: none;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 5px;
    line-height: 42px;
    width: 100px;
    cursor: pointer;
    font-weight: bold;
    height: 48px;
    border-radius: 15px;
    border: none;
    -webkit-box-reflect: bottom 1px linear-gradient(transparent, #0004);
    margin: 0 5px;
}

.buttons button span {
    border-radius: 11px;
    position: absolute;
    display: flex;
    justify-content: center;
    text-align: center;
    top: 4px;
    right: 4px;
    bottom: 4px;
    left: 4px;
    text-align: center;
    background: #121212;
    color: rgba(255, 255, 255, 0.864);
    transition: 0.3s;
    z-index: 1;
}

.buttons button:hover {
    font-size: 16px;
}

.buttons button:hover span {
    color: rgba(255, 255, 255, 1);
}

.buttons button::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-size: 400%;
    opacity: 0;
    transition: 0.3s;
    border-radius: 15px;
    background: linear-gradient(45deg,
            #701591,
            #09cad8,
            #fb0094,
            #00f);
    animation: animate123 1s 20% linear infinte;
}

.buttons button::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-size: 400%;
    /* filter: blur(20px); */
    transition: 0.3s;
    border-radius: 15px;
    background: linear-gradient(45deg,
            #701591,
            #09cad8,
            #fb0094,
            #00f);
    animation: animate123 1s 20% linear infinte;
}

.buttons button:hover::before,
.buttons button:hover::after {
    opacity: 1;
    filter: blur(0px);
}

@keyframes animate123 {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 300% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.buttons button span::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(255, 255, 255, 0.042);
    transition: 0.3s;
}

.buttons button:hover span::before {
    height: 0%;
}

.name-left,
.name-right {
    width: 100%;
    margin-top: 75px;
    padding: 20px;
}

.reversegame .name-right {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column;
}

.name-left h2,
.name-right h2 {
    color: white;
    font-size: 32px;
}

.name-left h3,
.name-right h3 {
    color: white;
    font-size: 30px;
    margin-top: 20px;
    position: absolute;
    top: -7%;
}

.name-left h3 {
    left: 42%;
}
.name-right h3 {
    right: 42%;
}

.name-left h3 span,
.name-right h3 span {
    transition: 0.3s;
}

.winner-display, .newGame-screen {
    z-index: -10;
    opacity: 0;
    pointer-events: none;
    position: fixed;
}

.crossBtn {
    /* border: 1px solid red; */
    width: 20px;
    height: 20px;
    display: block;
    position: absolute;
    right: 18px;
    top: 15px;
    transition: all 0.3s;
    cursor: pointer;
}


.crossBtn:hover {
    scale: 1.1;
}
.crossBtn span::before, .crossBtn span::after {
    content: "";
    background: #d00000;
    display: block;
    height: 3px;
    width: 20px;
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    left: 0px;
}
.crossBtn span::after {
    transform: rotate(-45deg);
}
.crossBtn:hover span::before, .crossBtn:hover span::after {
    background: #ff0000;
}

.winner-display.show, .newGame-screen.show {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    overflow-y: auto;
}

.newGame-screen .card-cover {
    opacity: 0;
    scale: 0;
    width: 50%;
    max-width: 400px;
    min-width: 300px;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.newGame-screen.show .card-cover {
    opacity: 1;
    scale: 1;
    pointer-events: auto;
}

.newGame-screen .card {
    background-color: #00002c;
    padding: 20px;
    border: none;
    width: 100%;
    border-radius: 12px;
    color: white;
    min-height: 100px;
    position: relative;
}

.card::before, .card::after {
    content: "";
    position: absolute;
    background: linear-gradient(45deg, #b41aaa, #6d1ffc, #0dd5aa, #6d1ffc, #b41aaa, #6d1ffc, #0dd5aa, #6d1ffc);
    top: -5px;
    right: -5px;
    bottom: -5px;
    left: -5px;
    z-index: -1;
    border-radius: 12px;
    animation: borderAnimation 10s ease-in-out infinite;
    opacity: 1;
}

.card::after {
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
    z-index: -2;
    filter: blur(10px);
    opacity: 0.5;
}

@keyframes borderAnimation {
    0%, 100%{
        background-size: 400% 400%;
        background-position: 100% 0;
    }
    50%  {
        background-size: 400% 400%;
        background-position: 0 100%;
    }
}

.newGame-screen .card > h1 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 28px;
}
.newGame-screen .card > h3 {
    font-size: 16px;
    color: #e2e2e2;
    margin-top: 15px;
    margin-bottom: 6px;
}
.newGame-screen .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 15px;
    gap: 6px;
}
.newGame-screen .friend, .newGame-screen .computer {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 8px;
    border: 2px solid #434343;
    cursor: pointer;
    user-select: none;
    transition: 0.3s;
}
.newGame-screen .friend {
    justify-content: flex-start;
}
.newGame-screen .computer {
    justify-content: flex-end;
}
.newGame-screen .friend.active, .newGame-screen .computer.active {
    border: 2px solid #00d2d2;
}
.newGame-screen .options span {
    border: 1px solid red;
    height: 30px;
    width: 30px;
    display: block;
}
.newGame-screen input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 0 10px 0px rgb(255 255 255 / 56%);
    background: transparent;
    color: white;
    border: none;
}
.newGame-screen .buttons {
    margin: 15px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.winner-display .card {
    height: 251px;
    width: 300px;
    background: transparent;
    border-radius: 15px;
    opacity: 0;
    scale: 0;
    pointer-events: none;
    transition: 0.3s;
    color: white;
    padding: 20px;
    overflow: hidden;
}
.winner-display.show .card {
    background: #4f1c6cbd;
    border-radius: 15px;
    pointer-events: auto;
    opacity: 1;
    scale: 1;
}

.winner-display .congrats {
    text-align: center;
    font-size: 30px;
    margin-bottom: 12px;
}

.winner-display .winner-name-display {
    font-size: 22px;
    margin-bottom: 58px;
}

@media (max-width: 1050px) {
    .name-left h2,
    .name-right h2 {
        font-size: 28px;
    }

    .name-left h3,
    .name-right h3 {
        font-size: 30px;
        top: -14%;
    }

    .buttons button {
        width: 90px;
        font-size: 12px;
    }

    .gamebox-container {
        width: 400px;
        height: 400px;
    }

    .reversegame.section .container {
        grid-template-columns: 1fr 400px 1fr;
    }

    .reversegame .left,
    .reversegame .right {
        height: 400px;
    }
}


@media (max-width: 900px) {
    .buttons button {
        width: 75px;
        height: 46px;
        line-height: 39px;
    }
    .buttons button:hover {
        font-size: 13px;
    }
}

@media (max-width: 800px) {
    .gamebox-container {
        width: 350px;
        height: 350px;
    }

    .reversegame.section .container {
        grid-template-columns: 1fr 350px 1fr;
    }

    .reversegame .left,
    .reversegame .right {
        height: 350px;
    }

    .name-left h2,
    .name-right h2 {
        font-size: 24px;
    }

    .name-left h3,
    .name-right h3 {
        font-size: 30px;
        top: -15%;
    }
}

@media only screen and (max-width: 700px) {
    .name-left h3,
    .name-right h3 {
        top: 24%;
    }
    .reversegame.section .container {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 1fr;
    }

    .reversegame .left {
        grid-column: 1/2;
        grid-row: 1/2;
    }

    .reversegame .right {
        grid-column: 2/3;
        grid-row: 1/2;
    }
    
    .reversegame .gamebox-container {
        grid-column: 1/3;
        grid-row: 2/3;
    }
    .reversegame .left,
    .reversegame .right {
        height: 200px;
    }
    
    .name-left, .name-right {
        margin-top: 0;
    }
    .gamebox-container {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 450px) {
    .reversegame.section .container {
        grid-template-rows: 160px 1fr;
    }
    .reversegame .left,
    .reversegame .right {
        height: 160px;
    }
    .name-left,
    .name-right {
        padding: 12px;
    }
    .name-left h2,
    .name-right h2 {
        font-size: 20px;
    }

    .name-left h3,
    .name-right h3 {
        font-size: 22px;
        top: 23%;
    }
    .name-left h3 {
        left: 39%;
    }
    .name-right h3 {
        right: 39%;
    }
    .gamebox-container {
        width: 325px;
        height: 325px;
    }
    .buttons {
        padding: 12px;
    }
    .buttons button {
        width: 56px;
        height: 28px;
        line-height: 25px;
        font-size: 11px;
        border-radius: 8px;
        letter-spacing: 3px;
        margin: 0px 6px 0px 0px;
    }
    .buttons button:hover {
        font-size: 12px;
    }
    .buttons button span {
        top: 2px;
        right: 2px;
        bottom: 2px;
        left: 2px;
        border-radius: 6px;
    }
    .buttons button::before {
        border-radius: 8px;
    }
    
    .buttons button::after {
        border-radius: 8px;
    }
    .settings {
        width: 32px;
        height: 32px;
    }
}