@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bokor&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

@font-face {
    font-family: mainHeader;
    src:url(../fonts/cabinet-grotesk/CabinetGrotesk-Extrabold.woff2)
}

:root {
    --f-all: "Poppins", sans-serif;
    --f-main-header: "Bokor", system-ui;
}

html {
    user-select: none;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: var(--f-all);
}

body {
    background-color: rgb(10,10,10);
}

body::before {
    content: '';
    width: 100%;
    height: 100%;
    background: url(../assets/bg-main.svg) no-repeat;
    background-size: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.05;
    z-index: -1;
}

/* FLIP MATCH CONTAINER */

/* FLIP MATCH */

.flip-match {
    padding-block: 20px;
    min-height: 100vh;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    row-gap: 20px;
}

.flip-match-active {
    display: flex;
}

.flip-match-inactive {
    pointer-events: none;
}

/* FLIP MATCH CARDS THEMSELVES */

.flip-match-cards-themselves {
    width: 500px;
    height: 500px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
}

/* FLIP MATCH CARD ITSELF */

.flip-match-card-itself {
    background-color: rgb(40, 40, 40);
    border-radius: 0.5rem;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding: 5px;
    cursor: pointer;
    position: relative;
    transform: rotateY(180deg);
    overflow: hidden;
    transition: transform 200ms, background-color 200ms;
}

.flip-match-card-itself-image {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 0.3rem;
    background-color: rgb(10,10,10);
    overflow: hidden;
    opacity: 0;
    transition: opacity 100ms;
    transition-delay: 20ms;
}

.flip-match-card-itself-image-itself {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* JS AND HOVER STATES OF FLIP MATCH CARD ITSELF */

.flip-match-card-itself:hover {
    background-color: rgb(45, 45, 45);
}

.flip-match-card-itself-flipped {
    transform: rotateY(0deg);
}

.flip-match-card-itself-flipped > .flip-match-card-itself-image {
    opacity: 1;
}

.flip-match-card-itself-found {
    background-color: rgb(40, 40, 40);
    border-radius: 0.5rem;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding: 5px;
    cursor: pointer;
    position: relative;
    transform: rotateY(0deg);
    overflow: hidden;
    transition: transform 200ms, background-color 200ms;
    pointer-events: none;
    animation: 400ms forwards flip-match-card-itself-found-animation;
    animation-delay: 200ms;
}

@keyframes flip-match-card-itself-found-animation {
    50%{scale: 0.9;}
    100%{scale: 1;}
}

.flip-match-card-itself-found > .flip-match-card-itself-image {
    opacity: 1;
}

/* MEDIA QUERIES */

@media (min-width: 1550px) {
    .flip-match-cards-themselves {
        width: 650px;
        height: 650px;
    }
}

@media (max-width: 800px) {
    .flip-match-cards-themselves {
        width: 400px;
        height: 400px;
    }
    .flip-match-card-itself,
    .flip-match-card-itself-found {
        padding: 0;
        border: 0;
    }
    .flip-match-card-itself-image {
        border: 0;
        border-radius: 0.3rem;
    }
}

@media (max-width: 500px) {
    .flip-match-cards-themselves {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 400px) {
    .flip-match-cards-themselves {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 350px) {
    .flip-match-cards-themselves {
        width: 280px;
        height: 280px;
    }
}