:root{
    --bg-color:  rgb(29, 29, 29);
    --first-player: #0d6efd;
    --second-player: #ffc107;
    --draw: #dc3545;
    --correct: #198754;
    --brown: rgb(112, 70, 70);
}

body{
    background-color: var(--bg-color);
    overflow-x: hidden;
    overflow-y: hidden;
}

div{
    user-select: none;
}

input{
    height: 50px;
    border-radius: 5px;
}

.text-brown{
    color: var(--brown);
}

.bg-theme{
    background-color: var(--bg-color);
}

.border-brown{
    border: 1px solid var(--brown);
}

.border-first-player{
    border: 1px solid var(--first-player);
}

.border-second-player{
    border: 1px solid var(--second-player);
}

.text-first-player{
    color: var(--first-player);
}

.text-second-player{
    color: var(--second-player);
}

.text-draw{
    color: var(--draw);
}

.rubik-font{
    font-family: 'Rubik Doodle Shadow', serif;
}

.form-body{
    display: flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      height: 100vh;
      margin: 0;
}

#errorMessage{
    transform: translateY(-160px);
}

#nicknameForm{
    width: min-content;
}

#firstInput ::placeholder{
    color: var(--first-player);
    opacity: 0.6;
}

#secondInput ::placeholder{
    color: var(--second-player);
    opacity: 0.6;
}

.card-hover-anim{
    height: 90px;
    width: 90px;
    cursor: pointer;
}

#board{
    max-width: fit-content;
    left: 0;
    right: 0;
    animation: boardIntro 2s 3s both; 
}

.header{
    animation: attemptsIntro 2s 3s both;
}

.flip-card {
    width: 90px;
    height: 90px;
    border-radius: 10%;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    border-radius: 10%;
    transform-style: preserve-3d;
}

.flipped {
    transform: rotateY(180deg);
}

.flip-card-animation{
    cursor: pointer;
}

.flip-card-animation:hover .flip-card-front{
    animation: hoverCard 0.3s ease-out normal both;
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
}

.flip-card-front {
    font-size: 60px;
    background-color: var(--bg-color);
    border-radius: 10%;
}

.flip-card-back {
    border-radius: 10%;
    background-color: var(--bg-color);
    transform: rotateY(180deg);
}

#title{
    right: 0;
    left: 0;
    padding-top: 84px;
    font-size: 50px;
    animation: titleIntro 5s both 1s;
}

img{
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

.shaking{
    animation: shake 0.3s 3;
}

#winner{
    position: fixed;
    left: 0;
    transform: translateY(16rem);
    z-index: 1;
    width: 100%;
    font-size: 2rem;
}

.correct{
    opacity: 0;
    transition: 1s;
    transition-delay: 680ms;
}

.replay{
    position: relative;
    top: 3rem;
    max-width: 73px;
    font-size: 40px;
    cursor: pointer;
}

@media screen and (max-width: 767px) {
    .replay{
        position: static;
    }

    body{
        overflow-y: visible;
    }
  }

/*ANIMATIONS*/

@keyframes titleIntro {
    from{
        transform: scale(3) translateY(50%);
    }
    to{
        transform: scale(1);
    }
}

@keyframes boardIntro {
    from{
        display: none;
        opacity: 0;
        transform: translateY(100px);
    }
    to{
        display: block;
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes attemptsIntro {
    from{
        display: none;
        opacity: 0;
    }
    to{
        display: inline;
        opacity: 1;
    }
}

@keyframes hoverCard {
    100%{
        transform: translateY(-10px);
        border: aqua solid 1px;
    }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
  }