/* شاشة التحميل — بومة كرتونية للأطفال */

html.edu-is-loading,
body.edu-is-loading {
    overflow: hidden;
}

.edu-loading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: linear-gradient(165deg, #E0F2FE 0%, #FFF7ED 38%, #FEF3C7 72%, #FCE7F3 100%);
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.edu-loading.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.edu-loading-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.edu-loading-cloud {
    position: absolute;
    background: #fff;
    border-radius: 999px;
    opacity: 0.72;
    box-shadow: 0 8px 32px rgba(21, 34, 56, 0.06);
    animation: eduCloudDrift 12s ease-in-out infinite;
}

.edu-loading-cloud::before,
.edu-loading-cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.edu-loading-cloud-1 {
    width: 120px;
    height: 42px;
    top: 12%;
    right: 8%;
    animation-duration: 14s;
}

.edu-loading-cloud-1::before {
    width: 52px;
    height: 52px;
    top: -28px;
    right: 18px;
}

.edu-loading-cloud-1::after {
    width: 38px;
    height: 38px;
    top: -18px;
    right: 58px;
}

.edu-loading-cloud-2 {
    width: 96px;
    height: 34px;
    top: 22%;
    left: 6%;
    animation-duration: 11s;
    animation-delay: -3s;
}

.edu-loading-cloud-2::before {
    width: 44px;
    height: 44px;
    top: -24px;
    left: 12px;
}

.edu-loading-cloud-2::after {
    width: 32px;
    height: 32px;
    top: -14px;
    left: 48px;
}

.edu-loading-cloud-3 {
    width: 80px;
    height: 28px;
    bottom: 18%;
    right: 14%;
    animation-duration: 16s;
    animation-delay: -6s;
}

.edu-loading-cloud-3::before {
    width: 36px;
    height: 36px;
    top: -20px;
    right: 10px;
}

@keyframes eduCloudDrift {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-18px) translateY(6px); }
}

.edu-loading-rainbow {
    position: absolute;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 90vw);
    height: 260px;
    border-radius: 520px 520px 0 0;
    background: linear-gradient(180deg,
        rgba(249, 115, 22, 0.18) 0%,
        rgba(251, 191, 36, 0.14) 25%,
        rgba(78, 205, 196, 0.14) 50%,
        rgba(14, 165, 233, 0.14) 75%,
        transparent 100%);
    opacity: 0.85;
}

.edu-loading-card {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 380px;
    width: 100%;
    padding: 2rem 1.5rem 1.75rem;
    background: rgba(255, 255, 255, 0.82);
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    box-shadow:
        0 24px 60px rgba(21, 34, 56, 0.12),
        0 0 0 1px rgba(249, 115, 22, 0.08);
    backdrop-filter: blur(12px);
    animation: eduCardPop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes eduCardPop {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.edu-loading-owl-stage {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 0.5rem;
}

.edu-loading-owl-wrap {
    position: relative;
    z-index: 2;
    animation: eduOwlBounce 2.2s ease-in-out infinite;
}

@keyframes eduOwlBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-14px) rotate(-2deg); }
    60% { transform: translateY(-6px) rotate(2deg); }
}

.edu-loading-ring {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 3px dashed rgba(249, 115, 22, 0.35);
    animation: eduRingSpin 8s linear infinite;
}

.edu-loading-ring-2 {
    inset: 0;
    border-color: rgba(14, 165, 233, 0.28);
    animation-direction: reverse;
    animation-duration: 11s;
}

@keyframes eduRingSpin {
    to { transform: rotate(360deg); }
}

.edu-loading-spark {
    position: absolute;
    font-size: 1.35rem;
    color: #FBBF24;
    text-shadow: 0 2px 8px rgba(251, 191, 36, 0.45);
    animation: eduSparkTwinkle 1.8s ease-in-out infinite;
    pointer-events: none;
}

.edu-loading-spark-1 { top: 6%; right: 4%; color: #FF6B9D; animation-delay: 0s; }
.edu-loading-spark-2 { top: 18%; left: 0; animation-delay: 0.4s; }
.edu-loading-spark-3 { bottom: 12%; right: 2%; color: #4ECDC4; animation-delay: 0.8s; font-size: 1.1rem; }

@keyframes eduSparkTwinkle {
    0%, 100% { opacity: 0.45; transform: scale(0.85) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.15) rotate(18deg); }
}

/* حركات البومة الكرتونية داخل SVG */
.edu-loading-owl-svg .edu-owl-wing-left {
    animation: eduWingFlapL 0.45s ease-in-out infinite alternate;
    transform-origin: 84px 182px;
}

.edu-loading-owl-svg .edu-owl-wing-right {
    animation: eduWingFlapR 0.45s ease-in-out infinite alternate;
    transform-origin: 156px 182px;
}

@keyframes eduWingFlapL {
    from { transform: rotate(0deg); }
    to { transform: rotate(-14deg); }
}

@keyframes eduWingFlapR {
    from { transform: rotate(0deg); }
    to { transform: rotate(14deg); }
}

.edu-loading-owl-svg .edu-owl-pupil {
    animation: eduEyeLook 3s ease-in-out infinite;
}

@keyframes eduEyeLook {
    0%, 100% { transform: translateX(0); }
    40% { transform: translateX(3px); }
    70% { transform: translateX(-2px); }
}

.edu-loading-owl-svg .edu-star-1 { animation: eduStarPulse 2s ease-in-out infinite; transform-origin: 36px 52px; }
.edu-loading-owl-svg .edu-star-2 { animation: eduStarPulse 2.4s ease-in-out infinite 0.3s; transform-origin: 198px 46px; }
.edu-loading-owl-svg .edu-star-3 { animation: eduStarPulse 1.9s ease-in-out infinite 0.6s; transform-origin: 210px 176px; }

@keyframes eduStarPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.75; }
    50% { transform: scale(1.2) rotate(20deg); opacity: 1; }
}

.edu-loading-owl-svg .edu-bubble-1 { animation: eduBubbleFloat 3.2s ease-in-out infinite; }
.edu-loading-owl-svg .edu-bubble-2 { animation: eduBubbleFloat 2.8s ease-in-out infinite 0.5s; }
.edu-loading-owl-svg .edu-bubble-3 { animation: eduBubbleFloat 3.5s ease-in-out infinite 1s; }

@keyframes eduBubbleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.edu-loading-owl-svg .edu-owl-book {
    animation: eduBookWiggle 2.5s ease-in-out infinite;
    transform-origin: 168px 168px;
    transform-box: fill-box;
}

@keyframes eduBookWiggle {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(-6deg) translateY(-4px); }
}

.edu-loading-brand {
    font-size: 1.55rem;
    font-weight: 800;
    color: #152238;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.edu-loading-brand strong {
    color: #F97316;
}

.edu-loading-msg {
    margin: 0 0 1.1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.5;
}

.edu-loading-bar {
    position: relative;
    height: 18px;
    border-radius: 999px;
    background: rgba(21, 34, 56, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(21, 34, 56, 0.06);
}

.edu-loading-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #F97316, #FBBF24, #4ECDC4, #0EA5E9);
    background-size: 200% 100%;
    animation: eduBarShine 1.8s linear infinite;
    transition: width 0.25s ease;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.35);
}

@keyframes eduBarShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.edu-loading-bar-owl {
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    font-size: 0.85rem;
    transition: left 0.25s ease;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.edu-loading-percent {
    margin: 0.5rem 0 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #F97316;
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .edu-loading-owl-wrap,
    .edu-loading-ring,
    .edu-loading-spark,
    .edu-loading-cloud,
    .edu-loading-owl-svg .edu-owl-wing-left,
    .edu-loading-owl-svg .edu-owl-wing-right,
    .edu-loading-owl-svg .edu-owl-pupil,
    .edu-loading-owl-svg .edu-star-1,
    .edu-loading-owl-svg .edu-star-2,
    .edu-loading-owl-svg .edu-star-3,
    .edu-loading-owl-svg .edu-bubble-1,
    .edu-loading-owl-svg .edu-bubble-2,
    .edu-loading-owl-svg .edu-bubble-3,
    .edu-loading-owl-svg .edu-owl-book,
    .edu-loading-bar-fill,
    .edu-loading-owl-svg .edu-owl-book {
        animation: none !important;
    }

    .edu-loading-card {
        animation: none;
    }
}

@media (max-width: 480px) {
    .edu-loading-card {
        padding: 1.5rem 1.1rem 1.35rem;
        border-radius: 24px;
    }

    .edu-loading-owl-stage {
        width: 180px;
        height: 180px;
    }

    .edu-loading-owl-wrap .edu-loading-owl-svg {
        width: 180px !important;
        height: 180px !important;
    }

    .edu-loading-brand {
        font-size: 1.3rem;
    }
}
