@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
    --biscuit: #5d4037;
    --icing: #fff;
    --fill: #f6d8d1;
    --purple: #94aeff;
    --grey: #ccc;
    --green: #008773;
    --sky: #0cbae8;
    --rose: #d16d6b;
    --background: #2b2d42;
    --white: #ffffff;
}

* {
    padding: 0;
    margin: 0;
}

body {
    background-color: var(--background);
}

p {
    margin-top: 1vh;
    text-align: center;
    color: var(--white);
    text-transform: capitalize;
    font-family: "Josefin Sans";
    font-weight: 400;
    font-size: 1.5em;
    text-shadow: 5px 5px 10px var(--sky);
}
.blow {
    margin: 0 auto;
    display: block;
    padding: 10px 17px 14px;
    font-family: inherit;
    margin-top: 25px;
    border-radius: 50px;
    font-size: 16px;
    background-color: #ffa500;
    border: none;
    cursor: pointer;
    transition: 0.5s;
}
.blow.active {
    opacity: 0;
}
.blow:hover {
    transform: rotate(10deg);
}
.box {
    display: box;
    position: relative;
    width: 700px;
    height: 700px;
    margin: auto;
}

.plate {
    position: absolute;
    width: 70%;
    height: 40%;
    border-radius: 50%;
    background: var(--grey);
    bottom: 10%;
    left: 15%;
    box-shadow: -7px 25px 53px -2px rgba(0, 0, 0, 0.78);
}

.layer,
.icing {
    background: var(--biscuit);
    position: absolute;
    bottom: 17.5%;
    left: 23%;
    width: 55%;
    height: 35%;
    border-radius: 50%;
}

.layer:nth-of-type(2) {
    background: var(--biscuit);
    bottom: 33%;
    height: 33%;
    z-index: 1;
}

.layer::after,
.layer:before {
    content: "";
    position: absolute;
    top: -10%;
    bottom: -10%;
    height: 70%;
    width: 100%;
    border-radius: 50%;
    background: var(--biscuit);
}

.layer::before {
    bottom: 10%;
    top: 10%;
}

.fill {
    background: var(--fill);
    border: 2px solid var(--fill);
    position: absolute;
    bottom: 20%;
    left: -0.5%;
    width: 100%;
    height: 80%;
    border-radius: 50%;
}

.icing {
    background: white;
    top: 27%;
    height: 25%;
    z-index: 2;
}

.icing-sm {
    position: absolute;
    background: white;
    height: 50%;
    width: 10%;
    border-top-left-radius: 25%;
    border-top-right-radius: 25%;
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    top: 45%;
    box-shadow: -18px 35px 60px -10px rgba(0, 0, 0, 0.78);
}

.icing-sm:nth-of-type(2) {
    height: 70%;
    top: 70%;
    left: 25%;
}

.icing-sm:nth-of-type(3) {
    width: 15%;
    height: 80%;
    top: 50%;
    right: 15%;
    box-shadow: 0 60px 100px -10px rgba(0, 0, 0, 0.78);
}

.icing-sm:nth-of-type(4),
.icing-sm:nth-of-type(5),
.icing-sm:nth-of-type(6) {
    height: 30%;
    width: 7%;
    top: 85%;
    left: 45%;
    background: white;
}

.icing-sm:nth-of-type(5) {
    left: 12%;
    top: 70%;
}

.icing-sm:nth-of-type(6) {
    left: 92%;
    top: 56%;
    background: white;
}

.candles {
    position: absolute;
    height: 40%;
    width: 50%;
    left: 25%;
    top: 20%;
    z-index: 3;
}

.candle {
    position: absolute;
    background-color: var(--rose);
    width: 5%;
    height: 30%;
    border-radius: 10px / 4px;
    top: 5%;
    left: 50%;
    margin-left: -8px;
    z-index: 10;
}

.candle:nth-of-type(2) {
    top: 20%;
    left: 25%;
}

.candle:nth-of-type(3) {
    top: 20%;
    left: 75%;
}

.candle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--rose);
}

.flame {
    position: absolute;
    background-color: orange;
    width: 90%;
    height: 40%;
    border-radius: 10px 10px 10px 10px / 25px 25px 10px 10px;
    top: -55%;
    left: 50%;
    margin-left: -40%;
    transform-origin: 50% 90%;
    animation: flicker 1s ease-in-out alternate infinite;
}
.candles.active .candle:first-child .flame {
    animation: candle 2s forwards;
}
.candles.active .candle:nth-child(2) .flame {
    animation: candle 2s forwards;
    animation-delay: 1s;
}
.candles.active .candle:nth-child(3) .flame {
    animation: candle 2s forwards;
    animation-delay: 2s;
}
@keyframes candle {
    to {
        opacity: 0;
        top: -80%;
        transform: skewX(20deg);
    }
}
@media all and (max-width: 600px) {
    .box {
        width: 500px;
        height: 400px;
    }
}

@media all and (max-width: 400px) {
    .box {
        width: 300px;
        height: 200px;
    }
}

@keyframes flicker {
    0% {
        transform: skewX(5deg);
    }

    25% {
        transform: skewX(-5deg);
    }

    50% {
        transform: skewX(10deg);
    }

    75% {
        transform: skewX(-10deg);
    }

    100% {
        transform: skewX(5deg);
    }
}

.pyro {
    display: none;
}
.pyro.active {
    display: block;
}
.pyro > .before,
.pyro > .after {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    box-shadow: -120px -218.66667px blue, 248px -16.66667px #00ff84, 190px 16.33333px #002bff, -113px -308.66667px #ff009d,
        -109px -287.66667px #ffb300, -50px -313.66667px #ff006e, 226px -31.66667px #ff4000, 180px -351.66667px #ff00d0, -12px -338.66667px #00f6ff,
        220px -388.66667px #99ff00, -69px -27.66667px #ff0400, -111px -339.66667px #6200ff, 155px -237.66667px #00ddff, -152px -380.66667px #00ffd0,
        -50px -37.66667px #00ffdd, -95px -175.66667px #a6ff00, -88px 10.33333px #0d00ff, 112px -309.66667px #005eff, 69px -415.66667px #ff00a6,
        168px -100.66667px #ff004c, -244px 24.33333px #ff6600, 97px -325.66667px #ff0066, -211px -182.66667px #00ffa2, 236px -126.66667px #b700ff,
        140px -196.66667px #9000ff, 125px -175.66667px #00bbff, 118px -381.66667px #ff002f, 144px -111.66667px #ffae00, 36px -78.66667px #f600ff,
        -63px -196.66667px #c800ff, -218px -227.66667px #d4ff00, -134px -377.66667px #ea00ff, -36px -412.66667px #ff00d4, 209px -106.66667px #00fff2,
        91px -278.66667px #000dff, -22px -191.66667px #9dff00, 139px -392.66667px #a6ff00, 56px -2.66667px #0099ff, -156px -276.66667px #ea00ff,
        -163px -233.66667px #00fffb, -238px -346.66667px #00ff73, 62px -363.66667px #0088ff, 244px -170.66667px #0062ff, 224px -142.66667px #b300ff,
        141px -208.66667px #9000ff, 211px -285.66667px #ff6600, 181px -128.66667px #1e00ff, 90px -123.66667px #c800ff, 189px 70.33333px #00ffc8,
        -18px -383.66667px #00ff33, 100px -6.66667px #ff008c;
    -moz-animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;
    -webkit-animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;
    -o-animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;
    -ms-animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;
    animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;
}

.pyro > .after {
    -moz-animation-delay: 1.25s, 1.25s, 1.25s;
    -webkit-animation-delay: 1.25s, 1.25s, 1.25s;
    -o-animation-delay: 1.25s, 1.25s, 1.25s;
    -ms-animation-delay: 1.25s, 1.25s, 1.25s;
    animation-delay: 1.25s, 1.25s, 1.25s;
    -moz-animation-duration: 1.25s, 1.25s, 6.25s;
    -webkit-animation-duration: 1.25s, 1.25s, 6.25s;
    -o-animation-duration: 1.25s, 1.25s, 6.25s;
    -ms-animation-duration: 1.25s, 1.25s, 6.25s;
    animation-duration: 1.25s, 1.25s, 6.25s;
}

@-webkit-keyframes bang {
    from {
        box-shadow: 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white;
    }
}
@-moz-keyframes bang {
    from {
        box-shadow: 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white;
    }
}
@-o-keyframes bang {
    from {
        box-shadow: 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white;
    }
}
@-ms-keyframes bang {
    from {
        box-shadow: 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white;
    }
}
@keyframes bang {
    from {
        box-shadow: 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white, 0 0 white,
            0 0 white, 0 0 white, 0 0 white;
    }
}
@-webkit-keyframes gravity {
    to {
        transform: translateY(200px);
        -moz-transform: translateY(200px);
        -webkit-transform: translateY(200px);
        -o-transform: translateY(200px);
        -ms-transform: translateY(200px);
        opacity: 0;
    }
}
@-moz-keyframes gravity {
    to {
        transform: translateY(200px);
        -moz-transform: translateY(200px);
        -webkit-transform: translateY(200px);
        -o-transform: translateY(200px);
        -ms-transform: translateY(200px);
        opacity: 0;
    }
}
@-o-keyframes gravity {
    to {
        transform: translateY(200px);
        -moz-transform: translateY(200px);
        -webkit-transform: translateY(200px);
        -o-transform: translateY(200px);
        -ms-transform: translateY(200px);
        opacity: 0;
    }
}
@-ms-keyframes gravity {
    to {
        transform: translateY(200px);
        -moz-transform: translateY(200px);
        -webkit-transform: translateY(200px);
        -o-transform: translateY(200px);
        -ms-transform: translateY(200px);
        opacity: 0;
    }
}
@keyframes gravity {
    to {
        transform: translateY(200px);
        -moz-transform: translateY(200px);
        -webkit-transform: translateY(200px);
        -o-transform: translateY(200px);
        -ms-transform: translateY(200px);
        opacity: 0;
    }
}
@-webkit-keyframes position {
    0%,
    19.9% {
        margin-top: 10%;
        margin-left: 40%;
    }

    20%,
    39.9% {
        margin-top: 40%;
        margin-left: 30%;
    }

    40%,
    59.9% {
        margin-top: 20%;
        margin-left: 70%;
    }

    60%,
    79.9% {
        margin-top: 30%;
        margin-left: 20%;
    }

    80%,
    99.9% {
        margin-top: 30%;
        margin-left: 80%;
    }
}
@-moz-keyframes position {
    0%,
    19.9% {
        margin-top: 10%;
        margin-left: 40%;
    }

    20%,
    39.9% {
        margin-top: 40%;
        margin-left: 30%;
    }

    40%,
    59.9% {
        margin-top: 20%;
        margin-left: 70%;
    }

    60%,
    79.9% {
        margin-top: 30%;
        margin-left: 20%;
    }

    80%,
    99.9% {
        margin-top: 30%;
        margin-left: 80%;
    }
}
@-o-keyframes position {
    0%,
    19.9% {
        margin-top: 10%;
        margin-left: 40%;
    }

    20%,
    39.9% {
        margin-top: 40%;
        margin-left: 30%;
    }

    40%,
    59.9% {
        margin-top: 20%;
        margin-left: 70%;
    }

    60%,
    79.9% {
        margin-top: 30%;
        margin-left: 20%;
    }

    80%,
    99.9% {
        margin-top: 30%;
        margin-left: 80%;
    }
}
@-ms-keyframes position {
    0%,
    19.9% {
        margin-top: 10%;
        margin-left: 40%;
    }

    20%,
    39.9% {
        margin-top: 40%;
        margin-left: 30%;
    }

    40%,
    59.9% {
        margin-top: 20%;
        margin-left: 70%;
    }

    60%,
    79.9% {
        margin-top: 30%;
        margin-left: 20%;
    }

    80%,
    99.9% {
        margin-top: 30%;
        margin-left: 80%;
    }
}
@keyframes position {
    0%,
    19.9% {
        margin-top: 10%;
        margin-left: 40%;
    }

    20%,
    39.9% {
        margin-top: 40%;
        margin-left: 30%;
    }

    40%,
    59.9% {
        margin-top: 20%;
        margin-left: 70%;
    }

    60%,
    79.9% {
        margin-top: 30%;
        margin-left: 20%;
    }

    80%,
    99.9% {
        margin-top: 30%;
        margin-left: 80%;
    }
}
