.game__box {
    position: relative;
    left: 160px;
    top: 100px;
}

.memory__wrap {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
}

.memory__wrap.show {
    display: block;
}

.memory__inner {
    width: 700px;
    height: 750px;
    border: 3px solid rgb(241, 153, 21);
    background: #000;
    position: absolute;
    left: 300px;
    top: 100px;
    border-radius: 20px;
    animation: flicker 1.5s infinite alternate;
}

.memory__header {
    width: 100%;
    height: 50px;
    background: rgb(251, 142, 0.8);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.memory__header img {}

.memory__card {
    padding: 30px;
}

.memory__card .cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.memory__card .cards li {
    list-style: none;
    width: 150px;
    height: 150px;
    position: relative;
    perspective: 500px;
    transform-style: preserve-3d;
}

.memory__card .cards li img {
    width: 100%;
    border-radius: 50px;
}

.memory__card .cards li .view {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 10%;
    border-radius: 20px;
    background: #765e46;
    backface-visibility: hidden;
    transition: all 0.6s;
    user-select: none;
    pointer-events: none;
}

.memory__card .cards li.flip {}

.memory__card .cards li .front {}

.memory__card .cards li.flip .front {
    transform: rotateY(180deg);
}

.memory__card .cards li .back {
    transform: rotateY(-180deg);
}

.memory__card .cards li.flip .back {
    transform: rotateY(0deg);
}

.memory__card .cards li img {
    width: 100%;
}

.memory__card .cards li.shakeX {
    animation: shakeX 1s 1;
}

.memory__card .cards li.shakeY {
    animation: shakeY 1s 1;
}

@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        box-shadow:
            0 0 .5rem #fff,
            inset 0 0 .5rem #fff,
            0 0 2rem rgb(250, 121, 22),
            inset 0 0 2rem rgb(255, 151, 6),
            0 0 4rem rgb(233, 74, 25),
            inset 0 0 4rem rgb(255, 16, 16);
    }
}

@keyframes shakeX {

    from,
    to {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        -webkit-transform: translate3d(-10px, 0, 0);
        transform: translate3d(-10px, 0, 0);
    }

    20%,
    40%,
    60%,
    80% {
        -webkit-transform: translate3d(10px, 0, 0);
        transform: translate3d(10px, 0, 0);
    }
}

@keyframes shakeY {

    from,
    to {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        -webkit-transform: translate3d(0, -10px, 0);
        transform: translate3d(0, -10px, 0);
    }

    20%,
    40%,
    60%,
    80% {
        -webkit-transform: translate3d(0, 10px, 0);
        transform: translate3d(0, 10px, 0);
    }
}

/* 메모리게임 시작버튼 */

.memory__cover {
    width: 100%;
    height: inherit;
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    z-index: 10;
    border-radius: 30px;
    display: none;
    border-radius: 50%;
}

.memory__cover.show {
    display: block;
}

.memory__cover .memory__startbtn {
    display: flex;
    justify-content: center;
}

.memory__cover .memory__startbtn button {
    position: absolute;
    top: 350px;
    width: 100px;
    border-radius: 50px;
    background: rgb(255, 196, 0);
    height: 50px;
}

.memory__cover .memory__startbtn button:hover {
    background: rgb(175, 38, 38);
}

.memory_timer {
    position: relative;
    width: 100%;
}

.memory_timer .timer {
    position: absolute;
    right: 50px;
    top: 10px;
}

.memory__cover .memory__info {
    position: absolute;
    top: 200px;
    padding: 50px;
    box-sizing: border-box;
    background: rgba(255, 191, 15, 0.894);
    border-radius: 50px;
}