/* ============================================
   خلفيات متحركة للموقع - Animated Backgrounds
   ============================================ */

/* خلفية متدرجة متحركة */
.animated-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(-45deg, 
        #e3f2fd 0%, 
        #f3e5f5 15%,
        #e8f5e9 30%,
        #fff3e0 50%,
        #fce4ec 70%,
        #e0f7fa 85%,
        #e3f2fd 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* طبقة ألوان إضافية */
.color-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(255, 183, 77, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(129, 199, 132, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(100, 181, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 20%, rgba(186, 104, 200, 0.15) 0%, transparent 50%);
    animation: colorPulse 10s ease-in-out infinite;
}

@keyframes colorPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* كور أرضية عائمة */
.globes-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.earth-globe {
    position: absolute;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(100, 181, 246, 0.9), rgba(46, 125, 50, 0.8)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='48' fill='%232e7d32'/%3E%3Cpath d='M20,40 Q30,20 50,35 T80,40' fill='none' stroke='%234caf50' stroke-width='2'/%3E%3Cpath d='M25,60 Q40,50 55,65 T75,55' fill='none' stroke='%234caf50' stroke-width='2'/%3E%3Ccircle cx='70' cy='30' r='8' fill='%234caf50'/%3E%3Ccircle cx='30' cy='70' r='6' fill='%234caf50'/%3E%3C/svg%3E");
    background-size: cover;
    box-shadow: 
        inset -10px -10px 20px rgba(0,0,0,0.3),
        inset 10px 10px 20px rgba(255,255,255,0.3),
        0 0 30px rgba(46, 125, 50, 0.3);
    animation: floatGlobe 20s infinite ease-in-out;
}

.earth-globe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%, rgba(0,0,0,0.2) 100%);
}

/* أحجام ومواقع مختلفة للكور الأرضية */
.earth-globe:nth-child(1) { width: 80px; height: 80px; left: 5%; animation-duration: 25s; animation-delay: 0s; top: 10%; }
.earth-globe:nth-child(2) { width: 120px; height: 120px; left: 85%; animation-duration: 30s; animation-delay: 2s; top: 60%; }
.earth-globe:nth-child(3) { width: 60px; height: 60px; left: 70%; animation-duration: 22s; animation-delay: 4s; top: 20%; }
.earth-globe:nth-child(4) { width: 100px; height: 100px; left: 15%; animation-duration: 28s; animation-delay: 1s; top: 70%; }
.earth-globe:nth-child(5) { width: 50px; height: 50px; left: 45%; animation-duration: 20s; animation-delay: 3s; top: 5%; }
.earth-globe:nth-child(6) { width: 90px; height: 90px; left: 90%; animation-duration: 26s; animation-delay: 5s; top: 40%; }
.earth-globe:nth-child(7) { width: 70px; height: 70px; left: 25%; animation-duration: 24s; animation-delay: 2.5s; top: 85%; }
.earth-globe:nth-child(8) { width: 110px; height: 110px; left: 60%; animation-duration: 32s; animation-delay: 1.5s; top: 75%; }

@keyframes floatGlobe {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
        opacity: 0.7;
    }
    25% { 
        transform: translateY(-30px) rotate(90deg); 
        opacity: 0.9;
    }
    50% { 
        transform: translateY(-50px) rotate(180deg); 
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-30px) rotate(270deg); 
        opacity: 0.9;
    }
}

/* نجوم متحركة */
.stars-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffd700 0%, #ff8c00 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ff8c00;
    animation: twinkle 3s infinite ease-in-out;
}

.star::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.star:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.star:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 30%; left: 30%; animation-delay: 1s; }
.star:nth-child(4) { top: 40%; left: 70%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 50%; left: 20%; animation-delay: 2s; }
.star:nth-child(6) { top: 60%; left: 90%; animation-delay: 0.3s; }
.star:nth-child(7) { top: 70%; left: 40%; animation-delay: 0.8s; }
.star:nth-child(8) { top: 80%; left: 60%; animation-delay: 1.3s; }
.star:nth-child(9) { top: 15%; left: 50%; animation-delay: 1.8s; }
.star:nth-child(10) { top: 85%; left: 15%; animation-delay: 2.3s; }
.star:nth-child(11) { top: 25%; left: 95%; animation-delay: 0.2s; }
.star:nth-child(12) { top: 65%; left: 5%; animation-delay: 0.7s; }
.star:nth-child(13) { top: 5%; left: 75%; animation-delay: 1.2s; }
.star:nth-child(14) { top: 45%; left: 45%; animation-delay: 1.7s; }
.star:nth-child(15) { top: 90%; left: 85%; animation-delay: 2.2s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* بوصلة دوران */
.compasses-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.compass {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(139, 90, 43, 0.6);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,248,220,0.8) 0%, rgba(222,184,135,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotateCompass 15s infinite linear;
    box-shadow: 0 0 20px rgba(139, 90, 43, 0.3);
}

.compass::before {
    content: '🧭';
    font-size: 30px;
}

.compass:nth-child(1) { top: 15%; left: 88%; animation-duration: 20s; }
.compass:nth-child(2) { top: 75%; left: 8%; animation-duration: 25s; animation-direction: reverse; }
.compass:nth-child(3) { top: 45%; left: 92%; animation-duration: 18s; }
.compass:nth-child(4) { top: 85%; left: 75%; animation-duration: 22s; animation-direction: reverse; }

@keyframes rotateCompass {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* خرائط عائمة */
.maps-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-map {
    position: absolute;
    font-size: 40px;
    opacity: 0.15;
    animation: floatMap 25s infinite ease-in-out;
}

.floating-map:nth-child(1) { content: '🗺️'; top: 25%; left: 5%; animation-delay: 0s; }
.floating-map:nth-child(2) { content: '🗺️'; top: 65%; left: 88%; animation-delay: 5s; }
.floating-map:nth-child(3) { content: '🌍'; top: 35%; left: 92%; animation-delay: 10s; }
.floating-map:nth-child(4) { content: '🌍'; top: 80%; left: 12%; animation-delay: 15s; }
.floating-map:nth-child(5) { content: '📍'; top: 10%; left: 35%; animation-delay: 3s; font-size: 30px; }
.floating-map:nth-child(6) { content: '📍'; top: 90%; left: 65%; animation-delay: 8s; font-size: 30px; }

@keyframes floatMap {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-40px) rotate(10deg); opacity: 0.2; }
}

/* أهرامات مصر - رموز تاريخية */
.pyramids-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.pyramid {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid rgba(194, 178, 128, 0.3);
    animation: pyramidGlow 8s infinite ease-in-out;
}

.pyramid::after {
    content: '🔺';
    position: absolute;
    top: 20px;
    left: -15px;
    font-size: 30px;
    opacity: 0.5;
}

.pyramid:nth-child(1) { top: 5%; left: 3%; animation-delay: 0s; }
.pyramid:nth-child(2) { top: 55%; left: 95%; animation-delay: 2s; }
.pyramid:nth-child(3) { top: 88%; left: 2%; animation-delay: 4s; }

@keyframes pyramidGlow {
    0%, 100% { opacity: 0.2; transform: scale(0.9); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

/* غيوم متحركة */
.clouds-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 100px;
    animation: drift 40s infinite linear;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud:nth-child(1) { width: 100px; height: 40px; top: 20%; left: -100px; }
.cloud:nth-child(1)::before { width: 50px; height: 50px; top: -25px; left: 10px; }
.cloud:nth-child(1)::after { width: 60px; height: 40px; top: -15px; right: 10px; }

.cloud:nth-child(2) { width: 80px; height: 35px; top: 60%; left: -80px; animation-delay: 15s; }
.cloud:nth-child(2)::before { width: 40px; height: 40px; top: -20px; left: 15px; }
.cloud:nth-child(2)::after { width: 50px; height: 35px; top: -10px; right: 15px; }

.cloud:nth-child(3) { width: 120px; height: 45px; top: 40%; left: -120px; animation-delay: 30s; }
.cloud:nth-child(3)::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud:nth-child(3)::after { width: 70px; height: 45px; top: -20px; right: 20px; }

@keyframes drift {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 200px)); }
}

/* تأثيرات إضافية - أشكال هندسية */
.shapes-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.geo-shape {
    position: absolute;
    opacity: 0.1;
    animation: shapeFloat 20s infinite ease-in-out;
}

.geo-shape:nth-child(1) {
    width: 50px;
    height: 50px;
    border: 3px solid #e74c3c;
    transform: rotate(45deg);
    top: 30%;
    left: 10%;
}

.geo-shape:nth-child(2) {
    width: 70px;
    height: 70px;
    border: 3px solid #3498db;
    border-radius: 50%;
    top: 70%;
    left: 85%;
    animation-delay: 5s;
}

.geo-shape:nth-child(3) {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid rgba(46, 204, 113, 0.3);
    top: 50%;
    left: 5%;
    animation-delay: 10s;
}

.geo-shape:nth-child(4) {
    width: 60px;
    height: 60px;
    background: rgba(155, 89, 182, 0.2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    top: 10%;
    left: 70%;
    animation-delay: 15s;
}

@keyframes shapeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* إعدادات الاستجابة للشاشات المختلفة */
@media (max-width: 768px) {
    .earth-globe { transform: scale(0.6); }
    .compass { transform: scale(0.7); }
    .star::before { font-size: 12px; }
    .floating-map { font-size: 25px; }
}

/* تأثير الانزلاق من الأسفل */
.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
