* {
    box-sizing: border-box;
    position: relative;
    margin: 0;
    transition: all 0.2s ease-in-out;
    font-family: 'DM Sans', 'Verdana', Arial, Helvetica, sans-serif;
}

body {
    background-image: url('img/pattern.webp');
    min-height: 100vh;
    color: white;
    font-size: 17px;
    animation: back 8s infinite ease-in;
}

h1 {
    font-size: 40px;
    line-height: 45px;
}
h2 {
    font-size: 30px;
    line-height: 35px;
}
h3 {
    font-size: 25px;
    line-height: 30px;
}

h1, h2, h3, h4, h5, p, span {
    text-shadow: 0px 3px 10px black;
}

.back {
    background: radial-gradient(rgba(0, 0, 0, 0), rgb(0, 0, 0));
    position: fixed;
    top: 0px;
    width: 100%;
    height: 100vh;
    perspective: 100vw;
}

.back > * {
    animation: movetop 2s infinite ease-in;
}

.back img:nth-child(1) {
    position: absolute;
    width: 170px;
    top: 23px;
    left: -45px;
    transform: rotateX(-23deg) rotateY(40deg) rotateZ(-20deg);
}

.back img:nth-child(2) {
    position: absolute;
    width: 170px;
    right: -45px;
    bottom: -50px;
    transform: rotateX(-25deg) rotateY(20deg) rotateZ(10deg);
}

.back img:nth-child(3) {
    position: absolute;
    width: 170px;
    right: -45px;
    top: -50px;
    transform: rotateX(-25deg) rotateY(-10deg) rotateZ(10deg);
}

.back img:nth-child(4) {
    position: absolute;
    width: 170px;
    bottom: -25px;
    left: -50px;
    transform: rotateX(25deg) rotateY(60deg) rotateZ(10deg);
}

.content {
    height: 100%;
    width: 100%;
    display: flex;
}

.container {
    max-width: 1280px;
    width: 100%;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.block {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#screen1 {
    min-height: 100vh;
}

.table {
    background: rgba(0, 0, 0, 0.282);
    padding: 20px;
    border-radius: 20px;
    width: 100%;
    max-width: 700px;
    backdrop-filter: blur(5px);
}

.thead {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.tbody {
    display: flex;
    flex-direction: column;
    border-top: 1px dashed rgba(255, 255, 255, 0.363);
    margin-top: 10px;
    padding-top: 20px;
    gap: 5px;
}

.tbody > li:nth-child(odd){
    padding: 10px;
    background: #00000045;
    border-radius: 20px;
}

input {
    padding: 10px;
    border-radius: 10px;
    border: none;
    outline: none;
    font-size: 16px;
    margin-bottom: 10px;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 300px;
    width: 100%;
}

button{
    cursor: pointer;
}

.btn {
    background: rgb(255, 157, 0);
    color: black;
    padding: 15px;
    border: none;
    outline: none;
    border-radius: 15px;
    font-size: 17px;
    line-height: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease-in;
}
.btn:hover {
    transform: rotate(5deg);
    background: #0292a5;
    color: white;
}

.btn-nano {
    background: rgba(236, 236, 236, 0.432);
    border: none;
    color: white;
    outline: none;
    padding: 5px 10px;
    border-radius: 15px;
}

.btn-nano:hover {
    background: rgba(236, 236, 236, 0.2);
    color: white;
}

#screen2 {
    display: none;
    flex-direction: row;
    height: 100vh;
}

#screen2 > div:nth-child(2) {
    display: flex;
    flex-grow: 1;
    justify-content: center;
}

.head {
    width: 30%;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.399);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 20px;
    justify-content: space-between;
}

.info {
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
}
.stats {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 10px;
}
.stats > div {
    width: 50%;
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-content: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #006b8c;
    padding: 10px;
    border-radius: 10px;
}
.stats svg path {
    color: white;
    stroke: white;
}

.cards {
    width: auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    gap: 10px;
}

.card {
    background-image: url('img/CardNoVisible.png');
    aspect-ratio: 500 / 701;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.card-disabled {
    pointer-events: none;
}

.card-win {
    pointer-events: none;
    filter: brightness(0.6);
}

.card-clicked {
    animation: shake 0.5s;
}

.popback{
    background: #00000013;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
}

#closepopup {
    position: absolute;
    top: 10px;
    right: 30px;
    cursor: pointer;
    font-size: 50px;
    font-weight: 600;
    color: white;
}

.popup {
    padding: 40px;
    padding-top: 90px;
    background: #00000074;
    border-radius: 20px;
    gap: 20px;
    display: flex;
    flex-direction: column;
}

/* Media Query */
@media screen and (max-width: 830px) {
    h2 {
        font-size: 25px;
        line-height: 25px;
    }
    #screen2 {
        flex-direction: column;
    }
    .head {
        flex-direction: column;
        order: 2;
        width: 100%;
    }
    .info {
        display: grid;
        grid-template-columns: 3fr 1fr;
    }
    .stats > div {
        width: 50%;
        min-height: 40px;
    }
    #screen2 > div:nth-child(2) {
        flex-grow: 0;
        width: 100%;
        height: 100%;
    }

    .back > img {
        width: 120px !important;
    }
}
@media screen and (max-width: 420px) {
    .back > img {
        width: 100px !important;
    }
    .info {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ANIMATIONS */
@keyframes shake {
    0%, 100% { transform: rotateY(0deg); }
    25% { transform: rotateY(-10deg); }
    50% { transform: rotateY(10deg); }
    75% { transform: rotateY(-10deg); }
}

@keyframes back {
    0%, 100% {
        background-position: 0 0;
    } 25% {
        background-position: -20px 0px;
    } 50% {
        background-position: 20px 20px;
    } 75% {
        background-position: -20px 40px;
    }
}

@keyframes movetop {
    0%, 100% {
        padding-top: 0px;
    } 50% {
        padding-top: 20px;
    }
}