/* Copyright (c) 2022 by Aaron Rickle (https://codepen.io/arickle/pen/XKjMZY)
https://opensource.org/licenses/mit-license.php
 */
html {
    height: 100%;
}

#raining {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: rgba(17 24 39 / 0.8);
}

.rain {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.rain.back-row {
    z-index: -1;
    bottom: 60px;
    opacity: 0.5;
    display: block;
}

.drop {
    position: absolute;
    bottom: 100%;
    width: 15px;
    height: 120px;
    pointer-events: none;
    animation: drop 0.5s linear infinite;
}

@keyframes drop {
    0% {
        transform: translateY(0vh);
    }
    75% {
        transform: translateY(90vh);
    }
    100% {
        transform: translateY(90vh);
    }
}

.stem {
    width: 1px;
    height: 60%;
    margin-left: 7px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25));
    animation: stem 0.5s linear infinite;
}

@keyframes stem {
    0% {
        opacity: 1;
    }
    65% {
        opacity: 1;
    }
    75% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.splat {
    width: 15px;
    height: 10px;
    border-top: 2px dotted rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 1;
    transform: scale(0);
    animation: splat 0.5s linear infinite;
    display: none;
}

body.splat-toggle .splat {
    display: block;
}

@keyframes splat {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    80% {
        opacity: 1;
        transform: scale(0);
    }
    90% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.splat-toggle {
    top: 20px;
}

.back-row-toggle {
    top: 90px;
    line-height: 12px;
    padding-top: 14px;
}

.single-toggle {
    top: 160px;
}

body.single-toggle .drop {
    display: none;
}

body.single-toggle .drop:nth-child(10) {
    display: block;
}
