/* Weather Effects for MelodicVoiceStudio - Adapted for white/blue theme */

/* Weather container - positioned over header */
.weather-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

/* Base particle styles */
.weather-particle {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

/* Snow particles - blue tones for white site */
.weather-particle.snow {
    color: #4a90e2;
    font-size: 1rem;
    opacity: 0.7;
    text-shadow: 0 0 3px rgba(74, 144, 226, 0.5);
    animation: snowfall 8s linear infinite;
}

.weather-particle.snow:nth-child(2n) {
    color: #6bb6ff;
    font-size: 0.8rem;
    animation-duration: 10s;
}

.weather-particle.snow:nth-child(3n) {
    color: #87ceeb;
    font-size: 1.2rem;
    animation-duration: 6s;
}

@keyframes snowfall {
    0% {
        transform: translateY(-100px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) translateX(-20px);
        opacity: 0;
    }
}

/* Rain particles - blue/gray tones */
.weather-particle.rain-drop {
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, #4a90e2, transparent);
    border-radius: 0 0 50% 50%;
    animation: rainfall 1s linear infinite;
    opacity: 0.6;
}

.weather-particle.rain-drop:nth-child(2n) {
    background: linear-gradient(to bottom, #6bb6ff, transparent);
    animation-duration: 0.8s;
}

.weather-particle.rain-drop:nth-child(3n) {
    background: linear-gradient(to bottom, #87ceeb, transparent);
    animation-duration: 1.2s;
}

@keyframes rainfall {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(calc(100vh + 50px));
        opacity: 0;
    }
}

/* Autumn leaves - orange/brown for contrast */
.weather-particle.leaf {
    color: #d2691e;
    font-size: 1rem;
    animation: leaffall 12s linear infinite;
    opacity: 0.8;
}

.weather-particle.leaf:nth-child(2n) {
    color: #8b4513;
    animation-duration: 15s;
}

.weather-particle.leaf:nth-child(3n) {
    color: #ff6347;
    animation-duration: 10s;
}

@keyframes leaffall {
    0% {
        transform: translateY(-50px) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(50vh) translateX(20px) rotate(180deg);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) translateX(-30px) rotate(360deg);
        opacity: 0;
    }
}

/* Wind effect for high wind speeds */
.high-wind header {
    animation: wind-sway 2s ease-in-out infinite;
}

@keyframes wind-sway {
    0%, 100% {
        transform: translateX(0px);
    }
    50% {
        transform: translateX(2px);
    }
}

/* Weather status text styling */
.weather-status {
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #222262;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-family: 'Scada', sans-serif;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
    border: 1px solid rgba(34, 34, 98, 0.2);
}

.weather-status:hover {
    opacity: 1;
}

/* Responsive adjustments */
@media all and (max-width: 900px) {
    .weather-particle.snow,
    .weather-particle.leaf {
        font-size: 0.8rem;
    }
    
    .weather-particle.rain-drop {
        width: 1.5px;
        height: 12px;
    }
    
    .weather-status {
        font-size: 0.7rem;
        padding: 3px 8px;
        top: 5px;
        right: 10px;
    }
}

/* Clouds effect for cloudy weather */
.weather-cloud {
    position: absolute;
    background: rgba(200, 220, 255, 0.5);
    border-radius: 50px;
    opacity: 0.8;
    animation: cloudmove 20s linear infinite;
    width: 100px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(200, 220, 255, 0.3);
}

.weather-cloud:before,
.weather-cloud:after {
    content: '';
    position: absolute;
    background: rgba(200, 220, 255, 0.5);
    border-radius: 50px;
}

.weather-cloud:before {
    width: 50px;
    height: 40px;
    top: -15px;
    left: 10px;
}

.weather-cloud:after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 15px;
}

@keyframes cloudmove {
    0% {
        transform: translateX(-200px);
    }
    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

/* Autumn leaf animations - realistic leaves */
.autumn-leaves {
    position: relative;
    top: -50px;
    width: 100%;
    text-align: right;
}

.autumn-leaves .leaf-realistic {
    display: inline-block;
    width: 200px;
    height: 150px;
    background: linear-gradient(to bottom right, #309900, #005600);
    transform: skew(20deg);
    border-radius: 5% 40% 70%;
    box-shadow: inset 0px 0px 1px #222;
    border: 1px solid #333;
    z-index: 1;
    position: absolute;
    animation: falling 8s 0s infinite;
}

.autumn-leaves .leaf-realistic:nth-of-type(2n) { animation: falling2 8s 0s infinite; }
.autumn-leaves .leaf-realistic:nth-of-type(3n) { animation: falling3 8s 0s infinite; }

.autumn-leaves .leaf-realistic:before {
    position: absolute;
    content: '';
    top: 117px;
    right: 9px;
    height: 27px;
    width: 32px;
    transform: rotate(49deg);
    border-radius: 0% 15% 15% 0%;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    border-left: 0px solid #222;
    border-right: 1px solid #222;
    background: linear-gradient(to right, rgba(0,100,0,1), #005600);
    z-index: 1;
}

.autumn-leaves .leaf-realistic:after {
    content: '';
    height: 125px;
    width: 10px;
    background: linear-gradient(to right, rgba(0,0,0,.15), rgba(0,0,0,0));
    display: block;
    transform: rotate(125deg);
    position: absolute;
    left: 85px;
    border-radius: 50%;
}

/* Leaf size variations */
.autumn-leaves .leaf-realistic:nth-of-type(n) { height: 23px; width: 30px; }
.autumn-leaves .leaf-realistic:nth-of-type(n):before { width: 7px; height: 5px; top: 17px; right: 1px; }
.autumn-leaves .leaf-realistic:nth-of-type(n):after { width: 2px; height: 17px; left: 12px; top: 0px; }

.autumn-leaves .leaf-realistic:nth-of-type(2n+1) { height: 11px; width: 16px; }
.autumn-leaves .leaf-realistic:nth-of-type(2n+1):before { width: 4px; height: 3px; top: 7px; right: 0px; }
.autumn-leaves .leaf-realistic:nth-of-type(2n+1):after { width: 2px; height: 6px; left: 5px; top: 1px; }

.autumn-leaves .leaf-realistic:nth-of-type(3n+2) { height: 17px; width: 23px; }
.autumn-leaves .leaf-realistic:nth-of-type(3n+2):before { height: 4px; width: 4px; top: 12px; right: 1px; }
.autumn-leaves .leaf-realistic:nth-of-type(3n+2):after { height: 10px; width: 2px; top: 1px; left: 8px; }

/* Animation delays for natural effect */
.autumn-leaves .leaf-realistic:nth-of-type(n) { animation-delay: 1.9s; }
.autumn-leaves .leaf-realistic:nth-of-type(2n) { animation-delay: 3.9s; }
.autumn-leaves .leaf-realistic:nth-of-type(3n) { animation-delay: 2.3s; }
.autumn-leaves .leaf-realistic:nth-of-type(4n) { animation-delay: 4.4s; }
.autumn-leaves .leaf-realistic:nth-of-type(5n) { animation-delay: 5s; }
.autumn-leaves .leaf-realistic:nth-of-type(6n) { animation-delay: 3.5s; }
.autumn-leaves .leaf-realistic:nth-of-type(7n) { animation-delay: 2.8s; }
.autumn-leaves .leaf-realistic:nth-of-type(8n) { animation-delay: 1.5s; }
.autumn-leaves .leaf-realistic:nth-of-type(9n) { animation-delay: 3.3s; }
.autumn-leaves .leaf-realistic:nth-of-type(10n) { animation-delay: 2.5s; }
.autumn-leaves .leaf-realistic:nth-of-type(11n) { animation-delay: 1.2s; }
.autumn-leaves .leaf-realistic:nth-of-type(12n) { animation-delay: 4.1s; }
.autumn-leaves .leaf-realistic:nth-of-type(13n) { animation-delay: 1s; }
.autumn-leaves .leaf-realistic:nth-of-type(14n) { animation-delay: 4.7s; }
.autumn-leaves .leaf-realistic:nth-of-type(15n) { animation-delay: 3s; }

/* Leaf color variations */
.autumn-leaves .leaf-realistic:nth-of-type(n) { background: linear-gradient(to bottom right, #309900, #005600); }
.autumn-leaves .leaf-realistic:nth-of-type(2n+2) { background: linear-gradient(to bottom right, #5e9900, #2b5600); }
.autumn-leaves .leaf-realistic:nth-of-type(3n+1) { background: linear-gradient(to bottom right, #ff9900, #cc6600); }
.autumn-leaves .leaf-realistic:nth-of-type(4n+1) { background: linear-gradient(to bottom right, #990, #564500); }
.autumn-leaves .leaf-realistic:nth-of-type(5n+2) { background: linear-gradient(to bottom right, #ffcc00, #996600); }
.autumn-leaves .leaf-realistic:nth-of-type(6n+3) { background: linear-gradient(to bottom right, #ff6600, #993300); }

/* Opacity variations */
.autumn-leaves .leaf-realistic:nth-of-type(n) { opacity: .7; }
.autumn-leaves .leaf-realistic:nth-of-type(3n+1) { opacity: .5; }
.autumn-leaves .leaf-realistic:nth-of-type(3n+2) { opacity: .3; }

.autumn-leaves .leaf-realistic:nth-of-type(n) { transform: rotate(180deg); }
.autumn-leaves .leaf-realistic:nth-of-type(n) { animation-timing-function: ease-in-out; }

/* Falling animations */
@keyframes falling {
    0% {
        transform: translate3d(300px, 0, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(-350px, 700px, 0) rotate(90deg);
        opacity: 0;
    }
}

@keyframes falling2 {
    0% {
        transform: translate3d(0, 0, 0) rotate(90deg);
    }
    100% {
        transform: translate3d(-400px, 680px, 0) rotate(0deg);
        opacity: 0;
    }
}

@keyframes falling3 {
    0% {
        transform: translate3d(0, 0, 0) rotate(-20deg);
    }
    100% {
        transform: translate3d(-230px, 640px, 0) rotate(-70deg);
        opacity: 0;
    }
}

/* Sunny weather styles */
.sunny-weather {
    position: absolute;
    top: -25px;
    right: 120px;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0.7;
}

.sun {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #fcbb04, #fffc00);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 15px rgba(252, 187, 4, 0.4);
    z-index: 1;
}

.sunshine {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #fcbb04, #fffc00);
    border-radius: 50%;
    position: absolute;
    animation: sunshines 2s infinite;
    z-index: 1;
}

.sunny-cloud {
    position: absolute;
    z-index: 2;
}

.sunny-cloud.front {
    top: 35px;
    left: 20px;
    animation: clouds 8s infinite ease-in-out;
}

.sunny-cloud.back {
    top: 10px;
    left: 80px;
    animation: clouds 12s infinite ease-in-out;
}

.cloud-part {
    display: inline-block;
    background-color: rgba(220, 240, 255, 0.7);
    border: 1px solid rgba(74, 144, 226, 0.4);
}

.right-front {
    width: 35px;
    height: 35px;
    border-radius: 50% 50% 50% 0%;
    margin-left: -20px;
}

.left-front {
    width: 50px;
    height: 50px;
    border-radius: 50% 50% 0% 50%;
}

.right-back {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0%;
    margin-left: -15px;
}

.left-back {
    width: 25px;
    height: 25px;
    border-radius: 50% 50% 0% 50%;
}

@keyframes sunshines {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes clouds {
    0% {
        transform: translateX(10px);
    }
    50% {
        transform: translateX(0px);
    }
    100% {
        transform: translateX(10px);
    }
}