/* animation */
@keyframes mouth {
    from {
        transform: scale(1.0);
    }

    to {
        transform: scaleY(7.4);
    }
}

@keyframes create {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes turn {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes wriggle {
    from {
        transform: rotate(30deg);
    }

    to {
        transform: rotate(40deg) translateX(8px);
    }
}

@keyframes pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeout {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* setting */
:root {
    --pri: hsl(197deg 100% 37%);
    --sec: hsl(203deg 31% 95%);
    --third: hsl(47deg 98% 78%);
    --fourth: hsl(348deg 61% 68%);
    /* 갈색 : #52362b; */
}

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

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

body {
    background-color: var(--pri);
}

.walrus {
    position: relative;
    width: 550px;
    height: 550px;
    margin: 100px auto;
}

.hair:nth-child(1) {
    position: absolute;
    top: 150px;
    left: 112px;
    transform: rotate(-130deg);
    animation: wriggle 0.4s infinite alternate;
}

.hair:nth-child(2) {
    position: absolute;
    top: 105px;
    left: 160px;
    transform: rotate(-90deg);
    animation: wriggle 0.4s infinite alternate;
}

.hair:nth-child(3) {
    position: absolute;
    top: 80px;
    left: 215px;
    transform: rotate(-50deg);
    animation: wriggle 0.4s infinite alternate;
}

.hair:nth-child(4) {
    position: absolute;
    top: 85px;
    left: 270px;
    transform: rotate(-30deg);
    animation: wriggle 0.4s infinite alternate;
}

.hair:nth-child(5) {
    position: absolute;
    top: 110px;
    left: 320px;
    transform: rotate(-35deg);
    animation: wriggle 0.4s infinite alternate;
}

.hair:nth-child(6) {
    position: absolute;
    top: 150px;
    left: 365px;
    transform: rotate(-35deg);
    animation: wriggle 0.4s infinite alternate;
}

.head {
    position: absolute;
    top: 170px;
    left: 125px;
    width: 300px;
    height: 300px;
    background-color: var(--sec);
    border: 4px solid black;
    border-radius: 50% 50% 10% 10%;
    box-shadow: 0px 0px 3px black;
}

.eye {
    position: absolute;
    width: 60px;
    height: 70px;
    background-color: var(--sec);
    border: 4px solid black;
    border-radius: 50%;
    z-index: 3;
}

.eye.left {
    top: 25px;
    left: 50px;
    transform: rotate(25deg);
}

.eye.right {
    width: 51px;
    top: 25px;
    right: 50px;
    transform: rotate(-25deg);
}

.pupil {
    position: absolute;
    width: 30px;
    height: 50px;
    background-color: var(--third);
    border: 3px solid black;
    border-radius: 50%;
}

.pupil.left {
    top: 3px;
    left: 25px;
    transform: rotate(-7deg);
}

.pupil.right {
    width: 30px;
    height: 45px;
    top: 3px;
    right: 15px;
    transform: rotate(8deg);
}

.dot {
    position: absolute;
    width: 8px;
    height: 18px;
    background-color: black;
    border-radius: 50%;
}

.dot.left {
    top: 8px;
    left: 16px;
    transform: rotate(-15deg);
}

.dot.right {
    top: 8px;
    transform: rotate(15deg);
}

.nose {
    position: absolute;
    top: 55px;
    left: 110px;
    width: 80px;
    height: 50px;
    background-color: var(--pri);
    border: 4px solid black;
    border-radius: 50% 50% 40% 40%;
    z-index: 3;
}

.nostrill {
    position: absolute;
    width: 5px;
    background-color: black;
}

.nostrill.left {
    top: 12px;
    left: 20px;
    height: 18px;
    transform: rotate(-30deg);
    border-radius: 50%;
}

.nostrill.right {
    top: 15px;
    right: 15px;
    height: 15px;
    transform: rotate(30deg);
    border-radius: 50%;
}

.mouth {
    position: absolute;
    top: 130px;
    left: 100px;
    width: 100px;
    height: 20px;
    background-color: var(--fourth);
    border: 1px solid black;
    border-radius: 50%;
    z-index: 1;
    animation: mouth 5s 1 forwards;
}

.tooth {
    position: absolute;
    width: 25px;
    height: 100px;
    background-color: var(--third);
    border: 4px solid black;
    border-radius: 50%;
    z-index: 2;
}

.tooth.right::before {
    content: "";
    position: absolute;
    top: -89px;
    left: -84px;
    width: 102px;
    height: 100px;
    background-color: var(--sec);
    border-bottom: 4px solid black;
    border-radius: 0 0 15% 15%;
    z-index: 3;
}

.tooth.left {
    top: 120px;
    left: 95px;
}

.tooth.right {
    top: 120px;
    right: 87px;
}

.neckline {
    position: absolute;
    top: 205px;
    left: 0.1px;
    width: 292px;
    height: 50px;
    background-color: var(--pri);
    border: 0.7px solid black;
}

.waterbomb {
    position: absolute;
    top: 138px;
    left: 128px;
    width: 45px;
    height: 45px;
    background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%);
    border: 2px solid black;
    border-radius: 50%;
    z-index: 3;
    animation-name: create, turn;
    animation-delay: 0s, 5s;
    animation-duration: 5s, 0.4s;
    animation-iteration-count: 1, infinite;
    animation-timing-function: ease-in, linear;
    animation-fill-mode: forwards, none;
}

.waterbomb_bomb {
    position: absolute;
    top: 85px;
    left: 29px;
    width: 500px;
    height: 500px;
    background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%);
    border: 2px solid black;
    border-radius: 50%;
    animation-name: pop, fadeout;
    animation-duration: 0.5s, 3s;
    animation-iteration-count: 1, 1;
    animation-delay: 10s, 12s;
    animation-fill-mode: backwards, forwards;
    z-index: 4;
}

.sect-name {
    position: absolute;
    top: 420px;
    left: 132px;
    width: 300px;
    animation: fadein 2s 13s 1 backwards;
}

.sect-name h1 {
    font-family: 'NanumBaeEunHyeCe';
    font-size: 65px;
    text-align: center;
    letter-spacing: 5px;
}