/* تصميم رسائل الخطأ */
.simple-error-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 2px solid #b03a2e;
    border-radius: 12px;
    padding: 15px;
    z-index: 9999;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.3);
    backdrop-filter: blur(10px);
}

/* تصميم رسائل النجاح */
.simple-success-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: 2px solid #219653;
    border-radius: 12px;
    padding: 15px;
    z-index: 9999;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 6px 25px rgba(46, 204, 113, 0.3);
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        top: -100px;
        opacity: 0;
        transform: translateX(-50%) scale(0.95);
    }
    to {
        top: 20px;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* أيقونة التنبيه */
.simple-error-alert .alert-icon {
    color: #ffebee;
    font-size: 26px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.simple-success-alert .alert-icon {
    color: #e8f5e9;
    font-size: 26px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    animation: pulseSuccess 2s infinite;
}

@keyframes pulseSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* محتوى التنبيه */
.alert-content {
    flex: 1;
}

.simple-error-alert .alert-content h4 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.simple-success-alert .alert-content h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* قائمة الأخطاء */
.simple-error-alert .alert-content ul {
    margin: 0;
    padding-left: 20px;
}

.simple-error-alert .alert-content li {
    color: #ffebee;
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
    padding-left: 5px;
    position: relative;
}

.simple-error-alert .alert-content li:before {
    content: "•";
    color: #ffcdd2;
    font-size: 18px;
    position: absolute;
    left: -15px;
    top: -2px;
}

.simple-error-alert .alert-content li:last-child {
    margin-bottom: 0;
}

/* نص النجاح */
.simple-success-alert .alert-content p {
    color: #e8f5e9;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    padding-right: 10px;
}

/* زر الإغلاق */
.alert-close {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* شريط المؤقت التلقائي */
.timer-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.timer-progress-bar {
    height: 100%;
    width: 100%;
    animation: countdown 5s linear forwards;
}

.simple-error-alert .timer-progress-bar {
    background: rgba(255, 255, 255, 0.7);
}

.simple-success-alert .timer-progress-bar {
    background: rgba(255, 255, 255, 0.7);
}

@keyframes countdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* إخفاء الرسالة */
.simple-error-alert.hidden,
.simple-success-alert.hidden {
    animation: slideOut 0.4s ease-out forwards;
}

@keyframes slideOut {
    from {
        top: 20px;
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    to {
        top: -100px;
        opacity: 0;
        transform: translateX(-50%) scale(0.95);
        visibility: hidden;
    }
}

/* 📱 Responsive for Mobile */
@media (max-width: 600px) {
    .simple-error-alert,
    .simple-success-alert {
        top: 10px;
        width: calc(100% - 30px);
        max-width: none;
        padding: 12px;
        border-radius: 10px;
        gap: 12px;
    }

    @keyframes slideIn {
        from {
            top: -80px;
            opacity: 0;
            transform: translateX(-50%) scale(0.9);
        }
        to {
            top: 10px;
            opacity: 1;
            transform: translateX(-50%) scale(1);
        }
    }

    .simple-error-alert .alert-icon,
    .simple-success-alert .alert-icon {
        font-size: 20px;
        width: 34px;
        height: 34px;
    }

    .simple-error-alert .alert-content h4,
    .simple-success-alert .alert-content h4 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .simple-error-alert .alert-content ul {
        padding-left: 15px;
    }

    .simple-error-alert .alert-content li {
        font-size: 12px;
        line-height: 1.4;
    }

    .simple-success-alert .alert-content p {
        font-size: 12px;
    }

    .alert-close {
        padding: 6px;
        font-size: 14px;
        width: 32px;
        height: 32px;
    }

    .timer-progress {
        height: 2px;
    }
}

/* تعديلات للشاشات الصغيرة جداً */
@media (max-width: 400px) {
    .simple-error-alert,
    .simple-success-alert {
        padding: 10px;
        gap: 10px;
    }

    .simple-error-alert .alert-content li:before {
        left: -12px;
    }
}
