/* =====================================================
   Cloud Animations - Floating clouds across the sky
   ===================================================== */

/* Cloud Layer Container */
.clouds-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%;
    overflow: hidden;
    pointer-events: none;
    z-index: -999;
}

/* Base cloud style */
.cloud {
    position: absolute;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.6) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(240, 248, 255, 0.3) 100%);
    border-radius: 100px;
    filter: blur(2px);
    opacity: 0.4;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Cloud shape - using pseudo elements to create fluffy cloud shape */
.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud::before {
    width: 50%;
    height: 120%;
    top: -40%;
    left: 15%;
}

.cloud::after {
    width: 40%;
    height: 100%;
    top: -30%;
    right: 20%;
}

/* Individual cloud variations */
/* TIP: Increase duration (e.g., 120s → 180s) to make clouds slower */
.cloud-1 {
    width: 200px;
    height: 60px;
    top: 10%;
    animation: floatCloud 520s linear infinite;
    animation-delay: -10s;
}

.cloud-2 {
    width: 150px;
    height: 45px;
    top: 25%;
    opacity: 0.7;
    animation: floatCloud 540s linear infinite;
    animation-delay: -350s;
}

.cloud-3 {
    width: 250px;
    height: 70px;
    top: 5%;
    animation: floatCloud 550s linear infinite;
    animation-delay: -180s;
}

/* Floating animation - clouds drift from right to left */
@keyframes floatCloud {
    0% {
        transform: translateX(110vw);
    }

    100% {
        transform: translateX(-30vw);
    }
}

/* =====================================================
   Theme-specific cloud appearances
   ===================================================== */

/* Fajar - pre-dawn soft blue-gray clouds */
body.theme-fajar .cloud {
    background: linear-gradient(135deg,
            rgba(200, 210, 230, 0.8) 0%,
            rgba(180, 195, 220, 0.6) 50%,
            rgba(165, 180, 210, 0.5) 100%);
}

/* Sunrise - golden-tinted clouds */
body.theme-sunrise .cloud {
    background: linear-gradient(135deg,
            rgba(255, 245, 230, 0.9) 0%,
            rgba(255, 220, 180, 0.7) 50%,
            rgba(255, 200, 150, 0.6) 100%);
}

/* Dhur - bright white clouds */
body.theme-dhur .cloud {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(250, 250, 255, 0.7) 100%);
}

/* Asr - warm afternoon clouds */
body.theme-asr .cloud {
    background: linear-gradient(135deg,
            rgba(255, 240, 235, 0.85) 0%,
            rgba(255, 220, 210, 0.7) 50%,
            rgba(250, 200, 190, 0.6) 100%);
}

/* Magrib - sunset pink/orange clouds */
body.theme-magrib .cloud {
    background: linear-gradient(135deg,
            rgba(255, 200, 180, 0.85) 0%,
            rgba(255, 170, 150, 0.7) 50%,
            rgba(240, 150, 140, 0.6) 100%);
}

/* Isha - night clouds barely visible */
body.theme-isha .cloud {
    background: linear-gradient(135deg,
            rgba(100, 110, 130, 0.4) 0%,
            rgba(80, 90, 110, 0.3) 50%,
            rgba(70, 80, 100, 0.2) 100%);
    opacity: 0.4;
}

/* Loading theme - neutral clouds */
body.theme-loading .cloud {
    background: linear-gradient(135deg,
            rgba(220, 230, 240, 0.8) 0%,
            rgba(200, 215, 230, 0.6) 50%,
            rgba(180, 200, 220, 0.5) 100%);
}

/* =====================================================
   Performance optimization for Tizen
   ===================================================== */
.cloud {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .cloud {
        animation: none;
        transform: translateX(20vw);
    }
}