@import url('https://fonts.googleapis.com/css2?family=Odibee+Sans&display=swap');

:root{
    --card-size-border: 2px;

    --hp-color: #bb3e54;
    --mp-color: #7dacd1;
    --bar-background: black;

    --card-background: #f0f0f0;

    /* card type border color */
    --card-border-color-blue: var(--card-size-border) solid #326b91;
}

*{
    padding: 0;
    margin: 0;
    font-family: 'Odibee Sans', cursive;
}

body{
    background-color: #0093E9;
    background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);

}

main{
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
}

.card{
    background-color: var(--card-background);
    border: var(--card-border-color-blue);
    border-radius: 10px;
    width: 200px;
    height: 220px;
    position: relative;
    padding: 10px;
    -webkit-box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32); 
    box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32);

    animation-name: move;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}

.card::before{
    content: "";
    display: block;
    position: absolute;
    background: red;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: var(--card-background);
    /* border: var(--card-border-color-blue); */
    border-radius: 10px;
}

.card::after{
    content: "";
    border: var(--card-border-color-blue);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: block;
    position: absolute;
    left: 50%;
    top: -77px;
    transform: translateX(-50%);
    z-index: -1;
    -webkit-box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32); 
    box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32);
}


.card > .image-card{
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-image: url("../img/photo.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    position: absolute;
    left: 50%;
    top: -75px;
    transform: translateX(-50%);
}

.card > .card-name{
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
}

.card > .stats{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.card > .stats > .stat{
    display: flex;
    align-items: center;
    padding: 2px;
    transform: translateY(30px);
}

.card > .stats > .stat > p{
    flex: 1;
}

.card > .stats > .stat > .bar{
    flex: 4;
    background-color: var(--bar-background);
    width: 100%;
    height: 10px;
    border-radius: 10px;
}

.card > .stats > .stat > .hp > div{
    height: 100%;
    width: 75%;
    background-color: var(--hp-color);
    border-radius: 10px;
}

.card > .stats > .stat > .mp > div{
    height: 100%;
    width: 23%;
    background-color: var(--mp-color);
    border-radius: 10px;
}

.card > .types{
    width: 60%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15px;
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.card > .types > .type{
    border-radius: 50%;
    width: 30px;
    height: 30px;
    background-image: url("../img/water-drop.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.card > .attack{
    background-color: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    left: -32.5px;
    bottom: -32.5px;
}

.card > .attack > p, .card > .defense > p  {
    position: absolute;
}

.card > .attack > .attack-bg1, .card > .attack > .attack-bg2, .card > .defense > .defense-bg{
    position: absolute;
    
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    filter: invert(76%) sepia(26%) saturate(20%) hue-rotate(315deg) brightness(84%) contrast(96%);
    
    width: 70%;
    height: 70%;
    border-radius: 50%;
}

.card > .attack > .attack-bg1, .card > .attack > .attack-bg2{
    background-image: url("../img/sword.svg");
}

.card > .attack > .attack-bg1{
    transform: rotate(45deg);
}

.card > .attack > .attack-bg2{
    transform: rotate(-45deg);
}

.card > .defense{
    background-color: var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    right: -32.5px;
    bottom: -32.5px;
    
}

.card > .defense > .defense-bg{
    background-image: url("../img/shield.svg");
}

.card > .defense::after{
    content: "";
    display: block;
    position: absolute;
    border: var(--card-border-color-blue);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    z-index: -1;
    -webkit-box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32); 
    box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32);
}

.card > .attack::after{
    content: "";
    display: block;
    position: absolute;
    border: var(--card-border-color-blue);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    z-index: -1;
    -webkit-box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32); 
    box-shadow: 3px 3px 5px 5px rgba(0,0,0,0.32);
}





/* animation */

@keyframes move {
    0% {
        transform: translateY(-10%) rotate(2deg);
    }
    100% {
        transform: translateY(10%) rotate(2deg);
    }
  }