@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Material+Icons');
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Bebas+Neue&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Archivo Black', sans-serif;
    font-family: 'Bebas Neue', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a0a2e 0%, #0a1e3a 50%, #0e2a1a 100%);
    padding: 16px;
    overflow-x: hidden;
}   

.container {
    width: min(100%, 430px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.775em;
    padding-bottom: 50px;
    color: #212529;
}

#inpt {
    min-height: 44px;
    width: 72px;
    border-radius: 4px;
    background-color: #212529;
    margin-left: 10px;
    color: rgb(244, 212, 212);
    border: 4px solid rgb(0, 0, 0);
    font-size: large;
    font-weight: bold;
    padding-left: 12px;
    text-align: center;
}

.wrapper {
    height: min(400px, calc(100vw - 32px));
    width: min(400px, calc(100vw - 32px));
    padding: 16px;
    box-shadow: 0 0 30px rgba(168,85,247,0.2), rgba(0,0,0,0.4) 0px 8px 24px;
    background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(0,212,255,0.1));
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

@media (max-width: 420px) {
    .box {
        width: 100%;
        padding-bottom: 20px;
        font-size: clamp(1.35rem, 8vw, 1.75rem);
        text-align: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .wrapper {
        padding: 12px;
    }

    .cards .card {
        height: calc(100% / 4 - 7px);
        width: calc(100% / 4 - 7px);
    }

    .card:hover {
        transform: none;
    }
}

.cards,
.card,
.view {
    display: flex;
    align-items: center;
    justify-content: center;

}

.cards {
    height: 100%;
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cards .card {
    cursor: pointer;
    position: relative;
    perspective: 800px;
    transform-style: preserve-3d;
    height: calc(100% / 4 - 10px);
    width: calc(100% / 4 - 10px);
}

.card.shake {
    animation: shake 0.35s ease-in-out;
}

.card:hover {
    transform: scale(1.15);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-13px);
    }

    40% {
        transform: translateX(13px);
    }

    60% {
        transform: translateX(0-8px);
    }

    80% {
        transform: translateX(8px);
    }
}

.cards .card .view {
    width: 100%;
    height: 100%;
    background: rgb(244, 212, 212);
    position: absolute;
    pointer-events: none;
    user-select: none;
    border-radius: 6px;
    transition: transform 0.25s linear;
    backface-visibility: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.card .font-view span {
    font-size: 40px;
    color: #374df7;
}

.card .back-view {
    transform: rotateY(-180deg);
}

.card .back-view img {
    max-width: 45px;
}

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

.card.flip .back-view {
    transform: rotateY(0);
}
