* {
    box-sizing: border-box;
}

html {
    height: 100%;
}
body {
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    /* background: url('../images/bg.png') no-repeat center center; */
    background-color: black;
    background-size: cover;
    background-color: #1f2128;
}

.form-box {
}

.form-box form {
}

.form-box h1 {
    text-align: center;
    margin-top: 0;
    color: #ececec;
    font-weight: normal;
    font-size: 25px;
    margin-bottom: 30px;
}

.form-box .form-ins {
    display: flex;
}

.form-box .form-control {
    flex-grow: 1;
}

.form-box .form-control input {
    height: 45px;
    line-height: 45px;
    font-size: 16px;
    padding: 10px 15px;
    background: #484848;
    border: solid 1px #626262;
    flex-grow: 1;
    width: 100%;
    color: #fff;
}

.form-box input[type='submit'] {
    background-color: #747474;
    color: #fff;
    border: 0;
    padding: 10px 30px;
    font-size: 16px;
    height: 45px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-box input[type='submit']:hover {
    background-color: #989898;
}

.form-box input[type='submit']:focus {
    background-color: #fff;
    color: #007fff;
}

.form-box input[type='submit']:disabled {
    opacity: 0.5;
    cursor: default;
}

.form-box .error {
    color: red;
    margin-top: 10px;
}

#game-wrapper {
    max-width: 100%;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    justify-content: center;
}

#game-inner-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

#game-board {
    display: flex;
    width: 340px;
    max-width: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.card {
    width: 100px;
    height: 100px;
    background-color: #666;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    color: #fff;
    perspective: 1000;
}

@media (max-width: 340px) {
    #game-board {
        gap: 10px;
    }
    .card {
        width: calc(33.33% - 6.666px);
    }
}

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

.card .front-face,
.card .back-face {
    border-radius: 5px;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card .front-face {
    transform: rotateY(0deg);
}

.card .back-face {
    background-color: #777;
    transform: rotateY(-180deg);
}

#reset-button {
    background-color: #f74632;
    border: 0;
    color: #fff;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

#reset-button:hover,
#reset-button:focus {
    background-color: #b72313;
}
