/* ======================================= */
/* واجهة الترجمة - نسخة مبسطة بدون أعلام ونصائح */
/* ======================================= */

/* الخلفية المعتمة */
#translation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
}

/* بطاقة الترجمة */
.translation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 350px;
    width: 90%;
    animation: slideInUp 0.5s ease;
}

/* حركة الظهور */
@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* السبينر */
.translation-spinner {
    width: 70px;
    height: 70px;
    margin: 20px auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* حالة النجاح */
.translation-spinner.success {
    animation: none;
    border: 4px solid #4CAF50;
    background: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.translation-spinner.success i {
    font-size: 35px;
    color: white;
}

/* حالة الخطأ */
.translation-spinner.error {
    animation: none;
    border: 4px solid #f44336;
    background: #f44336;
    display: flex;
    align-items: center;
    justify-content: center;
}

.translation-spinner.error i {
    font-size: 35px;
    color: white;
}

/* الرسائل */
.translation-message {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 10px;
}

.translation-submessage {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 20px;
}

/* شريط التقدم */
.translation-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.translation-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

/* تجاوب مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .translation-card {
        padding: 30px;
    }
    
    .translation-message {
        font-size: 18px;
    }
    
    .translation-spinner {
        width: 60px;
        height: 60px;
    }
}



        .translation-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.3s ease;
        }

        .translation-loader-container {
            text-align: center;
            padding: 2rem;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(60, 19, 114, 0.2);
            border: 2px solid rgba(60, 19, 114, 0.1);
            max-width: 400px;
            width: 90%;
        }

        .translation-spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            border: 4px solid rgba(60, 19, 114, 0.1);
            border-top: 4px solid var(--purple-dark);
            border-right: 4px solid var(--green-dark);
            border-radius: 50%;
            animation: translation-spin 1s linear infinite;
        }

        @keyframes translation-spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .translation-message {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--purple-dark);
            margin-bottom: 8px;
        }

        .translation-submessage {
            font-size: 0.95rem;
            color: var(--gray-cool);
            margin-bottom: 5px;
        }

        /* Optional: Add language flags or icons */
        .translation-flag {
            font-size: 2rem;
            margin-bottom: 15px;
        }

        /* RTL/LTR support for overlay */
        [dir="rtl"] .translation-message,
        [dir="ltr"] .translation-message {
            text-align: center;
        }

        /* Responsive */
        @media (max-width: 576px) {
            .translation-loader-container {
                padding: 1.5rem;
            }

            .translation-spinner {
                width: 50px;
                height: 50px;
            }

            .translation-message {
                font-size: 1.1rem;
            }
        }