/* animation */
@keyframes ear-one {
    50% {
        transform: translate(-80px, -30px) rotate(-20deg) scale(50%)
    }

    100% {
        transform: translate(-120px, 10px) rotate(-40deg) scale(0%);
    }
}

@keyframes ear-two {
    50% {
        transform: translate(-110px, -120px) rotate(-25deg) scale(50%)
    }

    100% {
        transform: translate(-150px, -100px) rotate(-40deg) scale(0%);
    }
}

@keyframes ear-three {
    50% {
        transform: translate(80px, -30px) rotate(-60deg) scale(50%)
    }

    100% {
        transform: translate(120px, 10px) rotate(-40deg) scale(0%);
    }
}

@keyframes ear-four {
    50% {
        transform: translate(110px, -120px) rotate(-80deg) scale(50%)
    }

    100% {
        transform: translate(150px, -100px) rotate(-40deg) scale(0%);
    }
}

@keyframes ear-five {
    50% {
        transform: translateY(20px) rotate(-40deg) scale(50%)
    }

    100% {
        transform: translateY(50px) rotate(-40deg) scale(0%);
    }
}

@keyframes hair {
    50% {
        transform: translateY(20px) scale(50%) rotate(15deg);
    }

    100% {
        transform: translateY(40px) scale(0%) rotate(15deg)
    }
}

@keyframes eye {
    100% {
        transform: translateY(-40px);
    }
}

@keyframes cheek {
    100% {
        opacity: 0;
    }
}

@keyframes face {
    25% {
        rotate: 3deg;
    }

    50% {
        rotate: -3deg;
    }

    75% {
        rotate: 3deg;
    }

    100% {
        rotate: -3deg;
    }
}

@keyframes cover {
    0%{
        scale: 100%;
    }    
    100%{
        transform: scale(1000%);
    }        
}

@keyframes arm {
    100%{
        transform: rotate(90deg) 
    }
}

/* setting */
:root {
    --black: #1C1D1E;
    --yellow: #F7F6D0
}

/* reset */
body {
    margin: 0;
    padding: 0;
}

/* design */
*,
*::after,
*::before {
    box-sizing: border-box;
}

body {
    background-color: tan;
}

.character {
    position: relative;
    top: 80px;
    margin: 90px auto;
    width: 400px;
    height: 400px;
    animation: face 5s infinite alternate-reverse linear;
}

.cover {
    position: absolute;
    bottom: 200px;
    left: 180px;
    width: 54px;
    height: 45px;
    background-color: #DB1F1F;
    border-radius: 75% 82% 69% 78% / 100% 88% 71% 66%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    animation: cover 4s 1 alternate linear;
    animation-delay: 5.8s;
    animation-fill-mode: forwards;
}

.cover::after{
    content: '';
    position: absolute;
    top: -7px;
    left: 20px;
    width: 6px;
    height: 7px;
    background-color: #46B035;
    border-radius: 0% 100% 0% 100%;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

.cover::before{
    content: '';
    position: absolute;
    top: -10px;
    left: 26px;
    width: 9px;
    height: 10px;
    background-color: #46B035;
    border-radius: 100% 0% 100% 0%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.ear {
    position: absolute;
    width: 170px;
    height: 170px;
    background-color: #F4E6E8;
    /* border: 5px solid var(--black); */
    border-top-right-radius: 10px;
    border-bottom-left-radius: 176px;
    border-bottom-right-radius: 120px;
    border-top-left-radius: 120px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.ear.one {
    bottom: 220px;
    left: 260px;
    animation: ear-one 5s 2 alternate-reverse linear;
    animation-fill-mode: forwards;
}

.ear.two {
    bottom: 80px;
    left: 330px;
    transform: rotate(40deg) skewX(11deg);
    animation: ear-two 5s 2 alternate-reverse linear;
    animation-fill-mode: forwards;
}

.ear.three {
    bottom: 220px;
    right: 260px;
    transform: rotate(-80deg) skewX(11deg);
    animation: ear-three 5s 2 alternate-reverse linear;
    animation-fill-mode: forwards;
}

.ear.four {
    bottom: 80px;
    right: 330px;
    transform: rotate(-120deg) skewX(11deg);
    animation: ear-four 5s 2 alternate-reverse linear;
    animation-fill-mode: forwards;
}

.ear.five {
    bottom: 280px;
    left: 115px;
    transform: rotate(-40deg) skewX(11deg);
    animation: ear-five 5s 2 alternate-reverse linear;
    animation-fill-mode: forwards;
}

.hair {
    position: absolute;
    top: 9px;
    left: 176px;
    width: 43px;
    height: 86px;
    animation: hair 5s 2 alternate-reverse linear;
    animation-fill-mode: forwards;
}

.face {
    position: absolute;
    bottom: 20px;
    width: 400px;
    height: 310px;
    background-color: var(--yellow);
    /* border: 5px solid var(--black); */
    border-radius: 75% 82% 69% 78% / 100% 88% 71% 66%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.eye {
    position: absolute;
    top: 132px;
    width: 25px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--black);
}

.eye::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -6px;
    width: 35px;
    height: 30px;
    background-color: var(--yellow);
    border-radius: 0% 0% 50% 50% / 0% 0% 20% 20%;
    animation: eye 0.6s infinite alternate linear;
}

.eye.left {
    left: 125px;
}


.eye.right {
    right: 130px;
}

.cheek {
    position: absolute;
    top: 165px;
    width: 35px;
    height: 25px;
    border-radius: 50%;
    background-color: #D87C7C;
    opacity: 0.8;
    animation: cheek 3s infinite alternate-reverse linear;
}

.cheek.left {
    left: 90px;
}

.cheek.right {
    right: 100px;
}

.mouth {
    position: absolute;
    top: 180px;
    left: 170px;
    width: 43px;
    height: 30px;
    border-radius: 50%;
    border: 5px solid var(--black);
}


.mouth::before {
    content: '';
    position: absolute;
    bottom: 10px;
    right: -6px;
    width: 45px;
    height: 15px;
    background-color: var(--yellow);
}

.corner::before {
    content: '';
    position: absolute;
    bottom: 8px;
    right: -5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--black);
}

.corner::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: -5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--black);
}

.ch-body{
    position: absolute;
    width: 350px;
    top: 320px;
    left: 40px;
    z-index: -1;
}

.arm{
    position: absolute;
    width: 220px;
    top: 310px;
    right: 210px;
    rotate: -80deg;
    z-index: -2;
    animation: arm 0.7s infinite alternate linear;
    animation-delay: 9s
}