:root {
    --primary: #4389b7;
    --gameOver: #d00000;
    --winner: #08a045;
}

body {
    background-color: #111;
}


.header {
    color: white;
}

#cards {
    width: 90vw;
}

.card {
    aspect-ratio: 1/1;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 12px 0 rgba(0, 0, 0, 0.1);
}

.flip .card-inner {
    transform: rotateY(180deg);
}

.front,
.back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.front {
    background:
        linear-gradient(45deg, #0000 71%, #333333 0 79%, #0000 0) calc(19px/-2) calc(19px/2)/calc(2*19px) calc(2*19px),
        linear-gradient(135deg, #0000 71%, #333333 0 79%, #0000 0) calc(19px/2) calc(19px/2)/calc(2*19px) calc(2*19px),
        radial-gradient(#333333 35%, #777 37%) 0 0/19px 19px;
}

.back {
    background-color: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

.sliderRight {
    animation: right 1s forwards;
}

@keyframes right {
    to {
        transform: translateX(100%);
    }
}

.reset {
    background-color: var(--primary);
    color: white;
    cursor: pointer;
}



#gameOver,
#winner {
    display: none;
    animation: opacity 1s;
}

@keyframes opacity {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (width<1000px) {
    #cards {
        width: 100%;
    }
}

@media (width<800px) {
    #cards {
        width: 100%;
    }
}

@media (width<550px) {
    .header {
        flex-direction: column;
        justify-content: center !important;
        align-items: center !important;
    }

    #cards {
        gap: 15px;
    }

    svg {
        width: 3em;
        height: 3em;
    }
}

@media (width<400px) {
    .header {
        font-size: 10px;
    }

    #gameOver,
    #winner {
        font-size: 20px !important;
    }

}

@media (width<350px) {
    .back svg{
        width: 70%;
        height: 70%;
    }
}