/*
    Copyright PRO TV S.A. All rights reserved.
    Contact: @protv.ro
*/
@charset 'utf-8';
@import 'style.css';

.memory-game {
    width: 100%;
    max-width: 1000px;
    height: auto;
    margin: 0 auto;
    position: relative;
    perspective: 1000px;
    background-color: var(--primary-base);
}

.memory-timer {
    background-color: var(--secondary-dark);
    width: 230px;
    height: calc(7% - 10px);
    padding: 10px;
    position: relative;
    border: 1px solid var(--white);
    font-family: var(--bold-font);
    color: var(--yellow-dark);
    font-weight: var(--tchibo-font-weight-bold);
    margin: 30px auto;
}

.memory-timer strong {
    color: var(--white);
    font-family: var(--main-font);
    text-transform: uppercase;
}

.memory-timer:before {
    font-family: 'Font Awesome 5 Pro';
    content: '\f017';
    margin-right: 3px;
    color: var(--coffee-light);
}
.memory-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    padding: 0px 50px 50px 50px;
}
.memory-card {
    width: 100%;
    max-width: 210px;
    height: 210px;
    position: relative;
    /* box-shadow: 1px 1px 1px rgba(0,0,0,.3); */
    transform: scale(1);
    transform-style: preserve-3d;
    transition: transform .5s;
}

.memory-card:active {
    transform: scale(0.97);
    transition: transform .2s;
}

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

.front-face {
    transform: rotateY(180deg);
}

.front-face,
.back-face {
    width: 100%;
    height: 100%;
    /* padding: 20px; */
    position: absolute;
    background: var(--gold-light);
    backface-visibility: hidden;
}

.retry {
    width: 100%;
    height: 100%;
    display: flex;
    position: absolute;
    left: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
    background: rgba(245, 237,229, .85);
    /*background: rgba(236, 236, 236, .75);*/
    /*background: linear-gradient(135deg, #464646, #ffffff);*/
    /*opacity: 0.7;*/
}

.retry button {
    height: 50px;
    width: 100%;
    max-width: 370px;
    background-color: var(--danger-dark);
    position: absolute;
    text-transform: uppercase;
    top: 50%;
    left: 50%;
    box-shadow:
        -10px -10px 15px rgba(255, 255, 255, 0.9),
        10px 10px 15px rgba(70, 70, 70, 0.12);
    outline: none;
    -webkit-appearance: none;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    transform: translate(-50%, -50%);
    align-items: center;
    padding: 10px  20px;
    cursor: pointer;
    color: var(--white);
    border:none;
}

.retry button:hover {
    background-color: var(--gold-light);
    color: var(--stopper);
    outline: none;
    border: none;
}

.retry button::before {
    font-family: 'Font Awesome 5 Pro';
    content: '\f363';
    color: var(--white);
    font-size: 25px;
    padding-right: 10px;
}

.retry button:active {
    box-shadow:
        -10px -10px 15px rgba(255, 255, 255, 0.5),
        10px 10px 15px rgba(70, 70, 70, 0.12),
        inset -10px -10px 15px rgba(255, 255, 255, 0.5),
        inset 10px 10px 15px rgba(70, 70, 70, 0.12);
}

.retry button:active::before {
    color: #15e38a;
}

@media (max-width: 834px) {
    .memory-table {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
        grid-column-gap: 20px;
        grid-row-gap: 20px;
        padding: 0 20px 20px 20px;
    }
    .memory-card {
        max-width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .memory-table {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
        grid-column-gap: 20px;
        grid-row-gap: 20px;
        padding: 0 20px 20px 20px;
    }
    .memory-card {
        max-width: 150px;
        height: 150px;
    }
}

@media (max-width: 540px) {
    .memory-table {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
        grid-column-gap: 10px;
        grid-row-gap: 10px;
        padding: 20px;
    }
    .memory-card {
        max-width: 100px;
        height: 100px;
    }
}
