* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
}

main {
    width: 100%;
    height: 100%;
    background-image: url(assets/BG.jpg);
    background-size: cover;
    background-position: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h2{
    color: lime;
    position: relative;
    top: 75px;
    font-size: 2rem;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    text-shadow: 2px 2px green;
    animation: loop-text 1s alternate infinite;
}

.card {
    width: 225px;
    height: 350px;
    border-radius: 0.5em;
    position: relative;
    z-index: 4;
    perspective: 500px; /* Add perspective to parent */
    transform-style: preserve-3d; /* Preserve 3D space */
    animation: Card-Rotate 0.7s ease-in-out 6 1s alternate;
}

.card::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5em;
    box-shadow: 0px 4.5px 20px rgb(0, 0, 0);
    z-index: 5;
    animation: shadowX 0.7s ease-in-out 2 1s alternate;
}

#card-front {
    width: 100%;
    height: 100%;
    background-image: url(assets/BTC-Coin.png);
    background-position: center center;
    background-size: cover;
    display: inline-block;
    position: absolute;
    border-radius: 0.5em;
    z-index: 5;
    backface-visibility: hidden; /* Hide backface when flipped */
    transform: rotateY(180deg);
}

#card-back {
    width: 100%;
    height: 100%;
    background-image: url(assets/ETHEREUM-Coin.png);
    background-position: center center;
    background-size: cover;
    display: inline-block;
    position: absolute;
    border-radius: 0.5em;
    z-index: 5;
    backface-visibility: hidden; /* Hide backface when flipped */
    transform: rotateY(0); /* Start from flipped position */
}

@keyframes Card-Rotate {
    0% {
        transform: rotateY(0) scale(1);
    }
    100% {
        transform: rotateY(360deg) scale(1.2);
    }
}

@keyframes shadowX {
    0%{
        box-shadow: 0px 4.5px 20px rgb(0, 0, 0);
    }
    50%{
        box-shadow: 0px 4.5px 20px rgba(0, 0, 0, 0.445);
    }
    100%{
        box-shadow: 0px 4.5px 20px rgb(0, 0, 0);
    }
}

@keyframes loop-text {
    from{
        font-size: 18px;
    }
    to{
        font-size: 22px;
    }
}

.card:hover{
    animation-play-state: paused;
}