/* Enhanced Map Styles for Marathon of Truth */
/* أنماط الخريطة المحسّنة لماراثون الحقيقة */

/* الشال الفلسطيني المحسّن للخريطة */
#enhanced-world-map {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(30, 58, 138, 0.95) 0%,
        rgba(30, 64, 175, 0.9) 25%,
        rgba(79, 70, 229, 0.85) 50%,
        rgba(139, 92, 246, 0.8) 75%,
        rgba(168, 85, 247, 0.75) 100%
    );
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#enhanced-world-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* نمط الكوفية للخريطة */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 8px,
            rgba(255, 255, 255, 0.05) 8px,
            rgba(255, 255, 255, 0.05) 16px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 8px,
            rgba(0, 0, 0, 0.07) 8px,
            rgba(0, 0, 0, 0.07) 16px
        ),
        /* نمط شبكي تقليدي */
        linear-gradient(0deg, transparent 98%, rgba(255, 255, 255, 0.03) 100%),
        linear-gradient(90deg, transparent 98%, rgba(0, 0, 0, 0.03) 100%);
    background-size: 24px 24px, 24px 24px, 100% 16px, 16px 100%;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    animation: keffiyeh-subtle-flow 40s ease-in-out infinite;
}

@keyframes keffiyeh-subtle-flow {
    0%, 100% { 
        transform: translateX(0) translateY(0);
        opacity: 0.6;
    }
    25% { 
        transform: translateX(-4px) translateY(2px);
        opacity: 0.7;
    }
    50% { 
        transform: translateX(-8px) translateY(0);
        opacity: 0.5;
    }
    75% { 
        transform: translateX(-4px) translateY(-2px);
        opacity: 0.8;
    }
}

/* خلفية النجوم المتحركة */
.stars-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    animation: stars-twinkle 8s ease-in-out infinite;
}

@keyframes stars-twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* تأثيرات القارات المحسّنة */
.continent {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.continent:hover {
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(255, 255, 255, 0.4));
    transform: scale(1.02);
}

.continent-africa:hover {
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(251, 191, 36, 0.6));
}

.continent-asia:hover {
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(96, 165, 250, 0.6));
}

.continent-europe:hover {
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(249, 115, 22, 0.6));
}

.continent-north-america:hover,
.continent-south-america:hover {
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(16, 185, 129, 0.6));
}

.continent-oceania:hover {
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(6, 182, 212, 0.6));
}

/* علامات المشاركين المحسّنة */
.participant-marker {
    transition: all 0.3s ease;
    cursor: pointer;
}

.participant-marker:hover {
    transform: scale(1.4);
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
}

.participant-marker circle {
    transition: all 0.3s ease;
}

.participant-marker:hover circle {
    stroke-width: 3;
}

/* تولتيب المشاركين */
#participant-tooltip {
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: tooltip-appear 0.3s ease-out;
}

@keyframes tooltip-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* شريط المعلومات */
#map-info-bar {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(30, 41, 59, 0.95) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* أدوات التحكم في الخريطة */
.map-control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.map-control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.map-control-btn:hover::before {
    left: 100%;
}

.map-control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.map-control-btn.active {
    box-shadow: 0 8px 25px rgba(206, 17, 38, 0.3);
}

/* بطاقات المشاركين */
.participant-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.participant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 4px,
            rgba(206, 17, 38, 0.02) 4px,
            rgba(206, 17, 38, 0.02) 6px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 4px,
            rgba(0, 122, 61, 0.02) 4px,
            rgba(0, 122, 61, 0.02) 6px
        );
    border-radius: inherit;
    z-index: 0;
}

.participant-card > * {
    position: relative;
    z-index: 1;
}

.participant-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* النقاط المضيئة */
.city-point {
    transition: all 0.3s ease;
    cursor: pointer;
}

.city-point:hover {
    transform: scale(2);
    filter: drop-shadow(0 0 10px currentColor);
}

/* الخطوط المتحركة */
line {
    transition: all 0.3s ease;
}

line:hover {
    stroke-width: 4;
    filter: drop-shadow(0 0 8px currentColor);
}

/* تأثيرات الموجات الكونية */
.cosmic-waves circle {
    transition: all 0.3s ease;
}

.cosmic-waves:hover circle {
    stroke-width: 2;
    animation-duration: 5s;
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
    #enhanced-world-map {
        min-height: 400px;
        border-radius: 16px;
    }
    
    .participant-marker {
        transform: scale(0.8);
    }
    
    .participant-marker:hover {
        transform: scale(1.1);
    }
    
    #participant-tooltip {
        min-width: 200px;
        font-size: 12px;
    }
    
    .continent-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    #enhanced-world-map {
        min-height: 300px;
        border-radius: 12px;
    }
    
    .participant-marker {
        transform: scale(0.6);
    }
    
    .continent-label {
        font-size: 8px;
    }
    
    .map-control-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* تأثيرات خاصة للأقسام المحيطة */
.section-enhanced {
    position: relative;
}

.section-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(206, 17, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 122, 61, 0.03) 0%, transparent 50%);
    z-index: 0;
}

.section-enhanced > * {
    position: relative;
    z-index: 1;
}

/* انيميشن الظهور التدريجي */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تأثير اللمعان */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* تأثيرات خاصة للعناصر التفاعلية */
.interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* تحسين الأداء */
.continent,
.participant-marker,
.city-point {
    will-change: transform, filter;
}

/* تأثيرات للطباعة */
@media print {
    #enhanced-world-map {
        background: white !important;
        color: black !important;
    }
    
    .participant-marker circle {
        fill: black !important;
        stroke: white !important;
    }
    
    .continent {
        fill: #f0f0f0 !important;
        stroke: black !important;
    }
}