* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto;
    font-family: 'Noto Sans', sans-serif;
    background-color: #2d2d2d;
}

.timer {
    position: absolute;
    top: 0rem;
    color: white;
    right: 10%;
    margin-top: 1%;
    transition: all 1s;
    font-size: 2.5rem;
}

header h1 {
    margin: .5rem 0;
    color: #f7f7f7;
}

.container {
    display: flex;
    margin: 0 auto;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
}

.gameboard {
    background-color: rgb(250 250 250 / 60%);
    border-radius: 5px;
    padding: 1%;
    width: 100%;
}

.card__template {
    position: relative;
    justify-content: center;
    align-content: center;
    flex: 1;
    display: grid;
    grid-template-rows: repeat(1, 9rem);
    grid-template-columns: repeat(8, 6rem);
    grid-auto-rows: 9rem;
    /* grid-template-rows: repeat(1, 6rem);
    grid-template-columns: repeat(8, 4rem);
    grid-auto-rows: 6rem; */
    grid-gap: 1rem;
    padding: .5rem;
}

.card__modal {
    position: absolute;
    background-image: linear-gradient(45deg, #ffffff, #bababaab);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 1000;
    flex-direction: column;
    transition: .8s all;
    align-items: center;
    justify-content: space-evenly;
}

.dismiss {
    opacity: 0;
    visibility: hidden;
}

.delay {
    transition-delay: 1s;
}

.card__modal .modal__title {
    font-size: 2.5rem;
    background-image: linear-gradient(45deg, #a700e6, #ff0000fc);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    width: auto;
}

.modal__button {
    cursor: pointer;
    background-color: #8e3fd7;
    text-transform: uppercase;
    letter-spacing: 5px;
    height: 2rem;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.5rem;
    transition: all .5s;
}

.modal__button:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 2rem #00000096;
}

.modal__button:active {
    transform: translateY(2px);
    box-shadow: 0 1rem 2rem #0000006e;
}

.card {
    width: 100%;
    height: 100%;
    perspective: 150rem;
    -moz-perspective: 150rem;
    position: relative;
    cursor: pointer;
    border-radius: 5px;
}

.card__side {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.8s;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 5px;
    box-shadow: 0 1rem 2rem #ffffff42;
}

.card .flipfrontcard {
    transform: rotateY(0deg);
}

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

.card__side--front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__side--back {
    background-image: linear-gradient(to right bottom, #f8a1fa, #5643fa);
}

.card .fadeout {
    background-image: linear-gradient(to right bottom, rgba(156, 156, 156, 0.568), rgba(224, 224, 224, 0.336));
    z-index: -100;
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
}

.card__side--front {
    transform: rotateY(-180deg);
    overflow: hidden;
}

.controller {
    border: #5a5a5a solid 2px;
    border-radius: 5px;
    color: white;
    margin-top: 1rem;
    /* padding: .5rem; */
}

.controller__name {
    margin: .5rem auto;
}

.controller__buttons {
    margin: .25rem auto;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.controller__buttons button {
    background-color: #04c858;
    border: none;
    color: white;
    margin: 0 2rem;
    width: 10%;
    min-width: max-content;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    height: 2rem;
    border-radius: 5px;
    transition: .1s all;
}

.controller__buttons button:hover {
    transform: scale(1.05) translateY(-2px);
}

.controller__buttons button:active {
    transform: scale(0.95) translateY(3px);
}

.footer {
    width: 100%;
    height: auto;
    background-color: lightgray;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer div {
    margin: .5rem;
}

.footer a {
    text-decoration: none;
    color: #4d4bff;
}

.footer a:active {
    color: #4d4bff;
    text-decoration: none;
}

.footer div img {
    width: 1rem;
}

.topic {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic__lable {
    font-weight: bold;
    font-size: 1.5rem;
    margin: .5rem .5rem;
}

.topic__input {
    width: 20rem;
    height: 2rem;
    font-size: 1rem;
    border-radius: 5px;
    margin: .5rem .5rem;
    padding: .5rem;
}

.topic__btn {
    border-radius: 5px;
    background-color: #141414;
    color: white;
    font-weight: bold;
    border: none;
    font-size: 1rem;
    min-width: 5rem;
    height: 2rem;
    margin: .5rem .5rem;
    cursor: pointer;
}

.loader, .loader:before, .loader:after {
    border-radius: 50%;
    width: 2.5em;
    height: 2.5em;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation: load7 1.8s infinite ease-in-out;
    animation: load7 1.8s infinite ease-in-out;
}

.loader {
    color: #dd0de4;
    font-size: 10px;
    margin: 0 auto;
    position: relative;
    text-indent: -9999em;
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}

.loader:before, .loader:after {
    content: '';
    position: absolute;
    top: 0;
}

.loader:before {
    left: -3.5em;
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}

.loader:after {
    left: 3.5em;
}

@-webkit-keyframes load7 {
    0%, 80%, 100% {
        box-shadow: 0 2.5em 0 -1.3em;
    }

    40% {
        box-shadow: 0 2.5em 0 0;
    }
}

@keyframes load7 {
    0%, 80%, 100% {
        box-shadow: 0 2.5em 0 -1.3em;
    }

    40% {
        box-shadow: 0 2.5em 0 0;
    }
}

@media(max-width:1440px) {
    .card__template {
        grid-template-rows: repeat(1, 6rem);
        grid-template-columns: repeat(8, 4rem);
        grid-auto-rows: 6rem;
    }
}

@media (max-width:1024px) {
    html {
        font-size: 80%;
    }

    .container {
        width: 100%;
    }

    .gameboard {
        padding: 0;
    }

    /* .topic {
        flex-direction: column;
    } */
}

@media (max-width:850px) {
    html {
        font-size: 80%;
    }

    .footer {
        flex-direction: column;
    }

    .card__template {
        /* grid-template-rows: repeat(1, 9rem); */
        grid-template-columns: repeat(4, 4rem);
        /* grid-auto-rows: 9rem; */
    }
}

@media (max-width:425px) {
    html {
        font-size: 55%;
    }

}